9 Replies Latest reply on Jun 3, 2015 10:43 PM by jaikiran pai

    ARJUNA012140: Adding multiple last resources is disallowed.

    D P Apprentice

      Application is throwing below exeption:

       

      WARN  [com.arjuna.ats.arjuna] (EJB default - 9) ARJUNA012140: Adding multiple last resources is disallowed. Trying to add LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@68024ac3[connectionListener=4f520748 connectionManager=21ab30c0 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a3e0fb3:-c084460:556ccecf:192, node_name=1, branch_uid=0:ffff0a3e0fb3:-c084460:556ccecf:1a3, subordinatenodename=null, eis_name=java:jboss/datasources/M1DataSource > productName=Microsoft SQL Server productVersion=12.00.2000 jndiName=java:jboss/datasources/M1DataSource])), but already have LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@7fb03cf5[connectionListener=5fa2ae9c connectionManager=62495c8f warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a3e0fb3:-c084460:556ccecf:192, node_name=1, branch_uid=0:ffff0a3e0fb3:-c084460:556ccecf:199, subordinatenodename=null, eis_name=java:jboss/datasources/D1DataSource > productName=Microsoft SQL Server productVersion=12.00.2000 jndiName=java:jboss/datasources/D1DataSource]))

      ERROR [stderr] (EJB default - 9) java.sql.SQLException: javax.resource.ResourceException: IJ000457: Unchecked throwable in managedConnectionReconnected() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@4f520748[state=NORMAL managed connection=org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@18ce42e2 connection handles=0 lastUse=1433194240593 trackByTx=false pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@64194ab1 mcp=SemaphoreArrayListManagedConnectionPool@3b534ddd[pool=M1DS] xaResource=LocalXAResourceImpl@68024ac3[connectionListener=4f520748 connectionManager=21ab30c0 warned=false currentXid=null productName=Microsoft SQL Server productVersion=12.00.2000 jndiName=java:jboss/datasources/M1DataSource] txSync=null]

       

      ERROR [stderr] (EJB default - 9)     at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:154)

       

      Application uses multiple datasources.

       

      How to fix this issue, it was working fine with JBoss AS 4.0.3.

       

      Thanks,

        • 1. Re: ARJUNA012140: Adding multiple last resources is disallowed.
          SANJAY GAUTAM Expert

          share your datasource settings details please

          • 2. Re: ARJUNA012140: Adding multiple last resources is disallowed.
            D P Apprentice

            Here is my datasource settings from standalone.xml

             

                      <datasources>

                            <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>

                                <driver>h2</driver>

                                <security>

                                    <user-name>sa</user-name>

                                    <password>sa</password>

                                </security>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/N1DataSource" pool-name="N1DS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:sqlserver://localhost\dhaval;SelectMethod=cursor;DatabaseName=n1db</connection-url>

                                <driver>sqlserver</driver>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                </pool>

                                <security>

                                    <user-name>n1db_user</user-name>

                                    <password>password</password>

                                </security>

                                <validation>

                                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>5000</blocking-timeout-millis>

                                    <idle-timeout-minutes>15</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <prepared-statement-cache-size>300</prepared-statement-cache-size>

                                </statement>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/M1DataSource" pool-name="M1DS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:sqlserver://localhost\dhaval;SelectMethod=cursor;DatabaseName=m1db</connection-url>

                                <driver>sqlserver</driver>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                </pool>

                                <security>

                                    <user-name>n1db_user</user-name>

                                    <password>password</password>

                                </security>

                                <validation>

                                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>5000</blocking-timeout-millis>

                                    <idle-timeout-minutes>15</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <prepared-statement-cache-size>300</prepared-statement-cache-size>

                                </statement>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/M1InDataSource" pool-name="M1InDS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:sqlserver://localhost\dhaval;SelectMethod=cursor;DatabaseName=m1indb</connection-url>

                                <driver>sqlserver</driver>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                </pool>

                                <security>

                                    <user-name>n1db_user</user-name>

                                    <password>password</password>

                                </security>

                                <validation>

                                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>5000</blocking-timeout-millis>

                                    <idle-timeout-minutes>15</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <prepared-statement-cache-size>300</prepared-statement-cache-size>

                                </statement>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/E1DataSource" pool-name="E1DS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:sqlserver://localhost\dhaval;SelectMethod=cursor;DatabaseName=m1db</connection-url>

                                <driver>sqlserver</driver>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                </pool>

                                <security>

                                    <user-name>n1db_user</user-name>

                                    <password>password</password>

                                </security>

                                <validation>

                                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>5000</blocking-timeout-millis>

                                    <idle-timeout-minutes>15</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <prepared-statement-cache-size>300</prepared-statement-cache-size>

                                </statement>

                            </datasource>

                            <datasource jndi-name="java:jboss/datasources/R1DataSource" pool-name="R1DS" enabled="true" use-java-context="true">

                                <connection-url>jdbc:sqlserver://localhost\dhaval;SelectMethod=cursor;DatabaseName=r1db</connection-url>

                                <driver>sqlserver</driver>

                                <pool>

                                    <min-pool-size>5</min-pool-size>

                                    <max-pool-size>100</max-pool-size>

                                </pool>

                                <security>

                                    <user-name>nrdb_user</user-name>

                                    <password>password</password>

                                </security>

                                <validation>

                                    <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>

                                </validation>

                                <timeout>

                                    <blocking-timeout-millis>5000</blocking-timeout-millis>

                                    <idle-timeout-minutes>15</idle-timeout-minutes>

                                </timeout>

                                <statement>

                                    <prepared-statement-cache-size>300</prepared-statement-cache-size>

                                </statement>

                            </datasource>

                            <drivers>

                                <driver name="h2" module="com.h2database.h2">

                                    <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                                </driver>

                                <driver name="sqlserver" module="com.microsoft">

                                    <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>

                                </driver>

                            </drivers>

                        </datasources>

             

             

            Thanks,

            • 4. Re: ARJUNA012140: Adding multiple last resources is disallowed.
              SANJAY GAUTAM Expert

              Do you have configuration in the standalone.xml as well as is it some where inside the war also ? but looking at the standaline.xml config to me looks fine and no issue and secondly I have configured multple data source in our application and we havent faced this issues.

              Please check three places. 

               

              1. inside your war if there is -ds.xml file.

              2. deployment folder if it has xxx-ds.xml

               

              if there will be duplicate configuration then this might happen

               

              hope this is helpful .

               

              Thanks

              Sanjay Gautam

              • 5. Re: ARJUNA012140: Adding multiple last resources is disallowed.
                D P Apprentice

                Nope there is no duplicate configuration.

                 

                Only standalone.xml is the one which has datasource details.

                 

                Thanks,

                • 6. Re: ARJUNA012140: Adding multiple last resources is disallowed.
                  SANJAY GAUTAM Expert

                  I think then I would say please add one by one and see if they get deployed probably help you in finding out which one is the issue

                  • 8. Re: ARJUNA012140: Adding multiple last resources is disallowed.
                    D P Apprentice

                    any suggestions,

                     

                    Thanks

                    • 9. Re: ARJUNA012140: Adding multiple last resources is disallowed.
                      jaikiran pai Master

                      You now have at least 3 threads discussing this same thing. Please do not create multiple threads to discuss the same problem, since it ends up in duplicate discussions and waste of volunteers' time. Since you have received some good suggestions in the other thread here Re: allowMultipleLastResources in JBoss AS 6 Final, I'm going to close this one.