I have three machines set up as follows:
- CompA: Running Oracle server 10.2.0.3
- CompB: Running Oracle server 10.2.0.4 and my client code
- CompC: Running client code only
On the client code on both CompB and CompC, connecting to either Oracle DB works flawlessly using the Thin driver.
I am trying to connect to each Oracle DB from the client code through the OCI driver using
Connection conn = DriverManager.getConnection('jdbc:oracle:oci:username/pass@sid');
From inside of a Java class that is running in jboss. This works just fine on CompB, but causes the JVM running Jboss to core dump every time on CompC.
CompC can connect to both Oracle servers using Sql*Plus and the same tnsnames.ora file that jboss is trying to reference.
Here is a portion of the stack trace. It appears to be consistent each and every time.
Stack: [0x30fcc000,0x3101d000), sp=0x3101a868, free space=314k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x2d02d6] C [libocijdbc10.so+0x585c] C [libocijdbc10.so+0x70a8] Java_oracle_jdbc_driver_T2CConnection_t2cCreateState+0x15c j oracle.jdbc.driver.T2CConnection.t2cCreateState([BI[BI[BI[BISI[S[B[B)I+0 j oracle.jdbc.driver.T2CConnection.logon()V+551 j oracle.jdbc.driver.PhysicalConnection.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;Loracle/jdbc/driver/OracleDriverExtension;)V+381 j oracle.jdbc.driver.T2CConnection.(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;Loracle/jdbc/driver/OracleDriverExtension;)V+10 j oracle.jdbc.driver.T2CDriverExtension.getConnection(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+67 j oracle.jdbc.driver.OracleDriver.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+831 j java.sql.DriverManager.getConnection(Ljava/lang/String;Ljava/util/Properties;Ljava/lang/ClassLoader;)Ljava/sql/Connection;+210 j java.sql.DriverManager.getConnection(Ljava/lang/String;)Ljava/sql/Connection;+15
Does anyone know what's going wrong here?
UPDATE: For clarification, "client", as used above refers to my java code running in a jboss instance. The only Oracle libraries that should be found in the LD_LIBRARY_PATH that jboss is started with are libocijdbc10.so libclntsh.so.10.1 and libnnz10.so. These three libraries and the jboss server itself are in source control, so they are the same versions on both CompB and CompC.
CompB can connect, using OCI and thin, to both CompA and CompB. CompC cannot connect using OCI, but can connect using thin, to both CompA and CompB, so it shouldn't be a server version issue.
Both CompB and CompC are running 32-bit Ubuntu 8.04, though CompC has a slightly slower CPU and only 1GB of RAM, compared to 3.25GB RAM on CompB.