1 2 Previous Next 18 Replies Latest reply on Mar 19, 2008 10:09 AM by Marcelo Alcantara

    2 PersistenceUnits: Adding multiple last resources is disall

    Carsten Hoehne Master

      Hello,
      i have a Seam app for Seam 1.2.1 and JBoss 4.0.5 GA which uses 2 persistent uinits. After migrating this app to SEAM 2.0.0Beta1 and JBoss 4.2.0GA i get an exception when both persistance units are used.
      I tried to declare both persistenceunits within one jar-file:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <!-- Persistence deployment descriptor for dev profile -->
      <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="aveqtest">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/aveqtestDatasource</jta-data-source>
       <class>de.bafz.aveqtest.model.AccessionEvaluation</class>
      
       <class>de.bafz.aveqtest.model.AddresscodechangeClient</class>
      
      [...] <exclude-unlisted-classes />
      
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="validate" />
       <property name="hibernate.cache.use_query_cache" value="true" />
       <property name="hibernate.show_sql" value="true" />
       <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
      
       <property name="jboss.entity.manager.jndi.name" value="java:/entityManager" />
      
       <property name="jboss.entity.manager.factory.jndi.name" value="java:/aveqtestEntityManagerFactory" />
      
       </properties>
       </persistence-unit>
      
       <persistence-unit name="oracleDB">
       <provider>org.hibernate.ejb.HibernatePersistence</provider>
       <jta-data-source>java:/oracleDatasource</jta-data-source>
       <class>de.bafz.aveqtest.model.oracle.Address</class>
      [...] <exclude-unlisted-classes />
       <properties>
       <property name="hibernate.hbm2ddl.auto" value="validate" />
       <property name="hibernate.cache.use_query_cache"
       value="true" />
       <property name="hibernate.show_sql" value="true" />
       <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
       <property name="jboss.entity.manager.jndi.name"
       value="java:/oracleEntityManager" />
       <property name="jboss.entity.manager.factory.jndi.name"
       value="java:/oracleEntityManagerFactory" />
       </properties>
       </persistence-unit>
      </persistence>
      



      The experiment comes from one database and after that a query to the other db should be executed, but raises this exception.
      16:17:17,890 INFO [STDOUT] Hibernate: select experiment0_.ExperimentID as Experime1_76_, experiment
      0_.Size as Size76_, experiment0_.SowingYear as SowingYear76_, experiment0_.Description as Descript4_
      76_, experiment0_.HarvestYear as HarvestY5_76_, experiment0_.SowingDate as SowingDate76_, experiment
      0_.AddressCode as AddressC7_76_, experiment0_.AddressFAOCode as AddressF8_76_, experiment0_.PartnerC
      ode as PartnerC9_76_, experiment0_.ProjectCode as Project10_76_, experiment0_.ExperimentCode as Expe
      rim11_76_, experiment0_.ExperimentName as Experim12_76_, experiment0_.SiteID as SiteID76_, experimen
      t0_.HarvestDate as Harvest14_76_, experiment0_.Design as Design76_, experiment0_.Samples as Samples7
      6_, experiment0_.Replications as Replica17_76_ from EXPERIMENT experiment0_ limit ?
      16:17:17,984 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.dis
      allow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple la
      st resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionMan
      ager$LocalXAResource@1340091
      16:17:18,000 WARN [JDBCExceptionReporter] SQL Error: 0, SQLState: null
      16:17:18,000 ERROR [JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware ob
      ject!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlis
      t resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53e0d9e7:77e:469b7d96:41 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction o
      n entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Thr
      owable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -53e0d9e7:77e:469b7d96:41 status: ActionStatus.ABORT_ONLY >))
      16:17:18,000 FATAL [application] javax.persistence.PersistenceException: org.hibernate.exception.Gen
      ericJDBCException: Cannot open connection
      javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.exception.
      GenericJDBCException: Cannot open connection
       at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionA
      dapter.java:91)
       at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
       at javax.faces.component.UICommand.broadcast(UICommand.java:383)
      

      Both connections are working. I can access each database in isolated state. But not the two togehter.
      It would be fine if someone has an idea what this error means. Any pointer (even it is a pointer to the right forum to ask: hibernate,EJB3,JCA etc) are welcome.
      In the SEAM forum, gavin said to use XA DataSources.Are they really nessecary. My apps runs with JBoss 4.0.5GA but not with 4.2.0GA.
      Here are my Datasources:
      <datasources>
      
       <local-tx-datasource>
       <jndi-name>aveqtestDatasource</jndi-name>
       <connection-url>jdbc:mysql://localhost/aveq</connection-url>
       <driver-class>com.mysql.jdbc.Driver</driver-class>
       <user-name>aaaa</user-name>
       <password>pppp</password>
      
       </local-tx-datasource>
      
       <local-tx-datasource>
       <jndi-name>oracleDatasource</jndi-name>
       <connection-url>
       jdbc:oracle:thin:@localhost:xe
       </connection-url>
       <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
       <user-name>eeee</user-name>
       <password>ooooo</password>
       <metadata>
       <type-mapping>Oracle</type-mapping>
       </metadata>
       </local-tx-datasource>
      </datasources>
      

      Googling yield only this link:http://lists.jboss.org/pipermail/jboss-svn-commits/2007-March/006849.html and was not helpful.
      If XA DS are the solution, can someone tell me how to define them? It would be great
      Ciao,
      Carsten

        • 1. Re: 2 PersistenceUnits: Adding multiple last resources is di
          Carsten Hoehne Master

          Any help is very appreciated.
          Why does it work with 4.05GA but not with 4.2.0GA?

          If a XA-Datasource is relly needed with 4.2.0 how is it configured.
          This page: http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources does not help me in this context:-(

          • 2. Re: 2 PersistenceUnits: Adding multiple last resources is di
            Carsten Hoehne Master

            Now totally clueless.
            Found the example definition of an oracle XA datasource in the docs\examples\jca folder of JBOss As and adapted it:

            <xa-datasource>
             <jndi-name>Oracle</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:@172.31.10.32:1521:xe</xa-datasource-property>
             <xa-datasource-property name="User">eadb</xa-datasource-property>
             <xa-datasource-property name="Password">oracle</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-->
             <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
             <no-tx-separate-pools/>
             <!-- 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>
            
             <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
             <metadata>
             <type-mapping>Oracle9i</type-mapping>
             </metadata>
             </xa-datasource>
            
             <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter"
             name="jboss.jca:service=OracleXAExceptionFormatter">
             <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
             </mbean>
            

            but this results in this exception:
            08:20:32,745 INFO [STDOUT] Hibernate: select experiment0_.ExperimentID as Experime1_76_, experiment0_.Size as Size76_, experiment0_.SowingYear as SowingYear76_, experiment0_.Description as Descript4_76_, experiment0_.HarvestYear as HarvestY5_76_, experiment0_.SowingDate as SowingDate76_, experiment0_.AddressCode as AddressC7_76_, experiment0_.AddressFAOCode as AddressF8_76_, experiment0_.PartnerCode as PartnerC9_76_, experiment0_.ProjectCode as Project10_76_, experiment0_.ExperimentCode as Experim11_76_, experiment0_.ExperimentName as Experim12_76_, experiment0_.SiteID as SiteID76_, experiment0_.HarvestDate as Harvest14_76_, experiment0_.Design as Design76_, experiment0_.Samples as Samples76_, experiment0_.Replications as Replica17_76_ from EXPERIMENT experiment0_ limit ?
            08:20:32,916 ERROR [XAManagedConnectionFactory] Start transaction failed for org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1e3cf1f
            08:20:32,916 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@1e23cfc[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@1e3cf1f handles=0 lastUse=1184653232885 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@133066c context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@eac619 xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@11c55b txSync=null]
            oracle.jdbc.xa.OracleXAException
             at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
             at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
             at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:121)
             at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.start(JcaXAResourceWrapper.java:113)
             at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:701)
             at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
             at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
             at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
             at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
             at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
             at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
             at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
             at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
             at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
             at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
             at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
             at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
            

            Can anyone tell me what is wrong?
            And given the fact that XA is necessary, where to find an example for mysql?

            • 4. Re: 2 PersistenceUnits: Adding multiple last resources is di
              Carsten Hoehne Master

              Thanks for the answer.
              After setting pad= true, ithe same(?) exception is raised:

              08:59:38,133 INFO [ExperimentSiteList] ExperimentSiteList instantiated by SEAM
              08:59:38,508 INFO [STDOUT] Hibernate: select experiment0_.ExperimentID as Experime1_76_, experiment0_.Size as Size76_, experiment0_.SowingYear as SowingYear76_, experiment0_.Description as Descript4_76_, experiment0_.HarvestYear as HarvestY5_76_, experiment0_.SowingDate as SowingDate76_, experiment0_.AddressCode as AddressC7_76_, experiment0_.AddressFAOCode as AddressF8_76_, experiment0_.PartnerCode as PartnerC9_76_, experiment0_.ProjectCode as Project10_76_, experiment0_.ExperimentCode as Experim11_76_, experiment0_.ExperimentName as Experim12_76_, experiment0_.SiteID as SiteID76_, experiment0_.HarvestDate as Harvest14_76_, experiment0_.Design as Design76_, experiment0_.Samples as Samples76_, experiment0_.Replications as Replica17_76_ from EXPERIMENT experiment0_ limit ?
              08:59:38,680 ERROR [XAManagedConnectionFactory] Start transaction failed for org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@14c9bfb
              08:59:38,680 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@13a7cd4[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@14c9bfb handles=0 lastUse=1184655578649 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@94a25c context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@2f4f8b xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@d9794b txSync=null]
              oracle.jdbc.xa.OracleXAException
               at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
               at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
               at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:121)
               at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.start(JcaXAResourceWrapper.java:113)
               at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:701)
               at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
               at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
               at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
               at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
               at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
               at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
               at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
               at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
               at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
               at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
               at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
               at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
              


              • 5. Re: 2 PersistenceUnits: Adding multiple last resources is di
                Vicky Kak Master

                 

                6_, experiment0_.Replications as Replica17_76_ from EXPERIMENT experiment0_ limit ?
                16:17:17,984 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.dis
                
                allow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple la
                
                st resources is disallowed

                Do you still get this exception ?
                Read this
                http://wiki.jboss.org/wiki/Wiki.jsp?page=Multiple1PC


                Can you write a plain jsp application which would do
                1) Get the XA oracle ds
                2) Obtain the connection
                3) Perform simple select on it .

                Let me now if that works . I am not sure what you are doing in seam related code .





                • 6. Re: 2 PersistenceUnits: Adding multiple last resources is di
                  Vicky Kak Master

                   

                  "baz" wrote:
                  Any help is very appreciated.
                  Why does it work with 4.05GA but not with 4.2.0GA?

                  Look at the TransactionManager implementation in the jboss-service.xml it is configured differently.

                  Enabling multiple last resource could be configured in the jbossjta-properties.xml .


                  • 7. Re: 2 PersistenceUnits: Adding multiple last resources is di
                    Carsten Hoehne Master

                    Thanks for your time.
                    When JBoss start a schema validation takes place. This is fully functional

                    10:01:10,643 INFO [SchemaValidator] Running schema validator
                    10:01:10,643 INFO [SchemaValidator] fetching database metadata
                    10:01:10,752 INFO [TableMetadata] table found: EADB.DESCRIPTOR
                    10:01:10,752 INFO [TableMetadata] columns: [descriptorid, descriptor, referenceid, lastsuggestedstage, descriptorcode, genus, bgrccode, firstsuggestedstage, traitcode]
                    

                    When the url or user/password is changed to an faulty value an connection error is thrown. So i conclude that the datasource is correctly configured.

                    My exception must come from an other reason:-(
                    By now i can not use LRCO.
                    So i am going to set com.arjuna.ats.jta.allowMultipleLastResources to true and try again with two local-tx-datasource.
                    Thanks again.
                    Ciao,
                    Carsten

                    • 8. Re: 2 PersistenceUnits: Adding multiple last resources is di
                      Carsten Hoehne Master

                      1. The schema validation succeeds. Everytime a transaction comes in play the error occurs:-(

                      2. setting com.arjuna.ats.jta.allowMultipleLastResources to true and using two local-tx-datasource has helped for the moment. But after reading all the docs vickyk gently pointed, i do want to use xa datasources.
                      For now i do not know why the exception occur.

                      • 9. Re: 2 PersistenceUnits: Adding multiple last resources is di
                        Vicky Kak Master

                         

                        "baz" wrote:
                        For now i do not know why the exception occur.

                        Which exception are you referring to ?
                        Are you still getting the exception

                        Vicky

                        • 10. Re: 2 PersistenceUnits: Adding multiple last resources is di
                          Carsten Hoehne Master

                          Sorry, The exception is this

                          "baz" wrote:
                          Thanks for the answer.
                          After setting pad= true, ithe same(?) exception is raised:
                          08:59:38,133 INFO [ExperimentSiteList] ExperimentSiteList instantiated by SEAM
                          08:59:38,508 INFO [STDOUT] Hibernate: select experiment0_.ExperimentID as Experime1_76_, experiment0_.Size as Size76_, experiment0_.SowingYear as SowingYear76_, experiment0_.Description as Descript4_76_, experiment0_.HarvestYear as HarvestY5_76_, experiment0_.SowingDate as SowingDate76_, experiment0_.AddressCode as AddressC7_76_, experiment0_.AddressFAOCode as AddressF8_76_, experiment0_.PartnerCode as PartnerC9_76_, experiment0_.ProjectCode as Project10_76_, experiment0_.ExperimentCode as Experim11_76_, experiment0_.ExperimentName as Experim12_76_, experiment0_.SiteID as SiteID76_, experiment0_.HarvestDate as Harvest14_76_, experiment0_.Design as Design76_, experiment0_.Samples as Samples76_, experiment0_.Replications as Replica17_76_ from EXPERIMENT experiment0_ limit ?
                          08:59:38,680 ERROR [XAManagedConnectionFactory] Start transaction failed for org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@14c9bfb
                          08:59:38,680 WARN [TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@13a7cd4[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@14c9bfb handles=0 lastUse=1184655578649 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@94a25c context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@2f4f8b xaResource=org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper@d9794b txSync=null]
                          oracle.jdbc.xa.OracleXAException
                           at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
                           at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
                           at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:121)
                           at org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.start(JcaXAResourceWrapper.java:113)
                           at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:701)
                           at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:446)
                           at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:773)
                           at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:564)
                           at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:337)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:518)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:399)
                           at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
                           at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
                           at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
                           at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
                           at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
                           at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
                          

                          When i understand it correctly, the connection is reused and should be enlisted in a transaction. This step fails. But why?

                          The sentence you quote belongs to 1.) sorry for the fault:-(


                          • 11. Re: 2 PersistenceUnits: Adding multiple last resources is di
                            Vicky Kak Master

                             

                            "baz" wrote:
                            oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
                            at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
                            at

                            This looks to be appearing from the missing Oracle DB server settings.
                            Look at the similar issues at here
                            http://www-1.ibm.com/support/docview.wss?uid=swg21215890
                            http://www.atomikos-support.com/forums/viewtopic.php?t=38
                            Please let me know if this works for you :)


                            • 12. Re: 2 PersistenceUnits: Adding multiple last resources is di
                              Carsten Hoehne Master

                              Thanks for your time.
                              The links are helpful.
                              But i can not use the information directly
                              Have to discover how to enable XA transactions in our oracle databases.
                              One is Oracle Express (here i can not find the script initxa.sql)
                              The other is oracle 9i :-( where i do not find either of the scripts.

                              So my next task is to learn how to enable xa for these oracle versions.
                              Ciao
                              Carsten

                              • 13. Re: 2 PersistenceUnits: Adding multiple last resources is di
                                Vicky Kak Master

                                 

                                "baz" wrote:

                                So my next task is to learn how to enable xa for these oracle versions.
                                Ciao
                                Carsten

                                All right , but make sure that you update the forums or proabably the JCA wiki if things do work :)

                                • 14. Re: 2 PersistenceUnits: Adding multiple last resources is di
                                  Carsten Hoehne Master

                                  My results so far:
                                  Oracle XE (Express) can not do XA
                                  Oracle9i will be configured as described above.

                                  With MySql i have not succeded in using XA together with Seam and Jboss AS:-(

                                  So we have decided to set the com.arjuna.ats.jta.allowMultipleLastResources to true
                                  which is not quite optimal:-(

                                  1 2 Previous Next