User 366e966a35
22-01-2014 09:52:46
Hello!
I receive an error trying to index a H2 molecule with the JChem Cartridge v6.1.4. The file with the molecule is in the attachment, the stacktrace of the error is:
[RMI TCP Connection(36)-127.0.0.1/74]: 2014-01-22 13:39:54.786 chemaxon.jchem.cartridge.rmi.impl.MolSearchImpl targetStringToMol
SEVERE: Offending structure: '[B@10304d3'
chemaxon.formats.MolFormatException: Cannot read molecule file.
at chemaxon.formats.MolInputStream.init(MolInputStream.java:146)
at chemaxon.formats.MolInputStream.<init>(MolInputStream.java:115)
at chemaxon.formats.MolInputStream.<init>(MolInputStream.java:57)
at chemaxon.util.MolHandler.importMol(MolHandler.java:672)
at chemaxon.util.MolHandler.setMolecule(MolHandler.java:179)
at chemaxon.util.MolHandler.<init>(MolHandler.java:111)
at chemaxon.jchem.cartridge.rmi.impl.MolSearchImpl.targetStringToMol(MolSearchImpl.java:277)
at chemaxon.jchem.cartridge.rmi.impl.MolSearchImpl.search(MolSearchImpl.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: chemaxon.formats.MolFormatException: Cannot recognize format (?)
Unrecognized file contents:
at chemaxon.formats.recognizer.RecognitionSubsystem.getFormat(RecognitionSubsystem.java:219)
at chemaxon.formats.MolInputStream.initTextFormat(MolInputStream.java:315)
at chemaxon.formats.MolInputStream.init(MolInputStream.java:135)
... 22 more
[RMI TCP Connection(36)-127.0.0.1/74]: 2014-01-22 13:39:54.786 chemaxon.jchem.cartridge.rmi.impl.RmiExceptionHandler handleError
SEVERE: Invalid target: Cannot read molecule file.
chemaxon.jchem.cartridge.sharedorajcsrv.rmi.StructureFormatException: Invalid target: Cannot read molecule file.
at chemaxon.jchem.cartridge.rmi.impl.MolSearchImpl.search(MolSearchImpl.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Thank you.
ChemAxon abe887c64e
22-01-2014 10:14:20
Hello Leonid,
This structure below is an invalid structure. What does it want to represent?
Offending structure: '[B@10304d3'
Krisztina
User 366e966a35
22-01-2014 11:14:34
Hello Krisztina,
I guess the output we see is a call to toString() for some byte array happening somewhere inside JChem so I don't know what it is. What I try to index is the structure attached to the original post.
Thank you.
ChemAxon abe887c64e
22-01-2014 12:58:13
Hello Leonid,
Could you send us all the parameters of the index creation including the applied standardization actions?
Thank you
Krisztina
User 2cf84152df
28-01-2014 12:44:01
Hello Krisztina,
I'll be a follow-up to Leonid on this issue. This is how we create our structure table (CRP_STRUCTURE):
Execute JChem_Table_Pkg.Create_JCTable('CRP_STRUCTURE',
'JCHEMPROPERTIES', 16, 2, 6, ', MOLFILE CLob', Null, 1, 'tableType:molecules');
and its index:
Create Index IDX_CRP_STRUCTURE On CRP_STRUCTURE(CD_STRUCTURE) IndexType
Is JCHEM..JC_IdxType;
We issue the following command to insert into this table (our JChem user is ELN_JCHEM):
JChem_Table_Pkg.JC_Insert(
'Select CONVERSION_BLOB.CNV_OBJECT' ||
' From CONVERSION_BLOB' ||
' Where CONVERSION_BLOB.CNV_ID = ' || in_UserSession
, 'ELN_JCHEM..CRP_STRUCTURE'
, Null
, 'true', 'false'
, 'flags:c haltOnBadFormat:n'
);
Does this help in any way?
Thank you,
Vitaly
ChemAxon abe887c64e
29-01-2014 12:56:51
Hi Vitaly,
We've tracked down this issue and have now the following assumptions:
- In your original standard structure table, there is at least one non-valid chemical structure.
- when this table was indexed with haltOnError:n (or nf) or haltOnBedFormat:n parameter, the non-valid structure was also indexed, and in the index table, its cd_hash field was filled with '0' value.
- the cd_hash value of H2 molecule is also '0'
- when you try to insert H2 molecule using the 'duplicate filtering' option, in the background a duplicate search runs through the index table; during this search the content of the cd_hash field is also compared
- in case of the H2 molecule and the stored non-valid structure a conflict is generated because hashmarks are the same and the molecules are not
At present, our software is not prepared for such situations, we only can recommend not to use duplicate filtering and haltOnError:n (nf) or haltOnBedformat:n parameters at same time.
Best regards,
Krisztina
User 2cf84152df
29-01-2014 13:06:18
Hello Krisztina,
Is it possible that adding a no-structure molecule can cause this problem? Currently we are reproducing it starting with a clean database, adding a no-structure and after that adding H2.
Thank you,
Vitaly
ChemAxon abe887c64e
29-01-2014 13:33:37
Hi Vitaly,
Empty structure (no-structure) has also '0' as hash value, but - at least at JChem level - this case is handled and H2 can be imported into a JChem table containing empty structures and bearing 'filter out duplicate structures' table setting. We'll check now how does JChem Cartridge handle this case.
Krisztina
ChemAxon abe887c64e
29-01-2014 14:47:51
Hi Vitaly,
Unfortunately, at the moment it is really not possible to insert H2 molecule into a JChem table using
jchem_table_pkg.jc_insert
function of JChem Cartridge. It seems to be bug that will be registered, and later planned when to be fixed.
Until then, we suggest to use directly JChem for importing H2 molecule into JChem tables (e.g. JChem Manager GUI).
Best regards,
Krisztina
User 2cf84152df
29-01-2014 15:01:02
Hi Krisztina,
Thank you very much for investigating this issue, we'll be keeping an eye on JChem updates.
Vitaly
ChemAxon 25dcd765a3
02-02-2015 14:37:12
Hi Vitaly,
Unfortunately, we have not fixed this issue yet and it is likely that we will not have time to fix it. (On the other hand it seems that not much people registering H2 molecule in their database.)
So, if you have resolved this issue with a workaround I would remove this issue from our bug tracking system.