6 Replies Latest reply on Feb 9, 2009 8:10 AM by Rafael Cunha

    [ Configuring datasource to connect to Oracle RAC - JBOSS 5

    Rafael Cunha Newbie

      Hi,

      I'm trying to define a XA DataSource to connect to Oracle RAC on JBoss 5.0.0.GA running JAVA 5 using the Oracle 10g driver for JAVA 5.

      Here is the content of my datasource-xa-ds.xml file:


      <xa-datasource>
      <jndi-name>kernelDS</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:@riodb12.globoi.com:1121:CADQA1</xa-datasource-property-->
      <xa-datasource-property name="URL">
      jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no02.globoi.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no01.globoi.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no03.globoi.com)(PORT = 1521))
      (FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SRV_CAD_ISP)))
      </xa-datasource-property>
      <xa-datasource-property name="User">myuser</xa-datasource-property>
      <xa-datasource-property name="Password">mypass</xa-datasource-property>
      <!-- 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 -->

      <track-statements>true</track-statements>
      <prepared-statement-cache-size>100</prepared-statement-cache-size>

      <min-pool-size>5</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <blocking-timeout-millis>30000</blocking-timeout-millis>
      <new-connection-sql>select count(0) from dual</new-connection-sql>
      <check-valid-connection-sql>select count(0) from dual</check-valid-connection-sql>
      <idle-timeout-minutes>0</idle-timeout-minutes>

      <no-tx-separate-pools/>
      </xa-datasource>


      I am using ojdbc14.jar for JAVA 4/5 Oracle 10g.

      When my app tries to get a new connection the following error occurs:

      16:48:45,186 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: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.set(FAILOVER(java.lang.String)))
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
      at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
      at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
      at com.globo.coreisp.model.dao.DatasourceDAOFactory.getConnection(DatasourceDAOFactory.java:64)
      at com.globo.coreisp.model.mapper.finder.Finder.busca(Finder.java:159)
      at com.globo.coreisp.model.mapper.cobranca.MeioPagamentoMapper.buscaPorVarios(MeioPagamentoMapper.java:264)
      at com.globo.coreisp.model.factory.MeioPagamentoFactory.buscaDTOsPorVarios(MeioPagamentoFactory.java:115)
      at com.globo.coreisp.model.facade.GerenciadorAssinaturasFacade.buscaMeiosPagamentoDTO(GerenciadorAssinaturasFacade.java:3371)
      at com.globo.coreisp.model.facade.GerenciadorAssinaturasFacade.cadastraAssinatura(GerenciadorAssinaturasFacade.java:755)
      at com.globo.coreisp.controller.commands.CmdCadastraAssinaturaSrv.processaAgora(CmdCadastraAssinaturaSrv.java:124)
      at com.globo.coreisp.controller.CommandExecutorTransactionalBean.execute(CommandExecutorTransactionalBean.java:38)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1029)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:436)
      at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
      at $Proxy122.execute(Unknown Source)
      at com.globo.coreisp.controller.CommandExecutorBean.execute(CommandExecutorBean.java:80)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
      at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
      at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
      at org.jboss.ejb.Container.invoke(Container.java:1029)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
      Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.set(FAILOVER(java.lang.String))
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
      ... 76 more
      Caused by: java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.set(FAILOVER(java.lang.String)
      at java.lang.Class.getMethod(Class.java:1581)
      at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
      ... 77 more

      It seems that JBoss 5 could not parse URL property. Any idea ?

      Thanks.


        • 1. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
          jaikiran pai Master

           

          not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.set(FAILOVER(java.lang.String)))


          Are you sure you are using the correct version of the driver jar? And where have you placed that jar? Also does the driver support the FAILOVER property?

          • 2. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
            Rafael Cunha Newbie

            Hi,

            I am using ojdbc14.jar (1,555,682 bytes) - classes for use with JDK 1.4 and 1.5 that you can get at http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html

            I put this JAR on /server/default/lib.

            I know that it supports FAILOVER beacause I am using this same JAR on a JBOSS 4.0.5 GA installation and it works fine.



            • 3. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
              jaikiran pai Master

               

              <xa-datasource-property name="URL">
              jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=
              (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no02.globoi.com)(PORT = 1521))
              (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no01.globoi.com)(PORT = 1521))
              (ADDRESS = (PROTOCOL = TCP)(HOST = rac66no03.globoi.com)(PORT = 1521))
              (FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SRV_CAD_ISP)))
              </xa-datasource-property>


              There's a problem in the value you have set. I guess newlines are not allowed. Set that property all in one line:

              <xa-datasource-property name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = rac66no02.globoi.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac66no01.globoi.com)(PORT = 1521))(ADDRESS =(PROTOCOL = TCP)(HOST = rac66no03.globoi.com)(PORT = 1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SRV_CAD_ISP)))</xa-datasource-property>


              • 4. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
                Rafael Cunha Newbie

                I put that property all in one line but it didn't work.

                Now I am getting a new error. Here is the new stack:

                09:11:53,413 INFO [DatasourceDAOFactory] Buscando o Datasource
                09:11:53,413 INFO [DatasourceDAOFactory] Datasource [org.jboss.resource.adapter.jdbc.WrapperDataSource@df2ee2] disponÃÂvel;
                09:11:53,434 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: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setJdbc(java.lang.String)))
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:465)
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:409)
                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:611)
                at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:257)
                at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
                at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
                at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
                at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
                at com.globo.coreisp.model.dao.DatasourceDAOFactory.getConnection(DatasourceDAOFactory.java:64)
                at com.globo.coreisp.model.mapper.finder.Finder.busca(Finder.java:159)
                at com.globo.coreisp.model.mapper.cobranca.MeioPagamentoMapper.buscaPorVarios(MeioPagamentoMapper.java:264)
                at com.globo.coreisp.model.factory.MeioPagamentoFactory.buscaDTOsPorVarios(MeioPagamentoFactory.java:115)
                at com.globo.coreisp.model.facade.GerenciadorAssinaturasFacade.buscaMeiosPagamentoDTO(GerenciadorAssinaturasFacade.java:3371)
                at com.globo.coreisp.model.facade.GerenciadorAssinaturasFacade.cadastraAssinatura(GerenciadorAssinaturasFacade.java:755)
                at com.globo.coreisp.controller.commands.CmdCadastraAssinaturaSrv.processaAgora(CmdCadastraAssinaturaSrv.java:124)
                at com.globo.coreisp.controller.CommandExecutorTransactionalBean.execute(CommandExecutorTransactionalBean.java:38)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
                at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
                at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
                at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
                at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
                at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
                at org.jboss.ejb.Container.invoke(Container.java:1029)
                at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:436)
                at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
                at $Proxy122.execute(Unknown Source)
                at com.globo.coreisp.controller.CommandExecutorBean.execute(CommandExecutorBean.java:80)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at org.jboss.invocation.Invocation.performCall(Invocation.java:386)
                at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:228)
                at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:156)
                at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:173)
                at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
                at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:228)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:97)
                at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
                at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
                at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
                at org.jboss.ejb.Container.invoke(Container.java:1029)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:585)
                at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
                at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
                at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
                at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
                at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
                at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
                at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
                at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:549)
                at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
                Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setJdbc(java.lang.String))
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:602)
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)
                ... 76 more
                Caused by: java.lang.NoSuchMethodException: oracle.jdbc.xa.client.OracleXADataSource.setJdbc(java.lang.String)
                at java.lang.Class.getMethod(Class.java:1581)
                at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:572)
                ... 77 more

                Any idea ?
                Thanks.

                • 5. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
                  jaikiran pai Master

                   

                  "rafaelmcunha" wrote:
                  I put that property all in one line but it didn't work.


                  From that stacktrace i will still say, that you haven't added it all on one line without newline character. Please post the exact contents of the -ds.xml.

                  While posting logs or xml content or code, please remember to wrap it in a code block by using the Code button in the message editor window. Please use the Preview button to ensure that your post is correctly formatted.



                  • 6. Re: [ Configuring datasource to connect to Oracle RAC - JBOS
                    Rafael Cunha Newbie

                    You were right. It worked. Thanks a lot.

                    Here is the final xa-ds.xml:

                     <datasources>
                     <xa-datasource>
                     <jndi-name>kernelDS</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:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS = (PROTOCOL = TCP)(HOST = rac04no22.globoi.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac04no23.globoi.com)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = rac04no24.globoi.com)(PORT = 1521))(FAILOVER=on)(LOAD_BALANCE=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SRV_CAD_ISP)))
                     </xa-datasource-property>
                     <xa-datasource-property name="User">xyztr</xa-datasource-property>
                     <xa-datasource-property name="Password">xyztr</xa-datasource-property>
                     <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
                    
                     <track-statements>true</track-statements>
                     <prepared-statement-cache-size>100</prepared-statement-cache-size>
                    
                     <min-pool-size>5</min-pool-size>
                     <max-pool-size>15</max-pool-size>
                     <blocking-timeout-millis>30000</blocking-timeout-millis>
                     <new-connection-sql>select count(0) from dual</new-connection-sql>
                     <check-valid-connection-sql>select count(0) from dual</check-valid-connection-sql>
                     <idle-timeout-minutes>0</idle-timeout-minutes>
                    
                     <no-tx-separate-pools/>
                     </xa-datasource>
                    </datasources>
                    


                    Thanks.