Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#95 Template files missing from jars

closed
5
2012-10-08
2003-09-14
No

The data/templates folder needs moving to the root of
3rd party software which uses the cdk jars. I assume
these files should be included in the jars(?)

If this isn't done then a NPE occurs:

java.lang.NullPointerException
at
org.openscience.cdk.layout.TemplateHandler.loadTemplates(TemplateHandler.java:83)
at
org.openscience.cdk.layout.TemplateHandler.<init>(TemplateHandler.java:72)
at
org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates(StructureDiagramGenerator.java:203)
at
org.openscience.cdk.layout.StructureDiagramGenerator.generateCoordinates(StructureDiagramGenerator.java:290)
...

Discussion

  • Logged In: YES
    user_id=54358

    I implemented a new mechanism now, which is able to
    load templates as a resource stream from a jar file.
    Now the stuff can be used from 3rd party projects without
    unpacking the data/templates dir.