Marvin 5.3.4 NoClassDefFoundError

User 870ab5b546

17-06-2010 03:08:53

I just upgraded to JChem 5.3.4, and I'm getting a new exception.


Jun 16, 2010 10:51:56 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: java.lang.NoClassDefFoundError: Could not initialize class chemaxon.marvin.io.formats.smiles.SmilesImport
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at chemaxon.formats.MFileFormat.createImportModule(Unknown Source)
at chemaxon.marvin.io.MRecordImporter.createImportMod(Unknown Source)
at chemaxon.marvin.io.MRecordImporter.createImportMod(Unknown Source)
at chemaxon.marvin.io.MRecordImporter.<init>(Unknown Source)
at chemaxon.formats.MolImporter.init(Unknown Source)
at chemaxon.formats.MolImporter.<init>(Unknown Source)
at chemaxon.util.ConfigUtils.getMolImporter(Unknown Source)
at chemaxon.util.ConfigUtils.getMolecule(Unknown Source)
at chemaxon.util.ConfigUtils.getQueryMolecule(Unknown Source)
at chemaxon.reaction.ReactorConfiguration.getReactionMolecule(ReactorConfiguration.java:502)
at chemaxon.reaction.ReactorConfiguration.getReaction(ReactorConfiguration.java:689)
at chemaxon.reaction.ReactorConfiguration.getReaction(ReactorConfiguration.java:665)
at chemaxon.reaction.StandardizerConfiguration.read(StandardizerConfiguration.java:163)
at chemaxon.reaction.StandardizerConfiguration.readXML(StandardizerConfiguration.java:112)
at chemaxon.reaction.StandardizerConfiguration.read(StandardizerConfiguration.java:63)
at chemaxon.reaction.StandardizerConfiguration.read(StandardizerConfiguration.java:81)
at chemaxon.reaction.Standardizer.<init>(Standardizer.java:340)
at com.prenhall.epoch.servlets.GroupLoader.loadAppConfig(GroupLoader.java:110)

The relevant Java code is:


            AppConfig.standardizer =
new Standardizer(new File(normalizeConfigFile));

The contents of normalizeConfigFile are:


<?xml version="1.0" encoding="UTF-8"?>
<!-- Standardizer configuration file -->

<StandardizerConfiguration Version ="0.1">
<Actions>
<Transformation ID="S_or_Se_ylide_double"
Structure="[#16,#34;++:1]-[#34,#16,#8,#7,#6;-:2]>>[#16,#34;+:1]=[#34,#16,#8,#7,#6:2]"/>
<Transformation ID="S_or_Se_ylide_double"
Structure="[#16,#34;+:1]-[#34,#16,#8,#7,#6;-:2]>>[#16,#34;0:1]=[#34,#16,#8,#7,#6:2]"/>
<Transformation ID="S_or_Se_ylide_triple"
Structure="[#16,#34;++:1]=[#34,#16,#8,#7,#6;-:2]>>[#16,#34;+:1]#[#34,#16,#8,#7,#6:2]"/>
<Transformation ID="S_or_Se_ylide_triple"
Structure="[#16,#34;+:1]=[#34,#16,#8,#7,#6;-:2]>>[#16,#34;0:1]#[#34,#16,#8,#7,#6:2]"/>
<Transformation ID="N_or_P_or_As_ylide_double"
Structure="[#7,#15,#33;+:1]-[#34,#16,#8,#7,#6;-:2]>>[#7,#15,#33;0:1]=[#34,#16,#8,#7,#6:2]"/>
<Transformation ID="N_or_P_or_As_ylide_triple"
Structure="[#7,#15,#33;+:1]=[#34,#16,#8,#7,#6;-:2]>>[#7,#15,#33;0:1]#[#34,#16,#8,#7,#6:2]"/>
</Actions>
</StandardizerConfiguration>

The code and the configuration file have worked fine in previous versions of JChem, including 5.3.3.

User 870ab5b546

21-06-2010 13:51:25

Any word on this problem or its fix?

ChemAxon e274e1bada

21-06-2010 14:50:54

Hi Bob,


please check if all of the jars are copied from the JChem lib to the servlet container lib directory.
It seems to be some jar files are not in the classpath.


Regards, Edvard

User 870ab5b546

21-06-2010 15:07:43

Just to avoid that problem, since you started dividing JChem into hundreds of individual jar files, our servlet library, WEB-INF/lib, is a symlink to the current jchem/lib directory.  If we need any additional files in our servlet lib directory, we put them in jchem/lib.  It works for JChem 5.3.3.  It does not work for JChem 5.3.4.  What changed?

ChemAxon e274e1bada

22-06-2010 14:07:34

We checked the changes, nothing was changed related the jars between 5.3.3 and 5.3.4
We could have not  reproduced it , so please try to test it with molconvert as well. It would help to narrow the root of the problem.
Another question: have you removed the Tomcat's cache before restart?


Regards, Edvard

User 870ab5b546

22-06-2010 14:12:12

Hm.  I can't reproduce the problem either.  I'll let you know if it happens again.

ChemAxon 7c2d26e5cf

22-06-2010 15:52:32

We could reproduce this NoClassDefFoundError neither with applet nor with jchem.


In applet, chemaxon/marvin/io/formats/smiles/SmilesImport.class is located in marvin/sjars/imageexport.jar.


In jchem, the above class is wrapped in lib/MarvinBeans-formats-smiles.jar.

User 686e68f1f5

19-10-2010 17:24:26

No, the chemaxon/marvin/io/formats/smiles/SmilesImport.class is not in the imageexport.jar file. That is misleading information.That class is in the importexport.jar file.

ChemAxon 7c2d26e5cf

25-10-2010 20:31:58

In the latest release (5.3.8), the SmilesImport.class is located in importexport.jar:


 unzip -l sjars/importexport.jar|grep SmilesImport
    25613  09-03-10 17:01   chemaxon/marvin/io/formats/smiles/SmilesImport.class

The applet classloader retrieves information from META-INF/INDEX.LIST of jmarvin.jar to figure out in which jar the required class can be found. This LIST file also says that SmilesImport.class is importexport.jar.


sjars/importexport.jar
...
chemaxon/marvin/io/formats/smiles/SmilesImport.class

Probably, you use an older version where SmilesImport was still located in another jar. Or deprecated jars may be in your cache.


I recommend to clear Java cache and tries applet loading after that.


How can I clear JRE cache?

User 686e68f1f5

25-10-2010 23:41:40

So why did you say that:


"chemaxon/marvin/io/formats/smiles/SmilesImport.class is located in marvin/sjars/imageexport.jar."

ChemAxon 7c2d26e5cf

26-10-2010 10:13:19

Opps. It is my fault. Sorry! 


Indeed, I have mistyped the jar name in my first comment: I wrote imageexport.jar instead of importexport.jar.


It seems that I did not read carefully your reply to my first comment. When I read it, I did not recognize that you already talk about the correct jar. The name of two jars are very similar that mislead me and I mixed names.


Thanks for the correction. Finally, both you and me have figured out where is the SmilesImport.class, exactly.

User 686e68f1f5

26-10-2010 12:15:53

Great. Thank you for the feedback. I do appreciate the tip on how to clear the JRE cache.