Reputation: 321
I have moved my project into my webapps directory under the tomcat 6.0 directory and am running this under the updated url using port 8080. Has anyone ever seen this error?
**java.lang.UnsatisfiedLinkError: Native Library D:\oracle\product\10.2.0\client_1\BIN\ocijdbc10.dll already loaded in another classloader**
java.lang.ClassLoader.loadLibrary0(Unknown Source)
java.lang.ClassLoader.loadLibrary(Unknown Source)
java.lang.Runtime.loadLibrary0(Unknown Source)
java.lang.System.loadLibrary(Unknown Source)
oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3147)
java.security.AccessController.doPrivileged(Native Method)
oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3143)
oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
I am curious to find out what the first line of this stack trace is. What does this mean? Please let me know if more information is required from my program. Thank you in advance. Sonny
Upvotes: 0
Views: 99
Reputation: 321
Hello all I solved my own issue. I had to change the path of the oracle database to a jdbc thin client url as opposed to directly connecting to the oracle database. originally I was using the statement: intfdb.JDBCOCIDRV=jdbc:oracle:oci:@GPSTRKPD.na.jnj.com to connect which was causing the error. I change my statement to: jdbc:oracle:thin:@psgtwp0.na.jnj.com:1531:gpstrkpd and it works fine now. Thanks for all of your input. Sonny
Upvotes: 0
Reputation: 7988
As error saying - you can not load dll lirary from two separate class loaders
. Most likely you have two separate Web Applications using connection to Oracle.
Please try to move oracle library jar to Tomcat shared/lib
folder, so library will be loaded only once by Tomcat Common Class Loader.
Upvotes: 1