2 Replies Latest reply on Aug 6, 2009 2:00 AM by lucio piccoli


    lucio piccoli Newbie

      jbpm 3.2.6SP1
      portal 2.7.2

      hi all,

      when running jbpm3.2.6 on jboss portal 2.7.2 the following error occurs in the start up of the JobExecutorThread.

      22:25:37,101 ERROR [JobExecutorThread] exception in job executor thread. waiting
       20000 milliseconds
      org.jbpm.JbpmException: couldn't begin user transaction
       at org.jbpm.persistence.jta.JtaDbPersistenceService.beginUserTransaction
       at org.jbpm.persistence.jta.JtaDbPersistenceService.<init>(JtaDbPersiste
       at org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory.openService(J
       at org.jbpm.svc.Services.getService(Services.java:177)
       at org.jbpm.svc.Services.getPersistenceService(Services.java:231)
       at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:705)
       at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:629)
       at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:54
      Caused by: org.jbpm.JbpmException: could not retrieve user transaction with name

      the problem is with jbpmContext.getJobSession(), as it can't get a user transaction.

       protected Collection<Job> acquireJobs() {
       Collection<Job> acquiredJobs = Collections.emptyList();
       synchronized (jobExecutor) {
       JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
       try {
       log.debug("querying for acquirable job...");
       String lockOwner = getName();
       JobSession jobSession = jbpmContext.getJobSession();

      i am using the JtaDbPersistenceServiceFactory which has the isTransactionEnabled =false;

       <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />

      WHat is going on here?

      Why cant the java:comp/UserTransaction be found?


        • 1. Re: JobExecutorThread
          Alejandro Guizar Master

          J2EE containers are required to make the UserTransaction object available to enterprise beans and web components under the name java:comp/UserTransaction. If the JtaDbPersistenceService runs outside an EJB or web component, the user transaction will be unavailable under that name.

          Set the jta.UserTransaction property in your hibernate configuration to the global JNDI name under which the application server provides the UserTransaction object. For JBoss AS the correct value is "UserTransaction".

          • 2. Re: JobExecutorThread
            lucio piccoli Newbie

            the usertransaction is eventually bound to the jndi tree.

            The problems seems to be is that the 'WorkflowService' is commencing *before* the hibernate service has bound the usertransaction to the jndi tree.

            i confirmed this by placing trace inside the workflow service code and the userTransaction is only bound some time after the workflow service has commenced. werid i know.

            i have no understanding how the hibernate service starts and it role in the user transaction/jndi binding.

            i dont know what differences between jbpm3.2.2-jbpm3.26 would cause such behaviour.