1 Reply Latest reply on Jul 5, 2007 3:43 PM by Thai Dang Vu

    Unable to use OracleDS in Tomcat 6.0.13 with embedded jboss

    Thai Dang Vu Apprentice

      First, I'd like to thank wesleyhales about his answer to my previous post (http://www.jboss.com/index.html?module=bb&op=viewtopic&t=112637 Java 1.5 must be used to run tomcat 6.0 with embedded jboss).

      I copied the oracle-ds.xml from jboss-4.2.0.GA\docs\examples\jca, put it in tomcat-6.0.13-embedded-jboss\lib\deploy and errors occured

      Using CATALINA_BASE: C:/Java/tomcat-6.0.13-embedded-jboss
      Using CATALINA_HOME: C:/Java/tomcat-6.0.13-embedded-jboss
      Using CATALINA_TMPDIR: C:/temp
      Using JRE_HOME: C:/jdk1.5.0_12
      Jul 5, 2007 11:34:07 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: An older version 1.1.8 of the Apache Tomcat Native library is installed, w
      hile Tomcat recommends version greater then 1.1.10
      Jul 5, 2007 11:34:07 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: Loaded Apache Tomcat Native library 1.1.8.
      Jul 5, 2007 11:34:07 AM org.apache.catalina.core.AprLifecycleListener init
      INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], r
      andom [true].
      Jul 5, 2007 11:34:08 AM org.apache.coyote.http11.Http11AprProtocol init
      INFO: Initializing Coyote HTTP/1.1 on http-9393
      Jul 5, 2007 11:34:08 AM org.apache.coyote.ajp.AjpAprProtocol init
      INFO: Initializing Coyote AJP/1.3 on ajp-8009
      Jul 5, 2007 11:34:08 AM org.apache.catalina.startup.Catalina load
      INFO: Initialization processed in 1279 ms
      WARN 05-07 11:34:10,334 (UnifiedLoaderRepository3.java:addClassLoader:675) -Tr
      ied to add non-URLClassLoader. Ignored
      WARN 05-07 11:34:12,224 (TxControl.java:<clinit>:266) -[com.arjuna.ats.arjuna.
      coordinator.TxControl_1] - Name of XA node not defined. Using a0000e7:915:468d0f
      74:0
      WARN 05-07 11:34:16,349 (JDBCPersistenceManager.java:start:143) -
      
      JBoss Messaging Warning: DataSource connection transaction isolation should be R
      EAD_COMMITTED, but it is currently NONE.
       Using an isolation level less strict than READ_COMMITTE
      D may lead to data consistency problems.
       Using an isolation level more strict than READ_COMMITTE
      D may lead to deadlock.
      
      java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
       at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.RuntimeException: org.jboss.deployers.spi.IncompleteDeploym
      entException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS
      ):
      
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual Stat
      e}
      
      jboss.jdbc:datasource=OracleDS,service=metadata
       -> jboss.jdbc:service=metadata{Create:** NOT FOUND **}
       -> jboss.jdbc:service=metadata{Start:** NOT FOUND **}
      
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.jdbc:service=metadata -> ** NOT FOUND **
      
      
       at org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener.innerStart(E
      mbeddedJBossBootstrapListener.java:82)
       at org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener.lifecycleEve
      nt(EmbeddedJBossBootstrapListener.java:55)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
      eSupport.java:117)
       at org.apache.catalina.core.StandardServer.start(StandardServer.java:703
      )
       at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
       ... 6 more
      Caused by: org.jboss.deployers.spi.IncompleteDeploymentException: Summary of inc
      omplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual Stat
      e}
      
      jboss.jdbc:datasource=OracleDS,service=metadata
       -> jboss.jdbc:service=metadata{Create:** NOT FOUND **}
       -> jboss.jdbc:service=metadata{Start:** NOT FOUND **}
      
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.jdbc:service=metadata -> ** NOT FOUND **
      
      
       at org.jboss.embedded.Bootstrap.checkIncomplete(Bootstrap.java:144)
       at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:169)
       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:201)
       at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:214)
       at org.jboss.embedded.tomcat.EmbeddedJBossBootstrapListener.innerStart(E
      mbeddedJBossBootstrapListener.java:76)
       ... 10 more


      This is that oracle-ds.xml file (which runs well in jboss 4.2.0.GA)
      <datasources>
       <local-tx-datasource>
       <jndi-name>OracleDS</jndi-name>
       <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
       <driver-class>oracle.jdbc.OracleDriver</driver-class>
       <user-name>seam</user-name>
       <password>seam</password>
       <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      
       <metadata>
       <type-mapping>Oracle9i</type-mapping>
       </metadata>
       </local-tx-datasource>
      
      </datasources>
      
      My environment: XP SP2, tomcat 6.0.13, Java 1.5.0_12, Oracle 10g Express Edition.
      Is there any way I can use Oracle datasource in embedded jboss?

        • 1. Re: Unable to use OracleDS in Tomcat 6.0.13 with embedded jb
          Thai Dang Vu Apprentice

          Solution: (you can look at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106935 for more details)
          - create a jboss-ds.xml in tomcat\lib\deploy

          <?xml version="1.0" encoding="UTF-8"?>
          <datasources>
           <local-tx-datasource>
           <jndi-name>OracleDS</jndi-name>
           <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
           <driver-class>oracle.jdbc.OracleDriver</driver-class>
           <user-name>seam</user-name>
           <password>seam</password>
           <min-pool-size>1</min-pool-size>
           <max-pool-size>10</max-pool-size>
           <idle-timeout-minutes>0</idle-timeout-minutes>
           <prepared-statement-cache-size>32</prepared-statement-cache-size>
           </local-tx-datasource>
          </datasources>

          - and .... that's it. And because I'm learning seam, the persistence.xml looks like
          <?xml version="1.0" encoding="UTF-8"?>
          <persistence xmlns="http://java.sun.com/xml/ns/persistence"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
           version="1.0">
          
           <persistence-unit name="userDatabase">
           <provider>org.hibernate.ejb.HibernatePersistence</provider>
           <jta-data-source>java:/OracleDS</jta-data-source>
           <properties>
           <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
           <property name="hibernate.show_sql" value="true" />
           <property name="hibernate.format_sql" value="true" />
           <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect" />
           </properties>
           </persistence-unit>
          
          </persistence>
          
          I'm not sure if the hibernate.dialect property is needed (you can try without it).