2 Replies Latest reply on Oct 22, 2007 3:01 AM by Dmitry Vereschchagin

    Issue with Oracle Datasource

    Natalia Reyes Newbie

      Hello People:

      Can anybody help me with this issue?. I have been trying to configure an Oracle Datasource in Jboss Server and I am getting this error:

      17:21:51,078 INFO [Server] Starting JBoss (MX MicroKernel)...
      17:21:51,093 INFO [Server] Release ID: JBoss [WonderLand] 3.2.8.SP1 (build: CVSTag=JBoss_3_2_8_SP1 date=200603031235)
      17:21:51,093 INFO [Server] Home Dir: D:\opt\runawfe-2.0RC6-bin
      17:21:51,093 INFO [Server] Home URL: file:/D:/opt/runawfe-2.0RC6-bin/
      17:21:51,109 INFO [Server] Patch URL: null
      17:21:51,109 INFO [Server] Server Name: default
      17:21:51,109 INFO [Server] Server Home Dir: D:\opt\runawfe-2.0RC6-bin\server\default
      17:21:51,109 INFO [Server] Server Home URL: file:/D:/opt/runawfe-2.0RC6-bin/server/default/
      17:21:51,109 INFO [Server] Server Temp Dir: D:\opt\runawfe-2.0RC6-bin\server\default\tmp
      17:21:51,109 INFO [Server] Root Deployment Filename: jboss-service.xml
      17:21:51,609 INFO [ServerInfo] Java version: 1.5.0_05,Sun Microsystems Inc.
      17:21:51,609 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_05-b05,Sun Microsystems Inc.
      17:21:51,609 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
      17:21:51,953 INFO [Server] Core system initialized
      17:21:54,484 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
      17:21:57,921 INFO [Embedded] Catalina naming disabled
      17:21:58,781 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-localhost%2F127.0.0.1-8080
      17:21:58,781 INFO [Catalina] Initialization processed in 781 ms
      17:21:58,796 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.30
      17:21:58,828 INFO [StandardHost] XML validation disabled
      17:21:58,875 INFO [Catalina] Server startup in 94 ms
      17:22:14,125 ERROR [JBossCacheManager] JBossCacheService to Tomcat clustering not found
      17:22:14,125 ERROR [TomcatDeployer] Failed to setup clustering, clustering disabled
      17:22:14,140 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=Invoker
      jboss.web:service=WebServer

      ObjectName: jboss.mq.destination:service=Topic,name=testTopic
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      ObjectName: jboss.mq.destination:service=Topic,name=securedTopic
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      ObjectName: jboss.mq.destination:service=Topic,name=testDurableTopic
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      ObjectName: jboss.mq.destination:service=Queue,name=testQueue
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      ObjectName: jboss.mq.destination:service=Queue,name=A
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=B
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=C
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=D
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq.destination:service=Queue,name=ex
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq:service=Invoker
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=TracingInterceptor
      jboss:service=Naming
      Depends On Me:
      jboss.mq:service=InvocationLayer,type=HTTP
      jboss.mq:service=InvocationLayer,type=JVM
      jboss.mq:service=InvocationLayer,type=UIL2

      ObjectName: jboss.mq:service=TracingInterceptor
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=SecurityManager
      Depends On Me:
      jboss.mq:service=Invoker

      ObjectName: jboss.mq:service=SecurityManager
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      Depends On Me:
      jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq:service=TracingInterceptor
      jboss.mq.destination:service=Queue,name=DLQ

      ObjectName: jboss.mq.destination:service=Queue,name=DLQ
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager

      ObjectName: jboss.mq:service=InvocationLayer,type=JVM
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=Invoker

      ObjectName: jboss.mq:service=DestinationManager
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=MessageCache
      jboss.mq:service=PersistenceManager
      jboss.mq:service=StateManager
      Depends On Me:
      jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq.destination:service=Queue,name=A
      jboss.mq.destination:service=Queue,name=B
      jboss.mq.destination:service=Queue,name=C
      jboss.mq.destination:service=Queue,name=D
      jboss.mq.destination:service=Queue,name=ex
      jboss.mq:service=SecurityManager
      jboss.mq.destination:service=Queue,name=DLQ

      ObjectName: jboss.mq:service=PersistenceManager
      State: CONFIGURED
      I Depend On:
      jboss.jca:service=DataSourceBinding,name=OracleDS
      Depends On Me:
      jboss.mq:service=DestinationManager

      ObjectName: jboss.mq:service=InvocationLayer,type=UIL2
      State: CONFIGURED
      I Depend On:
      jboss.mq:service=Invoker

      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:service=DataSourceBinding,name=OracleDS
      State: NOTYETINSTALLED
      Depends On Me:
      jboss.mq:service=PersistenceManager


      17:22:14,484 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-localhost%2F127.0.0.1-8080

      I configure orcle-ds.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <!--===================================================================== -->
      <!-- -->
      <!-- JBoss Server Configuration -->
      <!-- -->
      <!-- ===================================================================== -->
      <!-- $Id: oracle-ds.xml,v 1.6 2004/09/15 14:37:40 loubyansky Exp $ -->
      <!-- ==================================================================== -->
      <!-- Datasource config for Oracle originally from Steven Coy -->
      <!-- ==================================================================== -->

      <local-tx-datasource>
      <jndi-name>OracleDS</jndi-name>
      <connection-url>jdbc:oracle:thin:@192.168.137.155:1521:WIMAX</connection-url>
      <!--

      Here are a couple of the possible OCI configurations.
      For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm

      <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>
      or
      <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>

      Clearly, its better to have TNS set up properly.
      -->
      <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
      <user-name>WIMAX_SOA</user-name>
      PASSWORD
      <min-pool-size>5</min-pool-size>
      <max-pool-size>100</max-pool-size>
      <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
      <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
      <!-- Checks the Oracle error codes and messages for fatal errors -->
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
      <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->
      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      <type-mapping>Oracle9i</type-mapping>

      </local-tx-datasource>


      Also I configure standardjbosscmp-jdbc, standardjaws, login-config

      I add : oracle-jdbc3-service, oracledb-jdbc-state-service. I remove hsqldb-jdbc-state-service and hsqldb-jdbc2-service.

      I will appreciate any suggestions.

      Thx

        • 1. Re: Issue with Oracle Datasource
          Dushyant Agarwal Newbie

          Hi,
          I don't have any solution to this
          But I myself have a related problem .
          My server console shows
          NOTYETINSTALLED
          jboss.jca:name=jdbc/DBConnection1DS,service=DataSourceBinding.

          I have used jndi- name=DBConnection1DS in oracle-ds.xml
          and the jta-datasource-name=jdbc/DBConnection1DS in the EJB's
          persistence.xml.

          please help me deploying this EJB...

          • 2. Re: Issue with Oracle Datasource
            Dmitry Vereschchagin Newbie

            Sample below works fine (at least for me: JBoss4.2.1.GA Oracle 10g)

            ...
             <xa-datasource>
             <jndi-name>XAOracleDS</jndi-name>
             <track-connection-by-tx/>
             <isSameRM-override-value>false</isSameRM-override-value>
             <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
             <xa-datasource-property name="URL">jdbc:oracle:thin:@ORA_HOST:1521:ORA_SVC</xa-datasource-property>
             <xa-datasource-property name="User">jboss</xa-datasource-property>
             <xa-datasource-property name="Password">*****</xa-datasource-property>
             <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
             <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
             <!-- Checks the Oracle error codes and messages for fatal errors -->
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
             <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
             <no-tx-separate-pools/>
            
             <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
             <metadata>
             <type-mapping>Oracle9i</type-mapping>
             </metadata>
             <min-pool-size>1</min-pool-size>
             <max-pool-size>10</max-pool-size>
             <blocking-timeout-millis>5000</blocking-timeout-millis>
             <idle-timeout-minutes>2</idle-timeout-minutes>
             </xa-datasource>
            ...