JDBC: UnsatisfiedLinkError
Options
Hi there,
after migrating from Birt Runtime 2.1 to 2.3.0 under JRE 1.6.7 I get the following error using oracle driver for jdbc: UnsatisfiedLinkError, Native Library already loaded in another classloader.
Hope someone could help me out and tell me what goes wrong?
regards
Nash
Here are the details:
Starting platform
Platform started, creating report engine
emitter configured, opening design
emitter configured, Run render task
Design rendered, setting rendet context to html
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver, connectionFactory=org.eclipse.birt.report.data.oda.sampledb.SampleDBJDBCConnectionFactory
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadAndRegisterDriver
INFO: Loading JDBC driver class: oracle.jdbc.OracleDriver
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager findDriver
INFO: Driver class not in class path: oracle.jdbc.OracleDriver. Trying to locate driver in drivers directory
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$DriverClassLoader refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/ojdbc6.jar. URL=bundleentry://39/drivers/ojdbc6.jar
24.07.2008 15:53:40 org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SCHWERWIEGEND: Error happened while running the report.
java.lang.UnsatisfiedLinkError: Native Library C:oracle86product11.1.0client_1BINocijdbc11.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
after migrating from Birt Runtime 2.1 to 2.3.0 under JRE 1.6.7 I get the following error using oracle driver for jdbc: UnsatisfiedLinkError, Native Library already loaded in another classloader.
Hope someone could help me out and tell me what goes wrong?
regards
Nash
Here are the details:
Starting platform
Platform started, creating report engine
emitter configured, opening design
emitter configured, Run render task
Design rendered, setting rendet context to html
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.apache.derby.jdbc.EmbeddedDriver, connectionFactory=null
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadDriverExtensions
INFO: Found JDBC driverinfo extension: driverClass=org.eclipse.birt.report.data.oda.sampledb.Driver, connectionFactory=org.eclipse.birt.report.data.oda.sampledb.SampleDBJDBCConnectionFactory
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager loadAndRegisterDriver
INFO: Loading JDBC driver class: oracle.jdbc.OracleDriver
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager findDriver
INFO: Driver class not in class path: oracle.jdbc.OracleDriver. Trying to locate driver in drivers directory
24.07.2008 15:53:40 org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager$DriverClassLoader refreshURLs
INFO: JDBCDriverManager: found JAR file drivers/ojdbc6.jar. URL=bundleentry://39/drivers/ojdbc6.jar
24.07.2008 15:53:40 org.eclipse.birt.report.engine.api.impl.RunAndRenderTask doRun
SCHWERWIEGEND: Error happened while running the report.
java.lang.UnsatisfiedLinkError: Native Library C:oracle86product11.1.0client_1BINocijdbc11.dll already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
0
Comments
-
Generally this issue seems to be a known problem in Java when trying to load two different version of a native lib or from two different locations.
Birt loads the driver via jdbc.jar located in (birt-runtime-2_3_0)ReportEnginepluginsorg.eclipse.birt.report.data.oda.jdbc_2.3.0.vxxxxxxdrivers
However my application already loaded oracle drivers for it's own purpose.
I tried to get around this problem pointing to the same class under the plugin dir, but this does not solve the problem. My code works only when no jdbc connection is used/opened by my application before birt is called.
I would be interested if anyone make use of native jdbc driver for birt runtime (2.2/2.3) _and_ your application both in the same VM ?
Sincerely,
nash0 -
AFAIK Birt 2.3 uses JNDI data sources, so you should be able to reference your application JNDI data source. No need for driver in the plugins folder.<br />
<br />
You might also want to look at this post, which seemed to indicate the same is possible in Birt 2.2.2<br />
<br />
<a class='bbc_url' href='http://www.birt-exchange.com/forum/showthread.php?t=11407'>http://www.birt-exchange.com/forum/showthread.php?t=11407</a><br />
<br />
Hoping that helps,<br />
Cedric0 -
The other thing you may want to try out in your java code is setting the classloader in the app context, as detailed in this post:<br />
<a class='bbc_url' href='http://www.birt-exchange.com/modules/vbulletin/showthread.php?t=11150&highlight=EngineConfig'>http://www.birt-exchange.com/modules/vbulletin/showthread.php?t=11150&highlight=EngineConfig</a><br />
<br />
This way, you would be using the same classloader as your application, so no conflict should occur between Birt and your app trying to use the same driver.0 -
Hello Cedric,<br />
<br />
thanks for your updates. The idea with the classloader was what I looked for, but it did not help as I still get UnsatisfiedLinkError.<br />
<br />
I followed you link for JNDI:<br />
> <a class='bbc_url' href='http://www.birt-exchange.com/forum/showthread.php?t=11407'>http://www.birt-exchange.com/forum/showthread.php?t=11407</a><br />
but it shows up with error 404. <br />
<br />
Sincerely, nash0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax