Invalid column index on search

User 9f6f294e9f

18-05-2010 15:58:25

A third party application generated an error whilst carrying out a search against a 5.3.2 index. The jserver log shows:


17-May-2010 21:58:18 chemaxon.jchem.cartridge.rmi.impl.RmiImplUtil handleError
SEVERE: java.util.concurrent.ExecutionException: chemaxon.jchem.db.DatabaseSearchException: An error occurred while searching for
  Marvin  05171021570D


  0  0  0  0  0  0            999 V2000
M  END


The application log had more detail:


....


Caused by: java.sql.SQLException: ORA-29903: error in executing ODCIIndexFetch() routine
ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
 java.rmi.RemoteException: chemaxon.jchem.db.DatabaseSearchException: An error occurred while searching for
  Marvin  05171021570D         


  0  0  0  0  0  0            999 V2000
M  END


WARNING|18-May-2010 02:58:19|com.emax.structureCartridge.manager.StructureManagerImpl$1|run|Unable to perform criteria search.
com.emax.structureCartridge.db.api.StructureDatabaseException: Unable to perform criteria search.
 at com.emax.structureCartridge.db.chemAxon.ChemAxonStructureDb.searchCriteria(ChemAxonStructureDb.java:1039)
 at com.emax.structureCartridge.db.chemAxon.ChemAxonStructureDb.search(ChemAxonStructureDb.java:599)
 at com.emax.structureCartridge.manager.StructureManagerImpl$1.run(StructureManagerImpl.java:434)
 at java.lang.Thread.run(Thread.java:619)
Caused by:
Invalid column index
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 216
ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 746


I don't know what sql was being issued but suspect this must be data specific. Any ideas please ?


Regards


Ant

ChemAxon aa7c50abf8

18-05-2010 19:06:54

Hi Ant,


Is there no Java stack trace in the JChem Server logs? Perhaps, a bit further up or down (a few dozen log lines away) from the message you posted?


Thanks


Peter

User 9f6f294e9f

19-05-2010 08:18:48

Hi Peter


Yes, you are right - sorry, I missed this in my previous post. Here are the details:


Caused by:
Invalid column index
        at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
        at java.util.concurrent.FutureTask.get(Unknown Source)
        at chemaxon.jchem.interop.core.search.QueryHandlerBase.checkAsynchResult(QueryHandlerBase.java:136)
        at chemaxon.jchem.interop.core.search.MultiQueryHandler.getMoreHits(MultiQueryHandler.java:137)
        at chemaxon.jchem.interop.core.search.QueryHandlerBase.getNextHits(QueryHandlerBase.java:147)
        at chemaxon.jchem.cartridge.rmi.impl.scanresult.SearchScan.getNextHits0(SearchScan.java:42)
        at chemaxon.jchem.cartridge.rmi.impl.scanresult.TableScanBaseImpl.getNextHits(TableScanBaseImpl.java:63)
        at chemaxon.jchem.cartridge.rmi.impl.JchemSearchImpl.getNextHits(JchemSearchImpl.java:126)
        at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


I don't think that this is related, but I can also see quite a number of errors like the one that follows in the log. I'm guessing this would be caused by a syntax error in a query ?


17-May-2010 22:05:03 chemaxon.jchem.cartridge.rmi.impl.RmiImplUtil handleError
SEVERE: error: search type: t:nanull
Use -h for help.
java.lang.IllegalArgumentException: error: search type: t:nanull
Use -h for help.
        at chemaxon.sss.search.SearchOptions.setOption(SearchOptions.java:1373)
        at chemaxon.sss.search.JChemSearchOptions.setOption(JChemSearchOptions.java:602)
        at chemaxon.jchem.interop.core.search.SearchOptionsAdapter.setOptions(SearchOptionsAdapter.java:37)
        at chemaxon.jchem.interop.core.search.JChemSearchOptionsAdapter.setOptions(JChemSearchOptionsAdapter.java:30)
        at chemaxon.jchem.cartridge.servlets.search.QueryHandlerCreator.setJChemSearchOption(QueryHandlerCreator.java:187)
        at chemaxon.jchem.cartridge.servlets.search.QueryHandlerCreator.create(QueryHandlerCreator.java:105)
        at chemaxon.jchem.cartridge.rmi.impl.JchemSearchImpl.search(JchemSearchImpl.java:83)
        at chemaxon.jchem.cartridge.rmi.impl.JchemSearchImpl.getHitCount(JchemSearchImpl.java:58)
        at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)


Regards


Ant

ChemAxon aa7c50abf8

20-05-2010 08:46:47


Thank you, Ant, for this additional piece of information!


Based on these pieces, the problem appears to be an internal JChem error: they appear to indicate an inconsistency between the parameters embedded in a SQL statement and the parameters actually supplied for the execution of that statement.


Unfortunately, I am still very much in the dark as to where this error is exactly occurring. Aren't there any other error logs (with associated Java stack trace) about "Invalid column index"? (I expect to find a related Java stack trace in the JChem Server logs containg the string "db.JChemSearch".)


I am somewhat surprised to see an error of this kind (a SQL parameter problem). I've never seen such in JChem and if this is really it (a SQL parameter problem), it most likely occurs in a code portion which is (almost) never executed. (One candidate may be code used for searches on indices not fitting in the structure cache for memory shortage. Aren't there any warnings in the JChem Server logs [or likelier in the JChem Server's standard error, in case you happen to capture it] about "tables" not being cached?)


Thanks


Peter