1 2 3 Previous Next 35 Replies Latest reply on Dec 5, 2009 5:36 AM by Santanu Saraswati

    Problem moving from 4.1 to 4.2 using Spring configuration

    Bob Milstead Newbie

      After updating to the 4.2 libraries, we began getting an NPE, the root cause of which is that the userCommandService in ProcessEngineImpl is not getting initialized. I tried to simplify the configuration as much as possible but still get the error.

      The error is
      Caused by: java.lang.NullPointerException
      at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)

      Here is line 177...userCommandService is null
      userCommandService.execute(new CheckDbCmd());

      It is coming back null from lines 157 and 158 of ProcessEngineImpl:

      processEngineWireContext.create();
      userCommandService = (CommandService) processEngineWireContext.get(CommandService.NAME_TX_REQUIRED_COMMAND_SERVICE);

      This works fine with the 4.1 libraries.

      Any help or suggestions appreciated. My jvm is 1.5.0


      Here is my Spring config for jbpm:

      <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
       <constructor-arg value="context/core/jbpm.cfg.xml" />
       </bean>
      
       <bean id="processEngine" factory-bean="jbpmConfiguration"
       factory-method="buildProcessEngine" />
       <bean id="serviceRepository" factory-bean="processEngine"
       factory-method="getRepositoryService" />
       <bean id="serviceTask" factory-bean="processEngine"
       factory-method="getTaskService" />
       <bean id="serviceExecution" factory-bean="processEngine"
       factory-method="getExecutionService" />
       <bean id="serviceIdentity" factory-bean="processEngine"
       factory-method="getIdentityService" />


      jbpm.cfg.xml
      <jbpm-configuration>
      
       <import resource="jbpm.default.cfg.xml" />
       <import resource="jbpm.businesscalendar.cfg.xml" />
       <import resource="jbpm.jpdl.cfg.xml" />
       <import resource="jbpm.identity.cfg.xml" />
      
       <!-- Job executor is excluded for running the example test cases. -->
       <!-- To enable timers and messages in production use, this should be included. -->
       <!--
       <import resource="jbpm.jobexecutor.cfg.xml" />
       -->
      
       <process-engine-context>
       <command-service>
       <retry-interceptor />
       <environment-interceptor />
       <spring-transaction-interceptor />
       </command-service>
       </process-engine-context>
      
       <transaction-context>
       <transaction />
       <hibernate-session />
       </transaction-context>
      
      </jbpm-configuration>
      


      the log
      2009-11-09 13:40:29,047 TRACE (Log4jLog.java:72) - loading wire bindings from resource: jar:file:/Users/bob/.m2/repository/org/jbpm/jbpm4/jbpm-pvm/4.2/jbpm-pvm-4.2.jar!/jbpm.wire.bindings.xml
      2009-11-09 13:40:29,071 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TrueBinding
      2009-11-09 13:40:29,073 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FalseBinding
      2009-11-09 13:40:29,074 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.CharBinding
      2009-11-09 13:40:29,077 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DoubleBinding
      2009-11-09 13:40:29,078 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FloatBinding
      2009-11-09 13:40:29,079 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IntBinding
      2009-11-09 13:40:29,081 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ShortBinding
      2009-11-09 13:40:29,082 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ByteBinding
      2009-11-09 13:40:29,084 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.LongBinding
      2009-11-09 13:40:29,089 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.StringBinding
      2009-11-09 13:40:29,093 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.NullBinding
      2009-11-09 13:40:29,094 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ClassBinding
      2009-11-09 13:40:29,095 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ObjectBinding
      2009-11-09 13:40:29,097 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RefBinding
      2009-11-09 13:40:29,098 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JndiBinding
      2009-11-09 13:40:29,099 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ListBinding
      2009-11-09 13:40:29,104 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SetBinding
      2009-11-09 13:40:29,106 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MapBinding
      2009-11-09 13:40:29,107 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertiesBinding
      2009-11-09 13:40:29,108 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ProcessEngineRefBinding
      2009-11-09 13:40:29,109 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvRefBinding
      2009-11-09 13:40:29,111 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvBinding
      2009-11-09 13:40:29,113 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ContextRefBinding
      2009-11-09 13:40:29,117 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionRefBinding
      2009-11-09 13:40:29,118 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionBinding
      2009-11-09 13:40:29,119 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobExecutorBinding
      2009-11-09 13:40:29,122 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding
      2009-11-09 13:40:29,122 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding
      2009-11-09 13:40:29,123 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding
      2009-11-09 13:40:29,125 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdComposerBinding
      2009-11-09 13:40:29,126 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.pvm.internal.wire.binding.IdComposerBinding
      2009-11-09 13:40:29,126 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailTemplateBinding
      2009-11-09 13:40:29,127 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.AddressResolverBinding
      2009-11-09 13:40:29,128 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding
      2009-11-09 13:40:29,129 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding
      2009-11-09 13:40:29,130 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionBinding
      2009-11-09 13:40:29,132 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionFactoryBinding
      2009-11-09 13:40:29,133 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DbSessionBinding
      2009-11-09 13:40:29,134 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MessageSessionBinding
      2009-11-09 13:40:29,135 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TimerSessionBinding
      2009-11-09 13:40:29,135 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistorySessionBinding
      2009-11-09 13:40:29,136 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentitySessionBinding
      2009-11-09 13:40:29,137 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionFactoryBinding
      2009-11-09 13:40:29,138 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionBinding
      2009-11-09 13:40:29,138 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositorySessionBinding
      2009-11-09 13:40:29,139 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailSessionBinding
      2009-11-09 13:40:29,140 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TypesBinding
      2009-11-09 13:40:29,144 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.CommandServiceBinding
      2009-11-09 13:40:29,146 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding
      2009-11-09 13:40:29,147 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding
      2009-11-09 13:40:29,148 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentityServiceBinding
      2009-11-09 13:40:29,149 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistoryServiceBinding
      2009-11-09 13:40:29,150 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TaskServiceBinding
      2009-11-09 13:40:29,150 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryServiceBinding
      2009-11-09 13:40:29,151 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryCacheBinding
      2009-11-09 13:40:29,152 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DeployerManagerBinding
      2009-11-09 13:40:29,153 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SkipInterceptorBinding
      2009-11-09 13:40:29,154 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding
      2009-11-09 13:40:29,154 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding
      2009-11-09 13:40:29,156 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding
      2009-11-09 13:40:29,158 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.StandardTransactionInterceptorBinding
      2009-11-09 13:40:29,159 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SerializeInterceptorBinding
      2009-11-09 13:40:29,160 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JtaTransactionInterceptorBinding
      2009-11-09 13:40:29,161 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertyBinding
      2009-11-09 13:40:29,162 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FieldBinding
      2009-11-09 13:40:29,163 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.InvokeBinding
      2009-11-09 13:40:29,164 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SubscribeBinding
      2009-11-09 13:40:29,165 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnlistBinding
      2009-11-09 13:40:29,165 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
      2009-11-09 13:40:29,167 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
      2009-11-09 13:40:29,167 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
      2009-11-09 13:40:29,168 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
      2009-11-09 13:40:29,168 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
      2009-11-09 13:40:29,169 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
      2009-11-09 13:40:29,169 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.jpdl.internal.xml.JpdlDeployerBinding
      2009-11-09 13:40:29,171 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SpringTransactionInterceptorBinding
      2009-11-09 13:40:29,173 TRACE (Log4jLog.java:72) - skipping unavailable wire bindings resource jbpm.user.wire.bindings.xml
      2009-11-09 13:40:29,195 TRACE (Log4jLog.java:72) - adding hibernate configuration resource jbpm.hibernate.cfg.xml
      2009-11-09 13:40:29,345 TRACE (Log4jLog.java:72) - created ProcessEngine 1782681
      2009-11-09 13:40:29,345 TRACE (Log4jLog.java:72) - process-engine-context 14198212
      2009-11-09 13:40:29,345 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.type.DefaultTypeSet
      2009-11-09 13:40:29,346 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryCache
      2009-11-09 13:40:29,346 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.HistoryServiceImpl
      2009-11-09 13:40:29,346 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.cmd.CommandService
      2009-11-09 13:40:29,347 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.AbstractServiceImpl
      2009-11-09 13:40:29,347 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryCacheImpl
      2009-11-09 13:40:29,347 TRACE (Log4jLog.java:72) - java.io.Serializable
      2009-11-09 13:40:29,347 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.email.impl.MailTemplateRegistry
      2009-11-09 13:40:29,348 TRACE (Log4jLog.java:72) - org.jbpm.api.IdentityService
      2009-11-09 13:40:29,350 TRACE (Log4jLog.java:72) - org.jbpm.api.HistoryService
      2009-11-09 13:40:29,351 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.type.TypeSet
      2009-11-09 13:40:29,351 TRACE (Log4jLog.java:72) - org.jbpm.api.RepositoryService
      2009-11-09 13:40:29,351 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.IdentityServiceImpl
      2009-11-09 13:40:29,352 TRACE (Log4jLog.java:72) - org.hibernate.SessionFactory
      2009-11-09 13:40:29,352 TRACE (Log4jLog.java:72) - org.jbpm.api.ManagementService
      2009-11-09 13:40:29,352 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.cal.BusinessCalendar
      2009-11-09 13:40:29,353 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.cal.BusinessCalendarImpl
      2009-11-09 13:40:29,353 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DatabaseIdComposer
      2009-11-09 13:40:29,353 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.ExecutionServiceImpl
      2009-11-09 13:40:29,353 TRACE (Log4jLog.java:72) - org.hibernate.cfg.Configuration
      2009-11-09 13:40:29,354 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.ManagementServiceImpl
      2009-11-09 13:40:29,354 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryServiceImpl
      2009-11-09 13:40:29,354 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.script.ScriptManager
      2009-11-09 13:40:29,355 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DbidGenerator
      2009-11-09 13:40:29,355 TRACE (Log4jLog.java:72) - org.jbpm.api.TaskService
      2009-11-09 13:40:29,355 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DatabaseDbidGenerator
      2009-11-09 13:40:29,355 TRACE (Log4jLog.java:72) - javax.naming.Referenceable
      2009-11-09 13:40:29,357 TRACE (Log4jLog.java:72) - org.jbpm.api.ExecutionService
      2009-11-09 13:40:29,357 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.email.impl.DefaultAddressResolver
      2009-11-09 13:40:29,358 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.TaskServiceImpl
      2009-11-09 13:40:29,358 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.email.spi.AddressResolver
      2009-11-09 13:40:29,358 TRACE (Log4jLog.java:72) - java.lang.Object
      2009-11-09 13:40:29,358 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.DeployerManager
      2009-11-09 13:40:29,359 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.IdComposer
      2009-11-09 13:40:29,359 TRACE (Log4jLog.java:72) - transaction-context:
      2009-11-09 13:40:29,359 TRACE (Log4jLog.java:72) - org.hibernate.event.EventSource
      2009-11-09 13:40:29,359 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.tx.StandardTransaction
      2009-11-09 13:40:29,360 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.identity.spi.IdentitySession
      2009-11-09 13:40:29,360 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.history.HistorySession
      2009-11-09 13:40:29,360 TRACE (Log4jLog.java:72) - org.hibernate.impl.SessionImpl
      2009-11-09 13:40:29,361 TRACE (Log4jLog.java:72) - java.io.Serializable
      2009-11-09 13:40:29,361 TRACE (Log4jLog.java:72) - org.hibernate.transaction.TransactionFactory$Context
      2009-11-09 13:40:29,361 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.TimerSession
      2009-11-09 13:40:29,362 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.MessageSession
      2009-11-09 13:40:29,362 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.RepositorySession
      2009-11-09 13:40:29,363 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.jobexecutor.JobExecutorMessageSession
      2009-11-09 13:40:29,363 TRACE (Log4jLog.java:72) - org.hibernate.engine.SessionImplementor
      2009-11-09 13:40:29,363 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.jobexecutor.JobExecutorTimerSession
      2009-11-09 13:40:29,364 TRACE (Log4jLog.java:72) - org.hibernate.Session
      2009-11-09 13:40:29,364 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl
      2009-11-09 13:40:29,364 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.DbSession
      2009-11-09 13:40:29,365 TRACE (Log4jLog.java:72) - org.hibernate.impl.AbstractSessionImpl
      2009-11-09 13:40:29,365 TRACE (Log4jLog.java:72) - org.hibernate.jdbc.JDBCContext$Context
      2009-11-09 13:40:29,365 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.history.HistorySessionImpl
      2009-11-09 13:40:29,365 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.email.impl.MailSessionImpl
      2009-11-09 13:40:29,366 TRACE (Log4jLog.java:72) - org.hibernate.classic.Session
      2009-11-09 13:40:29,366 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.email.spi.MailSession
      2009-11-09 13:40:29,367 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositorySessionImpl
      2009-11-09 13:40:29,367 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.env.Transaction
      2009-11-09 13:40:29,367 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.hibernate.DbSessionImpl
      2009-11-09 13:40:29,368 TRACE (Log4jLog.java:72) - java.lang.Object
      2009-11-09 13:40:29,368 TRACE (Log4jLog.java:72) - creating process-engine
      2009-11-09 13:40:29,368 DEBUG (Log4jLog.java:60) - eagerly initializing org.jbpm.pvm.internal.id.DatabaseIdComposer
      2009-11-09 13:40:29,370 TRACE (Log4jLog.java:72) - constructing org.jbpm.pvm.internal.id.DatabaseIdComposer
      2009-11-09 13:40:29,374 TRACE (Log4jLog.java:72) - initializing org.jbpm.pvm.internal.id.DatabaseIdComposer
      2009-11-09 13:40:29,375 TRACE (Log4jLog.java:72) - delivering null for undefined object txRequiredCommandService
      2009-11-09 13:40:29,396 ERROR (TestContextManager.java:258) - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1f28df] to prepare test instance [com.hrworx.formworx.dao.TestDocumentDAO@b44e2d]
      java.lang.IllegalStateException: Failed to load ApplicationContext
      
      ......
      
      




        • 1. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
          Santanu Saraswati Novice

          Did you manage to get rid of this problem?

          Today I tried to migrate from 4.1 to 4.2, and faced the same problem. After a deeper dive into the code I realized that it is expecting the CommandService to be there in the WireContext against the key CommandService.NAME_TX_REQUIRED_COMMAND_SERVICE. Now in jbpm.cfg.xml whatever name you give becomes the key in WireContext. So I need to give the name of the command service as the string the code expects.

          <command-service name="txRequiredCommandService">
           <retry-interceptor />
           <environment-interceptor />
           <spring-transaction-interceptor/>
          </command-service>
          


          This configuration solves the problem.

          It will be great if somebody can shed some more light on it and explain why is it this way? I mean why we do not have a fallback mechanism in the code where entry against that key "txRequiredCommandService" is not found then it will search with the CommandService class name. Normally all the services which is not given a name in jpdl.cfg.xml are stored against their class name.


          • 2. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
            Bob Milstead Newbie

            Thanks for the reply. After changing the configuration as you suggest, I now get the following stack trace:

            org.jbpm.api.JbpmException: couldn't acquire block of ids
             at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.getNextId(DatabaseDbidGenerator.java:65)
             at org.jbpm.pvm.internal.repository.RepositorySessionImpl.deploy(RepositorySessionImpl.java:56)
             at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:47)
             at org.jbpm.pvm.internal.cmd.DeployCmd.execute(DeployCmd.java:33)
             at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
             at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
             at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
             at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
             at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
             at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
             at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
             at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:91)
            
            Caused by: java.lang.NullPointerException
             at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.acquireDbidBlock(DatabaseDbidGenerator.java:76)
             at org.jbpm.pvm.internal.id.DatabaseDbidGenerator.getNextId(DatabaseDbidGenerator.java:63)
            




            which is similar to https://jira.jboss.org/jira/browse/JBPM-2599
            that is claimed to be resolved in 4.2

            Basically, the commandService in DatabaseDbidGenerator is null. Am I missing some other new piece of configuration?





            • 3. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
              Santanu Saraswati Novice

              You may need to add this to jbpm.cfg

               <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
               <field name="commandService"><ref object="txRequiredCommandService" /></field>
               </object>
              
               <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />
              
              


              • 4. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                Bob Milstead Newbie

                Thanks again for the suggestion. Each time I get a little further.

                Now my config looks like this:

                <jbpm-configuration>
                
                 <import resource="jbpm.default.cfg.xml" />
                 <import resource="jbpm.businesscalendar.cfg.xml" />
                 <import resource="jbpm.jpdl.cfg.xml" />
                
                 <process-engine-context>
                 <command-service name="txRequiredCommandService">
                 <retry-interceptor />
                 <environment-interceptor />
                 <spring-transaction-interceptor />
                 </command-service>
                 </process-engine-context>
                
                 <transaction-context>
                 <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
                 <field name="commandService">
                 <ref object="txRequiredCommandService" />
                 </field>
                 </object>
                
                 <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer"
                 init="eager" />
                 <object class="com.hrworx.formworx.service.user.JbpmIdentitySessionImpl" />
                 <transaction />
                 <hibernate-session current="false" />
                 </transaction-context>
                
                </jbpm-configuration>
                


                and I am getting a new error:
                org.jbpm.pvm.internal.tx.TransactionException: complete on transaction in state COMMITTED
                 at org.jbpm.pvm.internal.tx.StandardTransaction.complete(StandardTransaction.java:69)
                 at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:93)
                 at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
                 at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
                 at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
                 at org.jbpm.pvm.internal.repository.DeploymentImpl.deploy(DeploymentImpl.java:91)
                


                I have also tried adding this back into my configuration without success:
                <import resource="jbpm.tx.spring.cfg.xml" />


                • 5. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                  Santanu Saraswati Novice

                  jbpm.default.cfg.xml is the culprit here. That is creating problem.

                  And also, DB id generation is something which should not happen in the transaction context. Because after generating the id it will try to commit so that the same id is not taken by some other transaction. If it participate in the same transaction where the main flow is on then it will end up committing that. So you will get the exception you mentioned.

                  This is an example jbpm.cfg.xml which seems to be working

                  <jbpm-configuration>
                  
                   <import resource="jbpm.businesscalendar.cfg.xml" />
                   <import resource="jbpm.jpdl.cfg.xml" />
                  
                   <process-engine-context>
                   <repository-service />
                   <repository-cache />
                   <execution-service />
                   <history-service />
                   <management-service />
                   <task-service />
                   <identity-service />
                   <command-service name="txRequiredCommandService">
                   <retry-interceptor />
                   <environment-interceptor />
                   <spring-transaction-interceptor/>
                   </command-service>
                  
                   <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
                   <field name="commandService"><ref object="txRequiredCommandService" /></field>
                   </object>
                  
                   <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer" init="eager" />
                  
                   <script-manager default-expression-language="juel" default-script-language="juel">
                   <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
                   </script-manager>
                  
                   <job-executor auto-start="false" />
                  
                   <types resource="jbpm.variable.types.xml" />
                   </process-engine-context>
                  
                   <transaction-context>
                   <repository-session/>
                   <db-session/>
                  
                   <message-session/>
                   <timer-session/>
                   <history-session/>
                  
                   <hibernate-session current="true"/>
                   </transaction-context>
                  
                  </jbpm-configuration>
                  



                  • 6. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                    Bob Milstead Newbie

                    Sooner or later I'll get this up. Thanks again for the help. Getting a new exception now:

                    org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl
                     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:127)
                     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
                     ... 35 more
                    Caused by: org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl
                     at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
                     at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
                     at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
                     at org.hibernate.ejb.event.EJB3SaveEventListener.saveWithGeneratedId(EJB3SaveEventListener.java:43)
                     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
                     at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
                     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
                     at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
                     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
                     at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
                     at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
                     at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
                     at org.jbpm.pvm.internal.id.PropertyImpl.setPropertyValue(PropertyImpl.java:178)
                     at org.jbpm.pvm.internal.id.PropertyImpl.setNextDbid(PropertyImpl.java:85)
                     at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:63)
                     at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
                     at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
                     at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
                     at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
                     at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
                     at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
                     at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
                     at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
                     at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
                     at org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine(SpringConfiguration.java:81)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:592)
                     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)


                    My config looks like this:
                    <?xml version="1.0" encoding="UTF-8"?>
                    
                    <jbpm-configuration>
                    
                     <import resource="jbpm.businesscalendar.cfg.xml" />
                     <import resource="jbpm.jpdl.cfg.xml" />
                    
                     <process-engine-context>
                     <repository-service />
                     <repository-cache />
                     <execution-service />
                     <history-service />
                     <management-service />
                     <task-service />
                     <identity-service />
                     <command-service name="txRequiredCommandService">
                     <retry-interceptor />
                     <environment-interceptor />
                     <spring-transaction-interceptor />
                     </command-service>
                    
                     <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
                     <field name="commandService">
                     <ref object="txRequiredCommandService" />
                     </field>
                     </object>
                    
                     <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer"
                     init="eager" />
                    
                     <import resource="jbpm.jobexecutor.cfg.xml" />
                    
                    
                     <types resource="jbpm.variable.types.xml" />
                     </process-engine-context>
                    
                     <transaction-context>
                     <repository-session />
                     <db-session />
                    
                     <message-session />
                     <timer-session />
                     <history-session />
                    
                     <object class="com.hrworx.formworx.service.user.JbpmIdentitySessionImpl" />
                     <transaction />
                     <hibernate-session current="false" />
                     </transaction-context>
                    
                    </jbpm-configuration>
                    


                    • 7. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                      Michael Wohlfart Expert

                       

                      org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl
                      

                      looks like your hibernate mapping is wrong, as far as I know there is a new table introduced in 4.2, the mapping is in "jbpm.repository.hbm.xml"

                      <class name="org.jbpm.pvm.internal.id.PropertyImpl" table="JBPM4_PROPERTY">
                      <id name="key" column="KEY_">
                      <generator class="assigned" />
                      </id>
                      <version name="version" column="VERSION_"/>
                      <property name="value" column="VALUE_"/>
                      </class>
                      


                      which is exactly what your installation is missing, there is an upgrade script, a good blog about this is here:
                      http://www.jorambarrez.be/blog/2009/10/30/new-feature-in-jbpm-4-2-auto-upgrade-your-jbpm-installation/
                      hope this makes your hibernate happy

                      • 8. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                        Bob Milstead Newbie

                        We are embedding jbpm in our application and this error occurs when we try to run the jUnit tests. I checked the libraries in my repository and looked for the mapping, and it exists in the jbpm.repository.hbm.xml which is in turn referenced from jbpm.hibernate.cfg.xml in our classpath.

                        Because we are still in the development phase, I did not need to bother upgrading the db, I just used the create script supplied in the distribution, and the jbpm4_property table is defined in there.

                        I have also deleted all the 4.0 and 4.1 jbpm libraries just to make sure I did not have a conflict there. I still have the problem. Here is my log file, maybe it will offer a clue:

                        2009-11-12 14:08:36,621 TRACE (Log4jLog.java:72) - loading wire bindings from resource: jar:file:/Users/bob/.m2/repository/org/jbpm/jbpm4/jbpm-pvm/4.2/jbpm-pvm-4.2.jar!/jbpm.wire.bindings.xml
                        2009-11-12 14:08:36,639 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TrueBinding
                        2009-11-12 14:08:36,642 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FalseBinding
                        2009-11-12 14:08:36,643 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.CharBinding
                        2009-11-12 14:08:36,646 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DoubleBinding
                        2009-11-12 14:08:36,647 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FloatBinding
                        2009-11-12 14:08:36,648 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IntBinding
                        2009-11-12 14:08:36,653 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ShortBinding
                        2009-11-12 14:08:36,655 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ByteBinding
                        2009-11-12 14:08:36,656 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.LongBinding
                        2009-11-12 14:08:36,661 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.StringBinding
                        2009-11-12 14:08:36,662 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.NullBinding
                        2009-11-12 14:08:36,664 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ClassBinding
                        2009-11-12 14:08:36,665 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ObjectBinding
                        2009-11-12 14:08:36,666 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RefBinding
                        2009-11-12 14:08:36,667 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JndiBinding
                        2009-11-12 14:08:36,668 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ListBinding
                        2009-11-12 14:08:36,670 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SetBinding
                        2009-11-12 14:08:36,672 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MapBinding
                        2009-11-12 14:08:36,675 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertiesBinding
                        2009-11-12 14:08:36,676 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ProcessEngineRefBinding
                        2009-11-12 14:08:36,677 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvRefBinding
                        2009-11-12 14:08:36,678 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvBinding
                        2009-11-12 14:08:36,680 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ContextRefBinding
                        2009-11-12 14:08:36,683 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionRefBinding
                        2009-11-12 14:08:36,684 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionBinding
                        2009-11-12 14:08:36,685 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobExecutorBinding
                        2009-11-12 14:08:36,688 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding
                        2009-11-12 14:08:36,689 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding
                        2009-11-12 14:08:36,690 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding
                        2009-11-12 14:08:36,691 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdComposerBinding
                        2009-11-12 14:08:36,692 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.pvm.internal.wire.binding.IdComposerBinding
                        2009-11-12 14:08:36,692 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailTemplateBinding
                        2009-11-12 14:08:36,694 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.AddressResolverBinding
                        2009-11-12 14:08:36,695 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding
                        2009-11-12 14:08:36,697 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding
                        2009-11-12 14:08:36,698 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionBinding
                        2009-11-12 14:08:36,699 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionFactoryBinding
                        2009-11-12 14:08:36,699 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DbSessionBinding
                        2009-11-12 14:08:36,700 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MessageSessionBinding
                        2009-11-12 14:08:36,701 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TimerSessionBinding
                        2009-11-12 14:08:36,702 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistorySessionBinding
                        2009-11-12 14:08:36,703 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentitySessionBinding
                        2009-11-12 14:08:36,703 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionFactoryBinding
                        2009-11-12 14:08:36,704 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionBinding
                        2009-11-12 14:08:36,706 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositorySessionBinding
                        2009-11-12 14:08:36,708 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailSessionBinding
                        2009-11-12 14:08:36,709 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TypesBinding
                        2009-11-12 14:08:36,712 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.CommandServiceBinding
                        2009-11-12 14:08:36,713 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding
                        2009-11-12 14:08:36,714 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding
                        2009-11-12 14:08:36,715 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentityServiceBinding
                        2009-11-12 14:08:36,716 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistoryServiceBinding
                        2009-11-12 14:08:36,716 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.TaskServiceBinding
                        2009-11-12 14:08:36,717 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryServiceBinding
                        2009-11-12 14:08:36,718 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryCacheBinding
                        2009-11-12 14:08:36,718 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.DeployerManagerBinding
                        2009-11-12 14:08:36,719 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SkipInterceptorBinding
                        2009-11-12 14:08:36,721 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding
                        2009-11-12 14:08:36,723 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding
                        2009-11-12 14:08:36,724 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding
                        2009-11-12 14:08:36,726 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.StandardTransactionInterceptorBinding
                        2009-11-12 14:08:36,727 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SerializeInterceptorBinding
                        2009-11-12 14:08:36,727 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.JtaTransactionInterceptorBinding
                        2009-11-12 14:08:36,728 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertyBinding
                        2009-11-12 14:08:36,729 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.FieldBinding
                        2009-11-12 14:08:36,730 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.InvokeBinding
                        2009-11-12 14:08:36,731 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SubscribeBinding
                        2009-11-12 14:08:36,732 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnlistBinding
                        2009-11-12 14:08:36,733 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
                        2009-11-12 14:08:36,734 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
                        2009-11-12 14:08:36,734 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
                        2009-11-12 14:08:36,736 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
                        2009-11-12 14:08:36,736 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
                        2009-11-12 14:08:36,737 TRACE (Log4jLog.java:72) - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
                        2009-11-12 14:08:36,737 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.jpdl.internal.xml.JpdlDeployerBinding
                        2009-11-12 14:08:36,739 TRACE (Log4jLog.java:72) - adding wire binding for org.jbpm.pvm.internal.wire.binding.SpringTransactionInterceptorBinding
                        2009-11-12 14:08:36,741 TRACE (Log4jLog.java:72) - skipping unavailable wire bindings resource jbpm.user.wire.bindings.xml
                        2009-11-12 14:08:36,779 DEBUG (Log4jLog.java:60) - no element parser for tag import in category descriptor
                        2009-11-12 14:08:36,885 TRACE (Log4jLog.java:72) - created ProcessEngine 16541077
                        2009-11-12 14:08:36,886 TRACE (Log4jLog.java:72) - process-engine-context 7427117
                        2009-11-12 14:08:36,886 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryCacheImpl
                        2009-11-12 14:08:36,886 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.type.TypeSet
                        2009-11-12 14:08:36,886 TRACE (Log4jLog.java:72) - org.jbpm.api.ManagementService
                        2009-11-12 14:08:36,887 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DatabaseIdComposer
                        2009-11-12 14:08:36,887 TRACE (Log4jLog.java:72) - org.jbpm.api.RepositoryService
                        2009-11-12 14:08:36,887 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.DeployerManager
                        2009-11-12 14:08:36,887 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.type.DefaultTypeSet
                        2009-11-12 14:08:36,888 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.TaskServiceImpl
                        2009-11-12 14:08:36,888 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.cal.BusinessCalendar
                        2009-11-12 14:08:36,888 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DbidGenerator
                        2009-11-12 14:08:36,889 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.IdComposer
                        2009-11-12 14:08:36,889 TRACE (Log4jLog.java:72) - org.jbpm.api.ExecutionService
                        2009-11-12 14:08:36,891 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.AbstractServiceImpl
                        2009-11-12 14:08:36,892 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryCache
                        2009-11-12 14:08:36,892 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.IdentityServiceImpl
                        2009-11-12 14:08:36,892 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.ExecutionServiceImpl
                        2009-11-12 14:08:36,893 TRACE (Log4jLog.java:72) - org.jbpm.api.TaskService
                        2009-11-12 14:08:36,893 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.cal.BusinessCalendarImpl
                        2009-11-12 14:08:36,893 TRACE (Log4jLog.java:72) - java.lang.Object
                        2009-11-12 14:08:36,893 TRACE (Log4jLog.java:72) - org.jbpm.api.HistoryService
                        2009-11-12 14:08:36,894 TRACE (Log4jLog.java:72) - org.jbpm.api.IdentityService
                        2009-11-12 14:08:36,894 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositoryServiceImpl
                        2009-11-12 14:08:36,894 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.ManagementServiceImpl
                        2009-11-12 14:08:36,895 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.id.DatabaseDbidGenerator
                        2009-11-12 14:08:36,895 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.svc.HistoryServiceImpl
                        2009-11-12 14:08:36,895 TRACE (Log4jLog.java:72) - java.io.Serializable
                        2009-11-12 14:08:36,896 TRACE (Log4jLog.java:72) - transaction-context:
                        2009-11-12 14:08:36,896 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.DbSession
                        2009-11-12 14:08:36,896 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.repository.RepositorySessionImpl
                        2009-11-12 14:08:36,897 TRACE (Log4jLog.java:72) - org.hibernate.jdbc.JDBCContext$Context
                        2009-11-12 14:08:36,898 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.TimerSession
                        2009-11-12 14:08:36,898 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.identity.spi.IdentitySession
                        2009-11-12 14:08:36,898 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.hibernate.DbSessionImpl
                        2009-11-12 14:08:36,899 TRACE (Log4jLog.java:72) - org.hibernate.classic.Session
                        2009-11-12 14:08:36,899 TRACE (Log4jLog.java:72) - java.lang.Object
                        2009-11-12 14:08:36,899 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.jobexecutor.JobExecutorTimerSession
                        2009-11-12 14:08:36,900 TRACE (Log4jLog.java:72) - com.hrworx.formworx.service.user.JbpmIdentitySessionImpl
                        2009-11-12 14:08:36,900 TRACE (Log4jLog.java:72) - org.hibernate.engine.SessionImplementor
                        2009-11-12 14:08:36,900 TRACE (Log4jLog.java:72) - org.hibernate.impl.SessionImpl
                        2009-11-12 14:08:36,900 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.tx.StandardTransaction
                        2009-11-12 14:08:36,901 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.MessageSession
                        2009-11-12 14:08:36,901 TRACE (Log4jLog.java:72) - org.hibernate.event.EventSource
                        2009-11-12 14:08:36,901 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.history.HistorySessionImpl
                        2009-11-12 14:08:36,902 TRACE (Log4jLog.java:72) - org.hibernate.transaction.TransactionFactory$Context
                        2009-11-12 14:08:36,902 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.history.HistorySession
                        2009-11-12 14:08:36,902 TRACE (Log4jLog.java:72) - org.hibernate.Session
                        2009-11-12 14:08:36,902 TRACE (Log4jLog.java:72) - java.io.Serializable
                        2009-11-12 14:08:36,903 TRACE (Log4jLog.java:72) - org.hibernate.impl.AbstractSessionImpl
                        2009-11-12 14:08:36,904 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.env.Transaction
                        2009-11-12 14:08:36,904 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.session.RepositorySession
                        2009-11-12 14:08:36,904 TRACE (Log4jLog.java:72) - org.jbpm.pvm.internal.jobexecutor.JobExecutorMessageSession
                        2009-11-12 14:08:36,905 TRACE (Log4jLog.java:72) - creating process-engine
                        2009-11-12 14:08:36,905 DEBUG (Log4jLog.java:60) - eagerly initializing org.jbpm.pvm.internal.id.DatabaseIdComposer
                        2009-11-12 14:08:36,906 TRACE (Log4jLog.java:72) - constructing org.jbpm.pvm.internal.id.DatabaseIdComposer
                        2009-11-12 14:08:36,910 TRACE (Log4jLog.java:72) - initializing org.jbpm.pvm.internal.id.DatabaseIdComposer
                        2009-11-12 14:08:36,910 TRACE (Log4jLog.java:72) - constructing txRequiredCommandService
                        2009-11-12 14:08:36,912 TRACE (Log4jLog.java:72) - initializing txRequiredCommandService
                        2009-11-12 14:08:36,914 TRACE (Log4jLog.java:72) - opening jbpm-springPvmEnvironment[4679618]
                        2009-11-12 14:08:36,915 TRACE (Log4jLog.java:72) - creating transaction
                        2009-11-12 14:08:36,915 TRACE (Log4jLog.java:72) - found org.jbpm.pvm.internal.tx.StandardTransaction in transaction
                        2009-11-12 14:08:36,916 TRACE (Log4jLog.java:72) - constructing org.jbpm.pvm.internal.tx.StandardTransaction
                        2009-11-12 14:08:36,917 TRACE (Log4jLog.java:72) - initializing org.jbpm.pvm.internal.tx.StandardTransaction
                        2009-11-12 14:08:36,917 TRACE (Log4jLog.java:72) - org.springframework.transaction.PlatformTransactionManager not found in transaction 12305750
                        2009-11-12 14:08:36,919 TRACE (Log4jLog.java:72) - org.springframework.transaction.PlatformTransactionManager not found in process-engine 7427117
                        2009-11-12 14:08:36,920 TRACE (Log4jLog.java:72) - beginning StandardTransaction[10007380]
                        2009-11-12 14:08:36,969 TRACE (Log4jLog.java:72) - found org.hibernate.Session in transaction
                        2009-11-12 14:08:36,970 TRACE (Log4jLog.java:72) - constructing org.hibernate.impl.SessionImpl
                        2009-11-12 14:08:36,970 TRACE (Log4jLog.java:72) - org.hibernate.SessionFactory not found in transaction 12305750
                        2009-11-12 14:08:36,970 TRACE (Log4jLog.java:72) - org.hibernate.SessionFactory not found in process-engine 7427117
                        2009-11-12 14:08:36,972 TRACE (Log4jLog.java:72) - creating hibernate session
                        2009-11-12 14:08:36,972 TRACE (Log4jLog.java:72) - found org.jbpm.pvm.internal.tx.StandardTransaction in transaction
                        2009-11-12 14:08:36,973 TRACE (Log4jLog.java:72) - delivering org.jbpm.pvm.internal.tx.StandardTransaction
                        2009-11-12 14:08:36,974 DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 1861345 --------------------------------------------------------
                        2009-11-12 14:08:36,974 TRACE (Log4jLog.java:72) - begun hibernate tx 10902815 on hibernate session 1861345
                        2009-11-12 14:08:36,975 TRACE (Log4jLog.java:72) - enlisting resource org.jbpm.pvm.internal.tx.HibernateSessionResource@2ba84d to standard transaction
                        2009-11-12 14:08:36,976 TRACE (Log4jLog.java:72) - initializing org.hibernate.impl.SessionImpl
                        2009-11-12 14:08:36,993 INFO (Log4jLog.java:52) - exception while executing command org.jbpm.pvm.internal.cmd.CheckDbCmd@1c7114
                        org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl
                         at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:550)
                         at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1338)
                         at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:98)
                         at org.hibernate.ejb.event.EJB3SaveEventListener.saveWithGeneratedId(EJB3SaveEventListener.java:43)
                         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
                         at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
                         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
                         at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
                         at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
                         at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
                         at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
                         at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
                         at org.jbpm.pvm.internal.id.PropertyImpl.setPropertyValue(PropertyImpl.java:178)
                         at org.jbpm.pvm.internal.id.PropertyImpl.setNextDbid(PropertyImpl.java:85)
                         at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:63)
                         at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
                         at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
                         at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
                         at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
                         at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
                         at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
                         at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
                         at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
                         at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
                         at org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine(SpringConfiguration.java:81)
                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                         at java.lang.reflect.Method.invoke(Method.java:592)
                         at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:115)
                         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:435)
                         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:903)
                         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:817)
                         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
                         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                         at java.security.AccessController.doPrivileged(Native Method)
                         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
                         at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
                         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
                         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
                         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
                         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
                         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
                         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
                         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
                         at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84)
                         at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:42)
                         at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:173)
                         at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:197)
                         at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109)
                         at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75)
                         at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
                         at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)
                         at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:148)
                         at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
                         at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
                         at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
                         at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
                         at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
                         at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
                         at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
                         at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
                         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
                        2009-11-12 14:08:37,008 TRACE (Log4jLog.java:72) - rolling back StandardTransaction[10007380]
                        2009-11-12 14:08:37,008 TRACE (Log4jLog.java:72) - rolling back resource org.jbpm.pvm.internal.tx.HibernateSessionResource@2ba84d
                        2009-11-12 14:08:37,009 DEBUG (Log4jLog.java:60) - ----- rolling back hibernate tx 10902815 -----------------------------------------------------
                        2009-11-12 14:08:37,009 TRACE (Log4jLog.java:72) - closing hibernate session 1861345
                        2009-11-12 14:08:37,010 TRACE (Log4jLog.java:72) - rolled back
                        2009-11-12 14:08:37,012 TRACE (Log4jLog.java:72) - closing transaction...
                        2009-11-12 14:08:37,012 TRACE (Log4jLog.java:72) - closing PvmEnvironment[4679618]
                        2009-11-12 14:08:37,012 TRACE (Log4jLog.java:72) - closed PvmEnvironment[4679618]
                        


                        • 9. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                          Santanu Saraswati Novice

                          Did you provide the hbm files to spring bean?

                          jbpm.hibernate.cfg.xml might be there, but you have not mentioned it in your jbpm.cfg.xml file. So jbpm will not get it. Now if you mention something like this in your jbpm.cfg.xml file

                           <hibernate-configuration>
                           <cfg resource="jbpm.hibernate.cfg.xml" />
                           </hibernate-configuration>
                          


                          the it might create some more problem.

                          When you are using jbpm with spring then you should let spring create the session factory and jbpm use that.

                          So just to have the jbpm.hibernate.cfg.xml will not help, and more over if you try to use that by giving it directly to jbpm cfg then you might end up in two session factories, one by spring and one by jbpm. That will be extremely messy.

                          The correct thing to do here is to provide the jbpm hbm files to spring local sessionfactory bean. The spring bean should have these entries, assuming the hbm files are in classpath:

                           <property name="mappingLocations">
                           <list>
                           <value>classpath:jbpm.execution.hbm.xml</value>
                           <value>classpath:jbpm.repository.hbm.xml</value>
                           <value>classpath:jbpm.task.hbm.xml</value>
                           <value>classpath:jbpm.history.hbm.xml</value>
                           </list>
                           </property>
                          


                          Hope this will see you through to success :)

                          • 10. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                            Bob Milstead Newbie

                            Santanu,

                            Thanks much for your continued support on this. I will not have time to thoroughly investigate your latest suggestions since I am traveling today, but I will do so over the weekend. I quick try of everything did not yet yield positive results.

                            Putting this

                            <hibernate-configuration>
                             <cfg resource="jbpm.hibernate.cfg.xml" />
                             </hibernate-configuration>


                            in jbpm.cfg.xml, but outside the jbpm-configuration block gives
                            Could not instantiate bean class [org.jbpm.pvm.internal.cfg.SpringConfiguration]: Constructor threw exception; nested exception is org.jbpm.api.JbpmException:
                             xml validation error: The markup in the document following the root element must be well-formed.


                            Putting it inside the jbpm-configuration block has no effect.

                            The second suggestion is a little confusing to me in several ways. First there is other important configuration in jbpm.hibernate.cfg.xml besides the imports of the other configuration files, and second, when I try to add mappingLocations to my session factory, it does not know about a mappingLocations property. Third, this was working fine in 4.0 and 4.1 without telling the session factory about jbpm.hibernate.cfg.xml. Somehow it was getting picked up.



                            First, here is my test jbpm.hibernate.cfg.xml for reference:

                            <hibernate-configuration>
                             <session-factory>
                             <!--
                             TODO refactor this, along with persistence.xml so that the
                             following lines only appear in one place
                             -->
                             <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
                             <property name="hibernate.show_sql">true</property>
                             <property name="hibernate.format_sql">false</property>
                             <property name="hibernate.archive.autodetection">class</property>
                             <property name="hibernate.connection.url">jdbc:hsqldb:target/test-hibernate</property>
                             <property name="hibernate.connection.username">sa</property>
                             <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
                            
                            
                             <property name="hibernate.connection.password"></property>
                             <property name="hibernate.hbm2ddl.auto">create-drop</property>
                            
                            
                             <mapping resource="jbpm.repository.hbm.xml" />
                             <mapping resource="jbpm.execution.hbm.xml" />
                             <mapping resource="jbpm.history.hbm.xml" />
                             <mapping resource="jbpm.task.hbm.xml" />
                             <mapping resource="jbpm.identity.hbm.xml" />
                            
                             </session-factory>
                            </hibernate-configuration>


                            Then the error when I try to add the mappingsLocations:

                            <bean id="entityManagerFactory"
                             class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                             <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
                             <property name="persistenceUnitManager" ref="persistenceUnitManager" />
                             </bean>
                            
                             <!-- Publishing session factory for use in jBPM -->
                             <bean id="sessionFactory" factory-bean="entityManagerFactory"
                             factory-method="getSessionFactory">
                             <property name="mappingLocations">
                             <list>
                             <value>classpath:jbpm.execution.hbm.xml</value>
                             <value>classpath:jbpm.repository.hbm.xml</value>
                             <value>classpath:jbpm.task.hbm.xml</value>
                             <value>classpath:jbpm.history.hbm.xml</value>
                             </list>
                             </property>
                             </bean>


                            Error creating bean with name 'sessionFactory' defined in class path resource [context/core/spring-dbContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'mappingLocations' of bean class [org.hibernate.impl.SessionFactoryImpl]: Bean property 'mappingLocations' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?


                            Any further suggestions you may have, I will try to look at over the weekend.

                            Thanks again.



                            • 11. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                              Santanu Saraswati Novice

                              Well, I was not aware that you were using JPA.

                              You should not be using "hibernate-configuration" in jbpm.cfg.xml file when using SpringConficuration.

                              If you use JPA then you need to mention the mapping locations in persistance.xml of JPA. Whatever you mentioned in your TODO list, of moving things to persistance.xml should do the work for you.

                              And also do not create the session factory bean if you are using JPA. That is only valid for hibernate-spring combination.

                              • 12. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                                Bob Milstead Newbie

                                Thanks again for the reply. This is going to be a useful thread for others someday, hopefully.

                                OK, the same problem still remains with Unknown Entity: PropertyImpl

                                Here are the relevant configuration files as they currently exist:

                                <jbpm-configuration>
                                 <import resource="jbpm.businesscalendar.cfg.xml" />
                                 <import resource="jbpm.jpdl.cfg.xml" />
                                
                                 <process-engine-context>
                                 <repository-service />
                                 <repository-cache />
                                 <execution-service />
                                 <history-service />
                                 <management-service />
                                 <task-service />
                                 <identity-service />
                                 <command-service name="txRequiredCommandService">
                                 <retry-interceptor />
                                 <environment-interceptor />
                                 <spring-transaction-interceptor />
                                 </command-service>
                                
                                 <object class="org.jbpm.pvm.internal.id.DatabaseDbidGenerator">
                                 <field name="commandService">
                                 <ref object="txRequiredCommandService" />
                                 </field>
                                 </object>
                                
                                 <object class="org.jbpm.pvm.internal.id.DatabaseIdComposer"
                                 init="eager" />
                                
                                 <import resource="jbpm.jobexecutor.cfg.xml" />
                                 <types resource="jbpm.variable.types.xml" />
                                 </process-engine-context>
                                
                                 <transaction-context>
                                 <repository-session />
                                 <db-session />
                                 <message-session />
                                 <timer-session />
                                 <history-session />
                                
                                 <object class="com.hrworx.formworx.service.user.JbpmIdentitySessionImpl" />
                                 <transaction />
                                 <hibernate-session current="false" />
                                 </transaction-context>
                                
                                </jbpm-configuration>


                                <persistence-unit name="formworxPU">
                                 <provider>org.hibernate.ejb.HibernatePersistence</provider>
                                 <properties>
                                 <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect" />
                                 <property name="hibernate.show_sql" value="false" />
                                 <property name="hibernate.format_sql" value="false" />
                                 <property name="hibernate.archive.autodetection" value="class" />
                                 <property name="hibernate.connection.url" value="jdbc:hsqldb:target/test-hibernate" />
                                 <property name="hibernate.connection.username" value="sa" />
                                 <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
                                 <property name="mappingLocations">
                                 <list>
                                 <value>classpath:jbpm.execution.hbm.xml</value>
                                 <value>classpath:jbpm.repository.hbm.xml</value>
                                 <value>classpath:jbpm.task.hbm.xml</value>
                                 <value>classpath:jbpm.history.hbm.xml</value>
                                 </list>
                                 </property>
                                 </properties>
                                 </persistence-unit>
                                </persistence>


                                <bean id="entityManagerFactory"
                                 class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                                 <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
                                 <property name="persistenceUnitManager" ref="persistenceUnitManager" />
                                 </bean>
                                
                                 <!-- Publishing session factory for use in jBPM -->
                                 <bean id="sessionFactory" factory-bean="entityManagerFactory"
                                 factory-method="getSessionFactory">
                                 </bean>


                                If I comment out the sessionFactory bean I get:
                                Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.jbpm.pvm.internal.wire.WireException: couldn't find hibernate-session-factory by type to open a hibernate-session


                                If I do leave the sessionFactory defined, then I get the same old error:
                                Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.hibernate.MappingException: Unknown entity: org.jbpm.pvm.internal.id.PropertyImpl


                                My pom.xml contains the following entry:
                                <dependency>
                                 <groupId>org.jbpm.jbpm4</groupId>
                                 <artifactId>jbpm-pvm</artifactId>
                                 <version>4.2</version>
                                 </dependency>


                                and when I look in my repository, I find jbpm-pvm-4.2.jar which contains jbpm.repository.hbm.xml which contains:
                                <class name="org.jbpm.pvm.internal.id.PropertyImpl" table="JBPM4_PROPERTY">
                                 <id name="key" column="KEY_">
                                 <generator class="assigned" />
                                 </id>
                                 <version name="version" column="VERSION_" />
                                 <property name="value" column="VALUE_" />
                                 </class>




                                • 13. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                                  Rocker Rocker Newbie

                                  I was getting NullPointerException but after adding command service name i am getting this error -

                                  Caused by:
                                  org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pv
                                  m.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.springframework.transaction
                                  .IllegalTransactionStateException: No existing transaction found for transaction marked with propagation 'mandatory'
                                  Caused by:
                                  org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with p
                                  ropagation 'mandatory'
                                  at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransact
                                  ionManager.java:339)
                                  at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
                                  at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
                                  at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
                                  at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
                                  at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
                                  at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
                                  at org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine(SpringConfiguration.java:81)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                                  at java.lang.reflect.Method.invoke(Method.java:597)

                                  • 14. Re: Problem moving from 4.1 to 4.2 using Spring configuratio
                                    Santanu Saraswati Novice

                                    Bob,
                                    are you sure that there is no other jbpm.repository.hbm.xml in classpath? I do not see any problem with your configuration. If you are sure that there is no secong repository hbm then you need to do hard debugging of hibernate. In such a case you should watch org.hibernate.cfg.Configuration.classes. classes is a map in Configuration class which contains all the persistent classes hibernate found. Its very unlikely that you will get the PropertyImpl entry there (because it is throwing exception). From there you need to back track to the place where it creates the Configuration object. I do not see any short cut left for you :(

                                    Rocker,
                                    you may need to look at transaction-context and spring-transaction-interceptor. Make sure spring transaction interceptor does not have useCurrent flag on.

                                    The reason why you might be getting the exception is that transaction propagation behaviour is set to "PROPAGATION_MANDATORY". But checkDb has to run in a new transaction. Because of Propagation mandatory, it does not create a transaction, expects that a transaction will be existing. But in does not find any transaction. So explodes.

                                    1 2 3 Previous Next