I'm trying to create a report component following the example. In the @ShapeMeta of Smiley.java, they have iconPath = "smiley.png"
, and then smiley.png is in resources/images. I've done the same with my png icon, but I'm getting the following FileNotFoundException:
java.io.FileNotFoundException: C:\Users\Tyler\AppData\Roaming\Inductive Automation\Designer Launcher\images\svgicons\status-chart.png.svg (The system cannot find the path specified)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at java.base/sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:453)
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(SAXDocumentFactory.java:357)
at org.apache.batik.anim.dom.SAXSVGDocumentFactory.createDocument(SAXSVGDocumentFactory.java:225)
at org.apache.batik.anim.dom.SAXSVGDocumentFactory.createSVGDocument(SAXSVGDocumentFactory.java:135)
at com.inductiveautomation.ignition.client.icons.SvgIconUtil.getDocument(SvgIconUtil.java:94)
at com.inductiveautomation.ignition.client.icons.SvgIconUtil.getSvgIcon(SvgIconUtil.java:67)
at com.inductiveautomation.ignition.client.icons.SvgIconUtil.getIcon(SvgIconUtil.java:55)
at com.inductiveautomation.ignition.client.icons.SvgIconUtil.getIcon(SvgIconUtil.java:47)
at com.inductiveautomation.ignition.client.icons.SvgIconUtil.getIcon(SvgIconUtil.java:39)
at com.inductiveautomation.reporting.designer.api.DesignerShapeRegistry$ShapeDescriptor.<init>(DesignerShapeRegistry.java:96)
at com.inductiveautomation.reporting.designer.api.DesignerShapeRegistry.register(DesignerShapeRegistry.java:39)
at com.tamakicontrol.designer.TamakiMESDesignerHook.startup(TamakiMESDesignerHook.java:67)
at com.inductiveautomation.ignition.designer.IgnitionDesigner$LoadedModule.startup(IgnitionDesigner.java:1957)
at com.inductiveautomation.ignition.designer.IgnitionDesigner.startupModule(IgnitionDesigner.java:1187)
at com.inductiveautomation.ignition.designer.IgnitionDesigner.lambda$loadProject$9(IgnitionDesigner.java:1009)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at com.inductiveautomation.ignition.designer.IgnitionDesigner.loadProject(IgnitionDesigner.java:1008)
at com.inductiveautomation.ignition.designer.IgnitionDesigner$StartupProjectDialogHandler.lambda$new$2(IgnitionDesigner.java:2021)
at java.base/java.lang.Thread.run(Unknown Source)
14:40:14.923 [Designer-Startup] INFO SvgIconUtil - Unable to find image 'images/svgicons/status-chart.png.svg'
It looks to me like it's searching for the icon in the wrong spot and assuming it's an svg. Has something changed since this example was created?