Multithreaded connections running sql against cartridge

User 9b067d2e85

01-07-2013 18:56:27

Hi


I'm having a bit of a problem running multiple threads (each with their own jdbc connection) deduping mols against a cartridge DB. It works on several of our databases, but one DB in particular throws the following error for any threads above 1 (first thread works, all the others fail).


java.sql.SQLException: ORA-29902: error in executing ODCIIndexStart() routine
ORA-29532: Java call terminated by uncaught Java exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
ORA-06512: at "JCHEM.JCHEM_CORE_PKG", line 89
ORA-06512: at "JCHEM.JC_IDXTYPE_IM", line 298

 


As far as our DBA can tell, all the machines are setup identically.


Oracle environment:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

JChem owner: JCHEM

JChem Server environment:
Java VM vendor: Sun Microsystems Inc.

JCHEM_CORE_PKG.GETENVIRONMENT()
--------------------------------------------------------------------------------
Java version: 1.6.0_18
Java VM version: 16.0-b13
JChem version: 5.12.4
JChem Index version: 5120000
JDBC driver version: 11.1.0.7.0-Production

 


Any ideas?


Thanks!


 

ChemAxon aa7c50abf8

02-07-2013 07:44:52

Hi,


What do you call a "DB"? An Oracle instance? A JChem Cartridge instance?


Is this happening on an Oracle Real Application cluster?


Thank you,


Peter

User 9b067d2e85

02-07-2013 18:39:42

Hi


We have 3 oracle instances (dev/test/prod) all running on their own linux box and on each there is a jchem cartridge installed. 


The above problem only seems to happen on our prod machine. Dev and test work fine (although they are all suppose to be identical).


 


Also, if i step through my code for the first few sql queries, it seems to prevent the errors, but then the queries do not run in parallel. ie. If I have a 1k mol file, and i step through the first 20 mols (jc_compare with smiles), and then continue to run the app as normal, there are no error messages, but it runs at the same speed as 1 thread (a single connection).  On the other machines (dev/test), there is a speed up with multiple threads. 


 


Thanks.

ChemAxon aa7c50abf8

03-07-2013 12:53:52

Would the jchem_core_pkg.use_password procedure not be thread-safe? Hmm looks like its entry point is synchronized... Do you use the jchem_core_pkg.use_password procedure at the beginning of each session, correct?


Peter

User 9b067d2e85

11-07-2013 23:37:57

use_password solved the problem, although I didn't call use_password on any of the other databases.


 


Do you have any guesses about what settings would cause use_password to have to be called?

ChemAxon aa7c50abf8

12-07-2013 08:10:53

Another application using JChem Cartridge, perhaps?


use_password needs (by default) to be called only once per user during the life-time of the JChem Cartridge server -- another application may have called it before yours.


Peter