Insert failed: "Some features .. cannot be converted to..."

User a7faa21887

22-11-2011 15:48:39

Hi, all


We use JChem 5.7.0.0 in 11.2.0.3 RAC Database (x86_64)


While importing structure in attachment we've got such error message:


ORA-29532: Java call terminated by uncaught Java exception: 
java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
java.rmi.RemoteException:
Some features of
[#6]CC1=CC(CC2=CC(C[#6])=CC(C[#133])=C2O)=C(O)C(C[#133])=C1 cannot be
converted to the given format. Try mrv format.
ORA-06512: at "JCHEM_DEVEL.JCHEM_CLOB_PKG", line 187
ORA-06512: at "JCHEM_DEVEL.MOLCONVERTC_FUNCC", line 23
ORA-06512: at "DEVEL.JCHEM_SERVICE", line 471
ORA-06512: at line 1


Pavel


 

User a7faa21887

22-11-2011 16:53:49

And the same problem occured with "multicenter" structure.


Pavel

ChemAxon aa7c50abf8

23-11-2011 01:24:12

Hi Pavel,


From the PL/SQL stack trace, it appears that it is during a call to JC_MOLCONVERT that you're getting this error. Is this correct? What is the exact SQL statement which results in the error?


Thanks


Peter

User a7faa21887

23-11-2011 06:11:42










pkovacs wrote:

Hi Pavel,


From the PL/SQL stack trace, it appears that it is during a call to JC_MOLCONVERT that you're getting this error. Is this correct? What is the exact SQL statement which results in the error?


Thanks


Peter



Yes, Peter.


It's just:


insert into chem_structs (unit_id, structure)
values (p_ID,  jc_molconvert(p_Structure, 'MOL');

call. Table chem_structs has JChem index with parameters structureType=anyStructure,fp_size=32,fp_bit=2,pat_length=6,duplicateFiltering=n.




ChemAxon 9c0afc9aaf

23-11-2011 09:00:11

Hi,


Not all file formats are capable of storing all molecular features (per definition).


SMILES is one of the formats with the most limitation.


In this case we throw an exception to prevent undectected and unintentional information loss.


 


 


Some features of 

[..] cannot be

converted to the given format. Try mrv format.

 


If you would like to avoid this problem for any kind of molecules, I suggest to use the Marvin Document format ("mrv"), this format can store all the features of all supported formats.


Regarding the SQL statement:



insert into chem_structs (unit_id, structure)
values (p_ID,  jc_molconvert(p_Structure, 'MOL');


This should not throw any exception for attached structures as the features can be described in "mol" format - in fact the input is in mol format as well.


Are you sure you are getting an exception in jc_molconvert even for 'MOL' format  too ? Can you double check ?


Or only for "smiles" format as indicated by the topic title? (which is normal)


We are a bit confused here.

User a7faa21887

23-11-2011 12:31:54

Oops.


Sorry, the issue is related to convertion into MOL. It was just suggestion about SMILES.


Pavel

ChemAxon aa7c50abf8

23-11-2011 13:25:50

Hi Pavel,


I can't reproduce the problem using a simple test case and the Phenol formaldehyde polymer you uploaded. I need therefore to figure out which factor in your environment triggers the problem.


insert into chem_structs (unit_id, structure)
values (p_ID,  jc_molconvert(p_Structure, 'MOL');

The final closing parenthesis is missing in the above SQL, correct? Has this INSERT been perhaps cut out of a larger statement? (I got suspicious... )


What type is the CHEM_STRUCTS.STRUCTURE column?


How do you provide the p_Structure parameter (which is, in the first case, Phenol formaldehyde polymer, correct?)? Using the DBMS_LOB package? If p_Structure is a PL/SQL variable, what type is it?


Thanks


Peter

User a7faa21887

23-11-2011 16:39:35










pkovacs wrote:

Hi Pavel,


I can't reproduce the problem using a simple test case and the Phenol formaldehyde polymer you uploaded. I need therefore to figure out which factor in your environment triggers the problem.


insert into chem_structs (unit_id, structure)
values (p_ID,  jc_molconvert(p_Structure, 'MOL');

The final closing parenthesis is missing in the above SQL, correct? Has this INSERT been perhaps cut out of a larger statement? (I got suspicious... )


What type is the CHEM_STRUCTS.STRUCTURE column?


How do you provide the p_Structure parameter (which is, in the first case, Phenol formaldehyde polymer, correct?)? Using the DBMS_LOB package? If p_Structure is a PL/SQL variable, what type is it?


Thanks


Peter



1. missing right parenthesus is mistype - that's whole SQL. Also we've tried not use jc_molconvert in values (). There are both statements that returns the error in our workarea:


        INSERT INTO chem_structs (unit_id, structure)
        VALUES (p_ChemID, p_Struct);


        INSERT INTO chem_structs (unit_id, structure)
        VALUES (p_ChemID, jc_molconvert(p_Struct, 'MOL'));



2. CHEM_STRUCTS.STRUCTURE column datatype is CLOB


3.Specification of import procedure is:


procedure import_chem (
    p_ChemID integer,
    p_Struct clob,

    ...


4. we don't use DBMS_LOB in this method.


Hope it will help.


Pavel

ChemAxon aa7c50abf8

23-11-2011 17:28:22

Many thanks, Pavel, for this.


Do I understand it correctly that the problem occurs even without the jc_molconvert call in



        INSERT INTO chem_structs (unit_id, structure)
        VALUES (p_ChemID, p_Struct);


? Is the error message any differrent (including the PL/SQL stack trace) with the SQL above (without the jc_molconvert call) from the error message of the original SQL (with jc_molconvert)?


Also, this time, I think, a Java stack trace should be generated in jchem/cartridge/logs. Please, could you have a look to see if there are any entries at "SEVERE" level (and with "Try mrv format" in particular)?


Thank you,


Peter

User a7faa21887

01-12-2011 14:54:31

Hi, Peter.


Unfortunally, I found that there is a wrong testcase (this issue was not investigated by me).


But now I've found real cause of the issue:


There is a some update for table with SMILES value of structure, which generates by simple SELECT:


SELECT jc_molconvert(structure, 'SMILES') as smiles, ... 
FROM chem_structs WHERE unit_id = p_ChemID;


MOLs, that I attached to this post before are in the chem_structs table, and jc_molconvert(structure, 'SMILES') for these structures failes with error:


[RMI TCP Connection(25)-10.226.14.84/16]: 2011-12-01 08:47:57.835 chemaxon.jchem.cartridge.rmi.impl.RmiExceptionHandler handleError
SEVERE:
Some features of [#6]CC1=CC(CC2=CC(C[#6])=CC(C[#133])=C2O)=C(O)C(C[#133])=C1 cannot be converted to the given format. Try mrv format.
chemaxon.marvin.io.MolExportException:
Some features of [#6]CC1=CC(CC2=CC(C[#6])=CC(C[#133])=C2O)=C(O)C(C[#133])=C1 cannot be converted to the given format. Try mrv format.
        at chemaxon.marvin.io.formats.smiles.SmilesExport.throwMolExportException(SmilesExport.java:6149)
        at chemaxon.marvin.io.formats.smiles.SmilesExport.toSMILES(SmilesExport.java:845)
        at chemaxon.marvin.io.formats.smiles.SmilesExport.convert(SmilesExport.java:717)
        at chemaxon.formats.MolExporter.write(MolExporter.java:759)
        at chemaxon.formats.MolConverter.write(MolConverter.java:1207)
        at chemaxon.formats.MolConverter.convert0(MolConverter.java:1080)
        at chemaxon.formats.MolConverter.convert(MolConverter.java:933)
        at chemaxon.jchem.interop.InteropMiscellanious.convertBytes(InteropMiscellanious.java:739)
        at chemaxon.jchem.interop.InteropMiscellanious.convertBytes(InteropMiscellanious.java:720)
        at chemaxon.jchem.interop.InteropMiscellanious.molconvert(InteropMiscellanious.java:609)
        at chemaxon.jchem.cartridge.rmi.impl.MiscellaniousImpl.molconvertb(MiscellaniousImpl.java:211)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)


Sorry, for waste your time before.


Pavel


P.S. It's also failed with molconvert.

ChemAxon aa7c50abf8

02-12-2011 12:16:02

Hi Pavel,


Thank you for the clarification. The same behaviour can be reproduced with the molconvert command line tool:


C:\Users\pkovacs\chemaxon\packages\jchem-5.7.0\cartridge>..\bin\molconvert smiles "C:\Users\pkovacs\chemaxon\work\trunk\jchem\test\cartridge\groovy\src\jc3167\Phenol formaldehyde polymer.mol"

C:\Users\pkovacs\chemaxon\work\trunk\jchem\test\cartridge\groovy\src\jc3167\Phenol formaldehyde polymer.mol: cannot convert molecule 1 to smiles:

Some features of [#6]CC1=CC(CC2=CC(C[#6])=CC(C[#133])=C2O)=C(O)C(C[#133])=C1 cannot be converted to the given format. Try mrv format.

I am moving this topic to "Structure representation: molecule handling and file formats" where experts can decide, if this is the intended behaviour.


Peter

ChemAxon 25dcd765a3

03-12-2011 11:43:39

Hi Pavel,


SRU polymers cannot be represented in SMILES and not even in SMARTS.


However we have implemented an export option rigorousness which enables one to export this molecule to SMILES with the loss of SRU sgroup information.


molconvert smiles:r1 ~/Downloads/Phenol\ formaldehyde\ polymer.mol
CCC1=CC(CC2=CC(CC)=CC(C
  • )=C2O)=C(O)C(C
  • )=C1

I hope this helps


Andras

User a7faa21887

08-12-2011 12:21:07










volfi wrote:

Hi Pavel,


SRU polymers cannot be represented in SMILES and not even in SMARTS.


However we have implemented an export option rigorousness which enables one to export this molecule to SMILES with the loss of SRU sgroup information.


molconvert smiles:r1 ~/Downloads/Phenol\ formaldehyde\ polymer.mol
CCC1=CC(CC2=CC(CC)=CC(C
  • )=C2O)=C(O)C(C
  • )=C1

I hope this helps


Andras



Thanks a lot, Andras