4 Replies Latest reply on Jan 9, 2003 11:59 AM by David Ward

    Configuring Oracle XA datasource using JBoss3.2.0Beta2

    Manoj Nair Newbie

      Hello All,

      I am trying to setup an Oracle XA datasource using

      JBoss 3.2.0 Beta 2
      Oracle 8.1.7 JDBC Thin Driver

      The following error is shown on the console:

      :00,517 INFO [Server] JBoss (MX MicroKernel) [3.2.0beta2 (build: CVSTag=JB
      _2_0_beta2 date=200211192014)] Started in 1m:43s:286ms
      :31,361 INFO [MainDeployer] Starting deployment of package: file:/Q:/jboss
      0beta2/server/default/deploy/oracle-xa-service.xml
      :31,486 INFO [SARDeployer] looking for nested deployments in : file:/Q:/jb
      .2.0beta2/server/default/deploy/oracle-xa-service.xml
      :31,673 WARN [NestedThrowable] Duplicate throwable nesting of same base ty
      lass org.jboss.deployment.DeploymentException is assignable from: class org
      s.deployment.DeploymentException
      :31,673 ERROR [MainDeployer] could not create deployment: file:/Q:/jboss-3.
      ta2/server/default/deploy/oracle-xa-service.xml
      boss.deployment.DeploymentException: create operation failed for package fi
      :/jboss-3.2.0beta2/server/default/deploy/oracle-xa-service.xml; - nested th
      le: (org.jboss.deployment.DeploymentException: Trying to install an already
      stered mbean: jboss:service=XidFactory)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:283)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:770)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:629)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:594)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      atcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      ner.java:400)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDe
      entScanner.java:619)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      r.java:472)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      n(AbstractDeploymentScanner.java:195)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      AbstractDeploymentScanner.java:206)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      bstractDeploymentScanner.java:185)
      sted throwable:
      boss.deployment.DeploymentException: Trying to install an already registere
      an: jboss:service=XidFactory
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:72)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigura
      ava:168)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java

        • 1. Re: Configuring Oracle XA datasource using JBoss3.2.0Beta2
          Colin Sampaleanu Newbie

          The oracle xa service definition file was bad in JBoss 3.2 beta 2. I found this out, and there was a thread about it in jboss-dev or jboss-user. Igor F. has checked in a new version of oracle-xa-service.xml in the head, but if anybody needs it, they are free to email me for it (colinml1 'at' exis "dot" com).

          Once you have the correct file, configuration is very simple. The jdbc url that is there by default requires the fat driver (e.g. oracle client installed on your machine). Setting things up to use the thin (type 4) driver instead, would use a definition like
          ---
          type="java.lang.String">URL=jdbc:oracle:thin:@tiradev:1521:tira</config-property>
          <config-property name="XADataSourceClass"
          type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property>
          <!--set these only if you want only default type="java.lang.String">oraclepass</config-property>
          ---

          • 2. Re: Configuring Oracle XA datasource using JBoss3.2.0Beta2
            Manoj Nair Newbie

            Hello Colins,

            Thanks for the quick response. The service file was very useful. My Oracle XA datasource is up and running.

            Right now, I am experiencing a different problem when trying to deploy my jar file. Hope you could help me get thru this also.

            The error on the console is attached.

            Just curious, is there some SQL script that needs to be run on Oracle before
            using XA???

            Thank you once again.

            Best Regards
            MS

            15:51:28,107 INFO [MainDeployer] Deployed package:
            file:/Q:/jboss-3.2.0beta2/se
            rver/default/deploy/emp.jar
            15:51:28,122 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean
            ope
            ration 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:

            MBeans waiting for classes:

            MBeans waiting for other MBeans:
            [ObjectName: jboss.j2ee:jndiName=MsEmp1Remote,service=EJB
            state: FAILED
            I Depend On:
            Depends On Me: java.lang.LinkageError: loader constraints violated when
            linking
            javax/sql/ConnectionEventListener class]
            15:56:37,079 ERROR [LogInterceptor] RuntimeException:
            java.lang.NullPointerException
            at
            org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createBeanClassInstan
            ce(JDBCStoreManager.java:513)
            at
            org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(C
            MPPersistenceManager.java:165)
            at
            org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer
            .java:272)
            at
            org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.j
            ava:197)
            at
            org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInst
            anceInterceptor.java:78)
            at
            org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInte
            rceptor.java:79)
            at
            org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCrea
            tionInterceptor.java:44)
            at
            org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
            rceptor.java:112)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
            torCMT.java:237)
            at
            org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.ja
            va:71)
            at
            org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityIntercep
            tor.java:105)
            at
            org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:1
            31)
            at
            org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyF
            actoryFinderInterceptor.java:125)
            at
            org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:475)
            at org.jboss.ejb.Container.invoke(Container.java:701)
            at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1026)
            at
            org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
            at
            org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
            340)
            at java.lang.reflect.Method.invoke(Native Method)
            at
            sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236)
            at sun.rmi.transport.Transport$1.run(Transport.java:147)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:143)
            at
            sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
            60)
            at
            sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
            .java:701)
            at java.lang.Thread.run(Thread.java:479)
            15:58:30,273 ERROR [STDERR] java.lang.LinkageError: loader constraints
            violated
            when linking javax/sql/ConnectionEventListener class
            15:58:30,289 ERROR [STDERR] at
            org.jboss.resource.adapter.jdbc.xa.XAManagedC
            onnection.(XAManagedConnection.java:50)
            15:58:30,289 ERROR [STDERR] at
            org.jboss.resource.adapter.jdbc.xa.oracle.XAO
            racleManagedConnection.(XAOracleManagedConnection.java:48)
            15:58:30,304 ERROR [STDERR] at
            org.jboss.resource.adapter.jdbc.xa.oracle.XAO
            racleManagedConnectionFactory.newXAManagedConnection(XAOracleManagedConnecti
            onFa
            ctory.java:46)
            15:58:30,304 ERROR [STDERR] at
            org.jboss.resource.adapter.jdbc.xa.XAManagedC
            onnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:129
            )
            15:58:30,304 ERROR [STDERR] at
            org.jboss.resource.connectionmanager.Internal
            ManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:25
            9)
            15:58:30,304 ERROR [STDERR] at
            org.jboss.resource.connectionmanager.Internal
            ManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
            15:58:30,320 ERROR [STDERR] at
            org.jboss.resource.connectionmanager.Internal
            ManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:225)
            15:58:30,320 ERROR [STDERR] at
            org.jboss.resource.connectionmanager.PoolFill
            er$1.run(PoolFiller.java:63)
            15:58:30,320 ERROR [STDERR] at java.lang.Thread.run(Thread.java:479)

            • 3. Re: Configuring Oracle XA datasource using JBoss3.2.0Beta2
              Magnus Larsson Newbie

              Hello!

              I also have problems with LinkageError using JBoss3.2.0Beta2 when I try to deploy my ear-file!

              The Oracle XA datasource seems to be up and running without any problem but when I deploy the ear-file that use the ORacle-XA-DS I get an exception as decribed below.

              I use Oracle8.1.7 and its classes12.zip - file on JDK 1.3.1.

              Non-XA-Oracle-DS works fine!!!

              My XA-Oracle-Service.xml is as below.

              Any ideas on what to do???

              Regards,
              Magnus.

              -------------------------------------

              Oracle-XA-DS.xml
              ================

              <?xml version="1.0" encoding="UTF-8"?>



              jdbc/petstore/SupplierDB
              true

              <depends optional-attribute-name="ManagedConnectionFactoryName">


              org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory


              <config-property name="XADataSourceProperties" type="java.lang.String">URL=jdbc:oracle:oci8:@orcl</config-property>
              <config-property name="XADataSourceClass" type="java.lang.String">oracle.jdbc.xa.client.OracleXADataSource</config-property>
              <config-property name="UserName" type="java.lang.String">SCOTT</config-property>
              <config-property name="Password" type="java.lang.String">TIGER</config-property>





              <depends optional-attribute-name="ManagedConnectionPool">

              0
              50
              5000
              15
              ByContainer


              <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager
              <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager
              java:/TransactionManager



              -------------------------------------

              STACK TRACE
              ===========

              21:58:42,597 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=supplier-com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryL
              ocalHome,service=EJB
              java.lang.LinkageError: loader constraints violated when linking javax/sql/ConnectionEventListener class
              at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.(XAManagedConnection.java:50)
              at org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnection.(XAOracleManagedConnection.java:48)
              at org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory.newXAManagedConnection(XAOracleManagedConnectionFactory.java:46)

              at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:129)
              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:259)
              at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
              at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:323)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:527)
              at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:285)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:592)
              at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:885)
              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
              at org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.fixTableName(SQLUtil.java:38)
              at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.(JDBCEntityBridge.java:112)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:397)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:339)
              at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
              at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:359)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:197)
              at org.jboss.ejb.Container.invoke(Container.java:729)
              at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1026)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:962)
              at $Proxy9.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:388)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
              at $Proxy52.start(Unknown Source)
              at org.jboss.ejb.EjbModule.startService(EjbModule.java:444)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:197)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:962)
              at $Proxy9.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:388)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
              at $Proxy23.start(Unknown Source)
              at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:470)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:818)
              at org.jboss.deployment.MainDeployer.start(MainDeployer.java:810)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:630)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:594)
              at java.lang.reflect.Method.invoke(Native Method)
              at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
              at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
              at $Proxy7.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:400)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:619)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:472)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:195)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:206)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:185)

              -------------------------------------

              • 4. Re: Configuring Oracle XA datasource using JBoss3.2.0Beta2
                David Ward Newbie

                I am having the same problem. If you figure it out, please let me know.

                thanks,
                David