[jboss-user] [JCA/JBoss] - Problem in acessing Oracle data Source from JBoss 4

jsbhangra do-not-reply at jboss.com
Thu May 17 06:14:07 EDT 2007


Hello,

I am trying to access Oracle data source in Jboss from a struts based web application. For doing this I have done the following:

i am using Oracle 10g Express edition.

(1) Copied the thin oracle driver (ojdbc14.jar) in server\default\lib directory of
JBOSS_HOME.

(2) Copied the oracle-ds.xml file from docs\examples\jca directory of JBOSS_HOME to
server\default\deploy of JBOSS_HOME.
which is :

  <local-tx-datasource>
    <jndi-name>oracleDS</jndi-name>
    <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
   <user-name>uname</user-name>
    pwd
 
      <type-mapping>OracleXE</type-mapping>
    
  </local-tx-datasource>



(3) Next I have changed the default standardjaws.xml. I have changed the data source
name and its type-mapping to OracleXE.

i added type mapping for Oracle XE simply copeing the content of whole oracle 8 type mapping and just changed its name to OracleXE 

java:/oracleDS
  <type-mapping>OracleXE</type-mapping>
  false
  <default-entity>
    <create-table>true</create-table>
    <remove-table>false</remove-table>
    <tuned-updates>true</tuned-updates>
    <read-only>false</read-only>
    <time-out>300</time-out>
    <row-locking>false</row-locking>
    <read-ahead>false</read-ahead>
  </default-entity>



(4) I have changed standardjbosscmp-jdbc.xml file also.


(5) I have put an entry in login-config.xml file also. 


But when i deploy my application 
these are the excpetions i get in my server log :---

Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver

Could not create deployment: ile:/usr/local/jboss-4.0.5.GA/server/default/deploy/oracle-ds.xml

please help me out..  i am unable to  figure out the problem.

some more desciptive  server log dump :
14:05:45,430 INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=oracleDS' to JNDI name 'java:oracleDS'
14:05:45,512 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: oracle.jdbc.driver.OracleDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver))
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:565)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:250)


rg.jboss.resource.JBossResourceException: Failed to register driver for: oracle.jdbc.driver.OracleDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getDriver(LocalManagedConnectionFactory.java:287)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:170)
        ... 122 more
Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver
        at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:306)

44 ERROR [GeneralPurposeDatabasePersistencePlugin] Cannot create timer table
org.jboss.deployment.DeploymentException: Error while checking if table aleady exists TIMERS; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: oracle.jdbc.driver.OracleDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver)); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Failed to register driver for: oracle.jdbc.driver.OracleDriver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: oracle.jdbc.driver.OracleDriver))))
        at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.tableExists(SQLUtil.java:1040)
        at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.createTableIfNotExists(GeneralPurposeDatabasePersistencePlugin.java:112)
        at org.jboss.ejb.txtimer.DatabasePersistencePolicy.startService(DatabasePersistencePolicy.java:95)
        at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)

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

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



More information about the jboss-user mailing list