[jboss-user] [Installation, Configuration & Deployment] - packaging ear with datasource and jdbc driver

jyoonyang do-not-reply at jboss.com
Thu Oct 26 21:53:24 EDT 2006


I am having problem properly packaging my ear that includes datasource and  jdbc driver.

Here is my current packaging:

  | mysar.sar
  | mywar.war
  | lib/
  | lib/classes12.jar
  | META-INF/jboss-app.xml
  | my-oracle-ds.xml
  | META-INF/application.xml

  |     <loader-repository>my.app:loader=myear.ear</loader-repository>
  |     <module>
  | 	    <service>mysar.sar</service>    
  |     </module>
  |     <module>
  |         <service>my-oracle-ds.xml</service>
  |     </module>
  | ...

Server starts up ok.  I see datasource created.  However, when I run my app which gets the DB connectino via mywar.war --> mysar.sar, I get ClassNotFoundException of the Oracle driver.

  |         ... 76 more
  | Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
  |         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352)
  |         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
  |         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  |         at java.lang.Class.forName0(Native Method)
  |         at java.lang.Class.forName(Class.java:242)
  |         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:256)

If I add the Oracle driver in the sar, I get a "java.lang.IllegalArgumentException: interface javax.sql.DataSource is not visible from class loader" during startup.

I don't have this issue if I add the driver to <JBOSS_HOME>//lib, but I want all the dependent items packaged in an ear.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981194#3981194

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981194

More information about the jboss-user mailing list