2 Replies Latest reply on Jul 31, 2014 10:26 AM by soumya.plavaga

    jbpm 6.1.CR1 getting 'ARJUNA012140: Adding multiple last resources is disallowed' exception

    soumya.plavaga

      I am using DBUserGroupInfoProducer instead of default JAASUserGrpoupInfoProducer. I have configured two jndi mysql datasources within AS (standalone.xml & standalone-full.xml) file.

      Following are my datasources definitions -

       

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

                    <connection-url>jdbc:mysql://localhost:3306/jbpm</connection-url>

                    <driver>mysql</driver>

                    <pool />

                    <security>

                   <user-name>root</user-name>

                   <password>root</password>

                    </security>

                </datasource>

       

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

                    <connection-url>jdbc:mysql://localhost:3306/jbpm_user</connection-url>

                    <driver>mysql</driver>

                    <pool />

                    <security>

                   <user-name>root</user-name>

                   <password>root</password>

                    </security>

                </datasource>

       

       

      While verified using jboss's admin console I can see these two datasources are creating properly. Now I am using the jndi ds 'java:jboss/datasources/authDS' within jbpm-console/WEB-INF/classes/jbpm.usergroup.callback.properties. Following is the content of this property file -

       

      db.ds.jndi.name=java:jboss/datasources/authDS

      db.user.query=select * from user where username \= ?

      db.user.roles.query=select * from user_has_role where user_id \= ?

      db.roles.query=select * from role where name \= ?

       

      Now once the AS is restarted properly, once I do task query I am getting exception complaining that -

       

      '10:42:02,232 WARN  [com.arjuna.ats.arjuna] (http-localhost-127.0.0.1-8080-2) ARJUNA012140: Adding multiple last resources is disallowed. Trying to add LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@53edb9fd[connectionListener=37bbc0bb connectionManager=66e25ef6 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:-3dffe531:53d5dad4:a6, node_name=1, branch_uid=0:ffff7f000101:-3dffe531:53d5dad4:ab, subordinatenodename=null, eis_name=unknown eis name >])), but already have LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@6a7afbf7[connectionListener=6d7823de connectionManager=3958bfab warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff7f000101:-3dffe531:53d5dad4:a6, node_name=1, branch_uid=0:ffff7f000101:-3dffe531:53d5dad4:aa, subordinatenodename=null, eis_name=unknown eis name >]))

      10:42:02,483 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-2) SQL Error: 0, SQLState: null'.

       

      I am attaching the details stack trace of this exception also.

       

      I then created a servlet for my testing and accessing the datasource 'authDS' within that and deployed that servlet within AS. It's working fine without any exception in console.

       

      So my question is, why the same datasource is not getting found while it is called internally while doing task query? Am I missing any set of configuration to make it work? What does the above exception means?

       

      Any help will be really appreciated.