qr-code-with-logo icon indicating copy to clipboard operation
qr-code-with-logo copied to clipboard

Generate SVG Java code from demo application fails

Open softwaremagico opened this issue 10 months ago • 2 comments

Only playing around with the demo application, but I have notice that if you choose the option "Generate Code -> Copy SVG Java Code" launch a:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: expected type but was class javax.xml.transform.TransformerFactory
        at com.squareup.javapoet.CodeBlock$Builder.argToType(CodeBlock.java:360)
        at com.squareup.javapoet.CodeBlock$Builder.addArgument(CodeBlock.java:330)
        at com.squareup.javapoet.CodeBlock$Builder.add(CodeBlock.java:292)
        at com.squareup.javapoet.CodeBlock$Builder.addStatement(CodeBlock.java:402)
        at com.squareup.javapoet.MethodSpec$Builder.addStatement(MethodSpec.java:525)
        at io.github.simonscholz.service.codegen.SvgGraphicsCodeGenerator.generateJavaCode(SvgGraphicsCodeGenerator.kt:270)
        at io.github.simonscholz.service.CodeGeneratorService.generateSvgImageJavaCode(CodeGeneratorService.kt:19)
        at io.github.simonscholz.ui.FileUI.copySvgJavaCodeToClipboard(FileUI.kt:47)
        at io.github.simonscholz.ui.MainMenu.createGenerateCodeMenu$lambda$1(MainMenu.kt:64)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
        at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source)
        at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
        at java.desktop/javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
        at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
        at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.desktop/java.awt.Component.processEvent(Unknown Source)
        at java.desktop/java.awt.Container.processEvent(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

I have not tested this functionality from the source code directly, only running the demo application.

softwaremagico avatar Mar 25 '24 08:03 softwaremagico