molconvert Malformed input exception when operating on names

User 98d11041ad

08-06-2009 18:26:36

To whom it may concern,


 


I have posted this twice, and the topic seems to disapear consistently.


 


I am attemtpting to use molconvert as instructed by Mr Tobias Kind.


 


and I get the following exception


sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:262)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:
14)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:364

        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:250)
        at java.io.InputStreamReader.read(InputStreamReader.java:212)
        at java.io.BufferedReader.fill(BufferedReader.java:157)
        at java.io.BufferedReader.readLine(BufferedReader.java:320)
        at java.io.BufferedReader.readLine(BufferedReader.java:383)
        at chemaxon.struc.PeriodicSystem.readElements(Unknown Source)
        at chemaxon.struc.PeriodicSystem.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
        at chemaxon.struc.MolAtom.isotopeType(Unknown Source)
        at chemaxon.marvin.modules.GraphInvariants.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:127)
        at chemaxon.marvin.io.formats.smiles.SmilesExport.<clinit>(Unknown Sour
e)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:127)
        at chemaxon.formats.MFileFormat.createExportModule(Unknown Source)
        at chemaxon.formats.MFileFormatUtil.createExportModule(Unknown Source)
        at chemaxon.formats.MolExporter.init(Unknown Source)
        at chemaxon.formats.MolExporter.<init>(Unknown Source)
        at chemaxon.formats.MolConverter.init(Unknown Source)
        at chemaxon.formats.MolConverter.<init>(Unknown Source)
        at chemaxon.formats.MolConverter.createMolConverter(Unknown Source)
        at chemaxon.formats.MolConverter.main(Unknown Source)
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:127)
        at chemaxon.marvin.io.formats.smiles.SmilesExport.<clinit>(Unknown Sour
e)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:127)
        at chemaxon.formats.MFileFormat.createExportModule(Unknown Source)
        at chemaxon.formats.MFileFormatUtil.createExportModule(Unknown Source)
        at chemaxon.formats.MolExporter.init(Unknown Source)
        at chemaxon.formats.MolExporter.<init>(Unknown Source)
        at chemaxon.formats.MolConverter.init(Unknown Source)
        at chemaxon.formats.MolConverter.<init>(Unknown Source)
        at chemaxon.formats.MolConverter.createMolConverter(Unknown Source)
        at chemaxon.formats.MolConverter.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at chemaxon.struc.PeriodicSystem.getElementCount(Unknown Source)
        at chemaxon.struc.PeriodicSystem.readIsotopes(Unknown Source)
        at chemaxon.struc.PeriodicSystem.indexOfIsotope(Unknown Source)
        at chemaxon.struc.MolAtom.isotopeType(Unknown Source)
        at chemaxon.marvin.modules.GraphInvariants.<clinit>(Unknown Source)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
        ... 15 more


While using the following command


/usr/ChemAxon/MarvinBeans/bin/molconvert smiles chemicalnamessample.name


The file is properly UTF-8 encoded


$ file chemicalnamessample.name
chemicalnamessample.name: UTF-8 Unicode text


and it is attached.

ChemAxon e7b9408ca1

09-06-2009 08:34:16

Sorry about the forum and software issues. From the strack trace, I think the problem is not in the input file, but we can confirm that will the following information:


 


please attach the input file (it must have been in your previous posts but not in this one)


output of these three commands:


java -version


locale


echo C | /usr/ChemAxon/MarvinBeans/bin/molconvert smiles


 


Thanks for your collaboration,


 


Daniel


 

ChemAxon e7b9408ca1

23-09-2009 17:58:46

This bug manifested itself on some versions of IBM's JVM (in particular 1.5.0 SR4, but not 1.5.0 SR10 nor 1.6.0 SR5). We fixed it on our side, the fix will appear in all upcoming versions of marvin and jchem, especially 5.2.6 and 5.3.0.