0 Replies Latest reply on Sep 4, 2009 11:47 AM by Bjorn Harvold

    Spring - jBPM Integration: org.hibernate.HibernateException:

    Bjorn Harvold Newbie

      Hi,

      I am trying to integrate Spring 3.0.0M4 and jBPM v4.1. I have followed the instructions from the sample application jbpm4-spring here: http://anonsvn.jboss.org/repos/jbpm/projects/demos/

      My spring configuration looks like this:

      <tx:annotation-driven transaction-manager="transactionManager"/>
      
       <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource">
       <property name="driverClassName" value="${database.driverClassName}"/>
       <property name="url" value="${database.url}"/>
       <property name="username" value="${database.username}"/>
       <property name="password" value="${database.password}"/>
       </bean>
      
       <!-- wrapping dataSource reference into a lazy datasource -->
       <bean id="lazyDataSourceProxy" class="org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy" primary="true">
       <property name="targetDataSource" ref="dataSource"/>
       </bean>
      
       <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
       scope="singleton">
       <property name="dataSource" ref="lazyDataSourceProxy"/>
       <property name="hibernateProperties">
       <props>
       <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
       <prop key="hibernate.show_sql">false</prop>
       <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
      
       <prop key="hibernate.cache.use_query_cache">true</prop>
       <prop key="hibernate.cache.use_minimal_puts">true</prop>
       <prop key="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</prop>
       <prop key="hibernate.current_session_context_class">thread</prop>
       </props>
       </property>
       <property name="schemaUpdate" value="true"/>
       <property name="configLocations">
       <list>
       <value>classpath:hibernate.cfg.xml</value>
       </list>
       </property>
       <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>
      
       <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
       <property name="sessionFactory" ref="sessionFactory"/>
       </bean>
      
       <!-- Parent bean for all our DAOs -->
       <bean id="hibSupport" class="org.springframework.orm.hibernate3.support.HibernateDaoSupport" abstract="true"
       lazy-init="true">
       <property name="hibernateTemplate" ref="hibernateTemplate"/>
       <property name="sessionFactory" ref="sessionFactory"/>
       </bean>
      
       <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
       <property name="sessionFactory" ref="sessionFactory"/>
       </bean>
      
       <bean id="hibInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
       <property name="sessionFactory" ref="sessionFactory"/>
       </bean>
      
       <bean id="jbpmConfiguration" class="org.jbpm.pvm.internal.cfg.SpringConfiguration">
       <constructor-arg value="jbpm.cfg.xml" />
       </bean>
      
       <bean id="processEngine" factory-bean="jbpmConfiguration" factory-method="buildProcessEngine" />
       <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
       <bean id="executionService" factory-bean="processEngine" factory-method="getExecutionService" />
      


      My jbpm.cfg.xml looks like this (straight from the demo):
      <?xml version="1.0" encoding="UTF-8"?>
      
      <jbpm-configuration>
      
       <import resource="jbpm.jpdl.cfg.xml" />
       <import resource="jbpm.identity.cfg.xml" />
       <import resource="jbpm.jobexecutor.cfg.xml" />
      
       <process-engine-context>
       <repository-service />
       <repository-cache />
       <execution-service />
       <history-service />
       <management-service />
       <identity-service />
       <task-service />
      
       <!-- Here we needed to change the transaction interceptor -->
       <command-service>
       <retry-interceptor />
       <environment-interceptor />
       <spring-transaction-interceptor />
       </command-service>
      
       <!-- Added spring as read-context -->
       <script-manager default-expression-language="juel"
       default-script-language="juel"
       read-contexts="execution, environment, process-engine, spring"
       write-context="">
       <script-language name="juel"
       factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
       </script-manager>
      
       <id-generator />
       <types resource="jbpm.variable.types.xml" />
      
       <address-resolver />
      
       <business-calendar>
       <monday hours="9:00-12:00 and 12:30-17:00" />
       <tuesday hours="9:00-12:00 and 12:30-17:00" />
       <wednesday hours="9:00-12:00 and 12:30-17:00" />
       <thursday hours="9:00-12:00 and 12:30-17:00" />
       <friday hours="9:00-12:00 and 12:30-17:00" />
       <holiday period="01/07/2008 - 31/08/2008" />
       </business-calendar>
      
       <mail-template name='task-notification'>
       <to users="${task.assignee}" />
       <subject>${task.name}</subject>
       <text><![CDATA[Hi ${task.assignee},
      Task "${task.name}" has been assigned to you.
      ${task.description}
      
      Sent by JBoss jBPM
      ]]></text>
       </mail-template>
      
       <mail-template name='task-reminder'>
       <to users="${task.assignee}" />
       <subject>${task.name}</subject>
       <text><![CDATA[Hey ${task.assignee},
      Do not forget about task "${task.name}".
      ${task.description}
      
      Sent by JBoss jBPM
      ]]></text>
       </mail-template>
      
      
      
       </process-engine-context>
      
       <transaction-context>
       <repository-session />
       <db-session />
      
       <message-session />
       <timer-session />
       <history-session />
       <mail-session>
       <mail-server>
       <session-properties resource="jbpm.mail.properties" />
       </mail-server>
       </mail-session>
      
       <!-- Need to set explicitly that we don't want jbpm to create sessions -->
       <hibernate-session current="true" />
       </transaction-context>
      </jbpm-configuration>
      


      And my hibername.cfg.xml looks like this (also straight from the demo):
      <hibernate-configuration>
       <session-factory name="jbpm4-spring">
       <property name="hibernate.bytecode.use_reflection_optimizer">false</property>
       </session-factory>
      </hibernate-configuration>
      


      My application starts up, Hibernate creates all the necessary tables, but fails because it couldn't find a transactionManager:
      2009-09-04 11:19:47,983 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TrueBinding
      2009-09-04 11:19:47,986 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.FalseBinding
      2009-09-04 11:19:47,987 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.CharBinding
      2009-09-04 11:19:47,990 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.DoubleBinding
      2009-09-04 11:19:47,991 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.FloatBinding
      2009-09-04 11:19:47,994 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.IntBinding
      2009-09-04 11:19:47,998 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ShortBinding
      2009-09-04 11:19:48,000 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ByteBinding
      2009-09-04 11:19:48,001 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.LongBinding
      2009-09-04 11:19:48,004 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.StringBinding
      2009-09-04 11:19:48,006 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.NullBinding
      2009-09-04 11:19:48,007 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ClassBinding
      2009-09-04 11:19:48,007 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ObjectBinding
      2009-09-04 11:19:48,009 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.RefBinding
      2009-09-04 11:19:48,009 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JndiBinding
      2009-09-04 11:19:48,010 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ListBinding
      2009-09-04 11:19:48,012 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.SetBinding
      2009-09-04 11:19:48,015 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.MapBinding
      2009-09-04 11:19:48,017 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertiesBinding
      2009-09-04 11:19:48,018 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ProcessEngineRefBinding
      2009-09-04 11:19:48,018 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvRefBinding
      2009-09-04 11:19:48,019 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvBinding
      2009-09-04 11:19:48,020 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ContextRefBinding
      2009-09-04 11:19:48,021 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionRefBinding
      2009-09-04 11:19:48,021 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TransactionBinding
      2009-09-04 11:19:48,022 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobExecutorBinding
      2009-09-04 11:19:48,026 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding
      2009-09-04 11:19:48,027 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding
      2009-09-04 11:19:48,028 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.BusinessCalendarBinding
      2009-09-04 11:19:48,029 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdGeneratorBinding
      2009-09-04 11:19:48,030 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailTemplateBinding
      2009-09-04 11:19:48,031 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.AddressResolverBinding
      2009-09-04 11:19:48,032 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateConfigurationBinding
      2009-09-04 11:19:48,033 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.SeamHibernateSessionBinding
      2009-09-04 11:19:48,036 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionBinding
      2009-09-04 11:19:48,037 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.HibernateSessionFactoryBinding
      2009-09-04 11:19:48,038 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.DbSessionBinding
      2009-09-04 11:19:48,039 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.MessageSessionBinding
      2009-09-04 11:19:48,040 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TimerSessionBinding
      2009-09-04 11:19:48,040 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistorySessionBinding
      2009-09-04 11:19:48,041 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentitySessionBinding
      2009-09-04 11:19:48,042 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionFactoryBinding
      2009-09-04 11:19:48,043 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JbossIdmIdentitySessionBinding
      2009-09-04 11:19:48,045 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositorySessionBinding
      2009-09-04 11:19:48,046 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.MailSessionBinding
      2009-09-04 11:19:48,047 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TypesBinding
      2009-09-04 11:19:48,051 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.CommandServiceBinding
      2009-09-04 11:19:48,052 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ExecutionServiceBinding
      2009-09-04 11:19:48,052 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.ManagementServiceBinding
      2009-09-04 11:19:48,056 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.IdentityServiceBinding
      2009-09-04 11:19:48,057 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.HistoryServiceBinding
      2009-09-04 11:19:48,058 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.TaskServiceBinding
      2009-09-04 11:19:48,059 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryServiceBinding
      2009-09-04 11:19:48,060 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.RepositoryCacheBinding
      2009-09-04 11:19:48,060 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.DeployerManagerBinding
      2009-09-04 11:19:48,061 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding
      2009-09-04 11:19:48,062 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding
      2009-09-04 11:19:48,063 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding
      2009-09-04 11:19:48,067 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.StandardTransactionInterceptorBinding
      2009-09-04 11:19:48,067 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.SerializeInterceptorBinding
      2009-09-04 11:19:48,068 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.JtaTransactionInterceptorBinding
      2009-09-04 11:19:48,069 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.PropertyBinding
      2009-09-04 11:19:48,070 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.FieldBinding
      2009-09-04 11:19:48,071 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.InvokeBinding
      2009-09-04 11:19:48,072 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.SubscribeBinding
      2009-09-04 11:19:48,073 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.EnlistBinding
      2009-09-04 11:19:48,075 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
      2009-09-04 11:19:48,077 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding with context classloader null
      2009-09-04 11:19:48,078 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding with pvm lib classloader null
      2009-09-04 11:19:48,079 TRACE Log4jLog.trace():72 - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbTimerSessionBinding
      2009-09-04 11:19:48,079 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
      2009-09-04 11:19:48,080 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding with context classloader null
      2009-09-04 11:19:48,080 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding with pvm lib classloader null
      2009-09-04 11:19:48,080 TRACE Log4jLog.trace():72 - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbLocalCommandServiceBinding
      2009-09-04 11:19:48,081 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
      2009-09-04 11:19:48,081 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding with context classloader null
      2009-09-04 11:19:48,082 TRACE Log4jLog.trace():72 - couldn't load class org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding with pvm lib classloader null
      2009-09-04 11:19:48,082 TRACE Log4jLog.trace():72 - couldn't instantiate binding org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding
      2009-09-04 11:19:48,082 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.jpdl.internal.xml.JpdlDeployerBinding
      2009-09-04 11:19:48,085 TRACE Log4jLog.trace():72 - adding wire binding for org.jbpm.pvm.internal.wire.binding.SpringTransactionInterceptorBinding
      2009-09-04 11:19:48,086 TRACE Log4jLog.trace():72 - using context classloader
      2009-09-04 11:19:48,087 TRACE Log4jLog.trace():72 - getting resources jbpm.user.wire.bindings.xml
      2009-09-04 11:19:48,087 TRACE Log4jLog.trace():72 - skipping unavailable wire bindings resource jbpm.user.wire.bindings.xml
      2009-09-04 11:19:48,098 TRACE Log4jLog.trace():72 - using context classloader
      2009-09-04 11:19:48,099 TRACE Log4jLog.trace():72 - getting resource as stream jbpm.jpdl.cfg.xml
      2009-09-04 11:19:48,108 TRACE Log4jLog.trace():72 - using context classloader
      2009-09-04 11:19:48,108 TRACE Log4jLog.trace():72 - getting resource as stream jbpm.identity.cfg.xml
      2009-09-04 11:19:48,112 TRACE Log4jLog.trace():72 - using context classloader
      2009-09-04 11:19:48,113 TRACE Log4jLog.trace():72 - getting resource as stream jbpm.jobexecutor.cfg.xml
      2009-09-04 11:19:48,134 TRACE Log4jLog.trace():72 - using context classloader
      2009-09-04 11:19:48,136 TRACE Log4jLog.trace():72 - getting resource as stream jbpm.variable.types.xml
      2009-09-04 11:19:48,179 TRACE Log4jLog.trace():72 - created ProcessEngine 1717362942
      2009-09-04 11:19:48,179 TRACE Log4jLog.trace():72 - process-engine-context 1538750514
      2009-09-04 11:19:48,180 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.script.ScriptManager
      2009-09-04 11:19:48,180 TRACE Log4jLog.trace():72 - org.jbpm.api.ManagementService
      2009-09-04 11:19:48,180 TRACE Log4jLog.trace():72 - java.lang.Object
      2009-09-04 11:19:48,180 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.TaskServiceImpl
      2009-09-04 11:19:48,180 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.cmd.CommandService
      2009-09-04 11:19:48,181 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.repository.RepositoryServiceImpl
      2009-09-04 11:19:48,181 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.email.impl.MailTemplateRegistry
      2009-09-04 11:19:48,181 TRACE Log4jLog.trace():72 - org.jbpm.api.ExecutionService
      2009-09-04 11:19:48,181 TRACE Log4jLog.trace():72 - java.io.Serializable
      2009-09-04 11:19:48,182 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.email.spi.AddressResolver
      2009-09-04 11:19:48,183 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.type.TypeSet
      2009-09-04 11:19:48,183 TRACE Log4jLog.trace():72 - org.jbpm.api.TaskService
      2009-09-04 11:19:48,183 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.cal.BusinessCalendarImpl
      2009-09-04 11:19:48,184 TRACE Log4jLog.trace():72 - org.jbpm.api.RepositoryService
      2009-09-04 11:19:48,184 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.ExecutionServiceImpl
      2009-09-04 11:19:48,184 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.repository.RepositoryCache
      2009-09-04 11:19:48,188 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.repository.DeployerManager
      2009-09-04 11:19:48,189 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.cal.BusinessCalendar
      2009-09-04 11:19:48,189 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.AbstractServiceImpl
      2009-09-04 11:19:48,189 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.email.impl.DefaultAddressResolver
      2009-09-04 11:19:48,190 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.ManagementServiceImpl
      2009-09-04 11:19:48,200 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.IdentityServiceImpl
      2009-09-04 11:19:48,201 TRACE Log4jLog.trace():72 - org.jbpm.api.IdentityService
      2009-09-04 11:19:48,201 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.type.DefaultTypeSet
      2009-09-04 11:19:48,202 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.repository.RepositoryCacheImpl
      2009-09-04 11:19:48,202 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.model.DefaultIdGenerator
      2009-09-04 11:19:48,202 TRACE Log4jLog.trace():72 - org.jbpm.api.HistoryService
      2009-09-04 11:19:48,202 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.svc.HistoryServiceImpl
      2009-09-04 11:19:48,203 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.model.IdGenerator
      2009-09-04 11:19:48,204 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,204 TRACE Log4jLog.trace():72 - transaction-context:
      2009-09-04 11:19:48,204 TRACE Log4jLog.trace():72 - org.hibernate.classic.Session
      2009-09-04 11:19:48,204 TRACE Log4jLog.trace():72 - org.hibernate.impl.AbstractSessionImpl
      2009-09-04 11:19:48,205 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.email.impl.MailSessionImpl
      2009-09-04 11:19:48,206 TRACE Log4jLog.trace():72 - java.lang.Object
      2009-09-04 11:19:48,208 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.history.HistorySessionImpl
      2009-09-04 11:19:48,208 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.identity.spi.IdentitySession
      2009-09-04 11:19:48,209 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.identity.impl.IdentitySessionImpl
      2009-09-04 11:19:48,209 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.session.RepositorySession
      2009-09-04 11:19:48,209 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.session.MessageSession
      2009-09-04 11:19:48,209 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.jobexecutor.JobExecutorTimerSession
      2009-09-04 11:19:48,210 TRACE Log4jLog.trace():72 - org.hibernate.engine.SessionImplementor
      2009-09-04 11:19:48,210 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.jobexecutor.JobExecutorMessageSession
      2009-09-04 11:19:48,210 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.repository.RepositorySessionImpl
      2009-09-04 11:19:48,211 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.session.DbSession
      2009-09-04 11:19:48,211 TRACE Log4jLog.trace():72 - org.hibernate.event.EventSource
      2009-09-04 11:19:48,211 TRACE Log4jLog.trace():72 - java.io.Serializable
      2009-09-04 11:19:48,211 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.email.spi.MailSession
      2009-09-04 11:19:48,212 TRACE Log4jLog.trace():72 - org.hibernate.impl.SessionImpl
      2009-09-04 11:19:48,212 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.history.HistorySession
      2009-09-04 11:19:48,212 TRACE Log4jLog.trace():72 - org.hibernate.Session
      2009-09-04 11:19:48,212 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.hibernate.DbSessionImpl
      2009-09-04 11:19:48,213 TRACE Log4jLog.trace():72 - org.hibernate.transaction.TransactionFactory$Context
      2009-09-04 11:19:48,213 TRACE Log4jLog.trace():72 - org.hibernate.jdbc.JDBCContext$Context
      2009-09-04 11:19:48,213 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.session.TimerSession
      2009-09-04 11:19:48,214 TRACE Log4jLog.trace():72 - creating process-engine
      2009-09-04 11:19:48,218 DEBUG Log4jLog.debug():60 - eagerly initializing org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,219 TRACE Log4jLog.trace():72 - constructing org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,226 TRACE Log4jLog.trace():72 - initializing org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,227 TRACE Log4jLog.trace():72 - found field commandService in org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,227 TRACE Log4jLog.trace():72 - looking up interface org.jbpm.pvm.internal.cmd.CommandService by type in process-engine
      2009-09-04 11:19:48,228 TRACE Log4jLog.trace():72 - found org.jbpm.pvm.internal.cmd.CommandService in process-engine
      2009-09-04 11:19:48,228 TRACE Log4jLog.trace():72 - constructing org.jbpm.pvm.internal.cmd.CommandService
      2009-09-04 11:19:48,231 TRACE Log4jLog.trace():72 - initializing org.jbpm.pvm.internal.cmd.CommandService
      2009-09-04 11:19:48,232 TRACE Log4jLog.trace():72 - setting field 'commandService' to value 'org.jbpm.pvm.internal.svc.RetryInterceptor@3ff23f8b'
      2009-09-04 11:19:48,233 TRACE Log4jLog.trace():72 - making field accessible
      2009-09-04 11:19:48,233 TRACE Log4jLog.trace():72 - searching for method start in org.jbpm.pvm.internal.jobexecutor.JobExecutor
      2009-09-04 11:19:48,233 TRACE Log4jLog.trace():72 - found matching method org.jbpm.pvm.internal.jobexecutor.JobExecutor.start
      2009-09-04 11:19:48,234 TRACE Log4jLog.trace():72 - invoking 'start' on 'org.jbpm.pvm.internal.jobexecutor.JobExecutor@3929df79' with null
      2009-09-04 11:19:48,234 TRACE Log4jLog.trace():72 - making method accessible
      2009-09-04 11:19:48,238 TRACE Log4jLog.trace():72 - starting thread pool for job executor 'JobExecutor-192.168.0.197'...
      2009-09-04 11:19:48,248 TRACE Log4jLog.trace():72 - starting dispatcher thread for job executor 'JobExecutor-192.168.0.197'...
      2009-09-04 11:19:48,249 INFO Log4jLog.info():48 - starting DispatcherThread
      2009-09-04 11:19:48,250 TRACE Log4jLog.trace():72 - delivering null for undefined object user.command.service
      2009-09-04 11:19:48,266 TRACE Log4jLog.trace():72 - opening jbpm-springPvmEnvironment[420110874]
      2009-09-04 11:19:48,267 TRACE Log4jLog.trace():72 - creating transaction
      2009-09-04 11:19:48,274 TRACE Log4jLog.trace():72 - found org.jbpm.api.RepositoryService in process-engine
      2009-09-04 11:19:48,276 TRACE Log4jLog.trace():72 - constructing org.jbpm.pvm.internal.repository.RepositoryServiceImpl
      2009-09-04 11:19:48,278 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.tx.StandardTransaction not found in transaction 297690383
      2009-09-04 11:19:48,278 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.tx.StandardTransaction not found in process-engine 1538750514
      2009-09-04 11:19:48,279 TRACE Log4jLog.trace():72 - initializing org.jbpm.pvm.internal.repository.RepositoryServiceImpl
      2009-09-04 11:19:48,280 TRACE Log4jLog.trace():72 - found org.jbpm.pvm.internal.cmd.CommandService in process-engine
      2009-09-04 11:19:48,287 TRACE Log4jLog.trace():72 - delivering org.jbpm.pvm.internal.cmd.CommandService
      2009-09-04 11:19:48,288 TRACE Log4jLog.trace():72 - auto wiring field commandService in org.jbpm.pvm.internal.repository.RepositoryServiceImpl
      2009-09-04 11:19:48,288 TRACE Log4jLog.trace():72 - setting field 'commandService' to value 'org.jbpm.pvm.internal.svc.RetryInterceptor@3ff23f8b'
      2009-09-04 11:19:48,289 TRACE Log4jLog.trace():72 - making field accessible
      2009-09-04 11:19:48,310 TRACE Log4jLog.trace():72 - found org.jbpm.api.ExecutionService in process-engine
      2009-09-04 11:19:48,312 TRACE Log4jLog.trace():72 - constructing org.jbpm.pvm.internal.svc.ExecutionServiceImpl
      2009-09-04 11:19:48,315 TRACE Log4jLog.trace():72 - initializing org.jbpm.pvm.internal.svc.ExecutionServiceImpl
      2009-09-04 11:19:48,315 TRACE Log4jLog.trace():72 - found field commandService in org.jbpm.pvm.internal.svc.AbstractServiceImpl
      2009-09-04 11:19:48,316 TRACE Log4jLog.trace():72 - looking up interface org.jbpm.pvm.internal.cmd.CommandService by type in process-engine
      2009-09-04 11:19:48,316 TRACE Log4jLog.trace():72 - found org.jbpm.pvm.internal.cmd.CommandService in process-engine
      2009-09-04 11:19:48,316 TRACE Log4jLog.trace():72 - delivering org.jbpm.pvm.internal.cmd.CommandService
      2009-09-04 11:19:48,317 TRACE Log4jLog.trace():72 - setting field 'commandService' to value 'org.jbpm.pvm.internal.svc.RetryInterceptor@3ff23f8b'
      2009-09-04 11:19:48,317 TRACE Log4jLog.trace():72 - making field accessible
      2009-09-04 11:19:48,427 INFO EntryPointInjectionBeanPostProcessor.postProcessBeforeInitialization():30 - Selecting AuthenticationEntryPoint for use in ExceptionTranslationFilter
      2009-09-04 11:19:48,491 INFO EntryPointInjectionBeanPostProcessor.postProcessBeforeInitialization():38 - Using main configured AuthenticationEntryPoint.
      2009-09-04 11:19:48,491 INFO EntryPointInjectionBeanPostProcessor.postProcessBeforeInitialization():46 - Using bean 'org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint@4d88e490' as the entry point.
      2009-09-04 11:19:48,503 INFO AbstractSecurityInterceptor.afterPropertiesSet():216 - Validated configuration attributes
      2009-09-04 11:19:48,596 INFO RememberMeServicesInjectionBeanPostProcessor.postProcessBeforeInitialization():43 - Setting RememberMeServices on bean _basicAuthenticationFilter
      2009-09-04 11:19:48,615 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():57 - Checking sorted filter chain: [org.springframework.security.concurrent.ConcurrentSessionFilter[ order=100; ], org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], org.springframework.security.ui.logout.LogoutFilter[ order=300; ], org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ], org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ], org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@75ecda50]
      2009-09-04 11:19:48,615 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():74 - Filter chain...
      2009-09-04 11:19:48,616 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [0] - org.springframework.security.concurrent.ConcurrentSessionFilter[ order=100; ]
      2009-09-04 11:19:48,616 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [1] - org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ]
      2009-09-04 11:19:48,616 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [2] - org.springframework.security.ui.logout.LogoutFilter[ order=300; ]
      2009-09-04 11:19:48,617 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [3] - org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ]
      2009-09-04 11:19:48,617 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [4] - org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ]
      2009-09-04 11:19:48,617 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [5] - org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ]
      2009-09-04 11:19:48,617 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [6] - org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ]
      2009-09-04 11:19:48,617 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [7] - org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ]
      2009-09-04 11:19:48,618 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [8] - org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ]
      2009-09-04 11:19:48,618 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [9] - org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ]
      2009-09-04 11:19:48,618 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():78 - [10] - org.springframework.security.intercept.web.FilterSecurityInterceptor@75ecda50
      2009-09-04 11:19:48,619 INFO FilterChainProxyPostProcessor.checkLoginPageIsntProtected():134 - Checking whether login URL '/login' is accessible with your configuration
      2009-09-04 11:19:48,620 INFO FilterChainProxyPostProcessor.postProcessBeforeInitialization():91 - FilterChainProxy: FilterChainProxy[ UrlMatcher = org.springframework.security.util.AntUrlPathMatcher[requiresLowerCase='true']; Filter Chains: {/**=[org.springframework.security.concurrent.ConcurrentSessionFilter[ order=100; ], org.springframework.security.context.HttpSessionContextIntegrationFilter[ order=200; ], org.springframework.security.ui.logout.LogoutFilter[ order=300; ], org.springframework.security.ui.webapp.AuthenticationProcessingFilter[ order=700; ], org.springframework.security.ui.basicauth.BasicProcessingFilter[ order=1000; ], org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter[ order=1100; ], org.springframework.security.ui.rememberme.RememberMeProcessingFilter[ order=1200; ], org.springframework.security.providers.anonymous.AnonymousProcessingFilter[ order=1300; ], org.springframework.security.ui.ExceptionTranslationFilter[ order=1400; ], org.springframework.security.ui.SessionFixationProtectionFilter[ order=1600; ], org.springframework.security.intercept.web.FilterSecurityInterceptor@75ecda50]}]
      2009-09-04 11:19:48,706 TRACE Log4jLog.trace():72 - org.springframework.transaction.PlatformTransactionManager not found in transaction 297690383
      2009-09-04 11:19:48,711 TRACE Log4jLog.trace():72 - org.springframework.transaction.PlatformTransactionManager not found in process-engine 1538750514
      2009-09-04 11:19:48,714 INFO ContextLoader.initWebApplicationContext():207 - Root WebApplicationContext: initialization completed in 10957 ms
      2009-09-04 11:19:48,728 TRACE Log4jLog.trace():72 - found org.jbpm.pvm.internal.session.DbSession in transaction
      2009-09-04 11:19:48,728 TRACE Log4jLog.trace():72 - constructing org.jbpm.pvm.internal.hibernate.DbSessionImpl
      2009-09-04 11:19:48,729 TRACE Log4jLog.trace():72 - initializing org.jbpm.pvm.internal.hibernate.DbSessionImpl
      2009-09-04 11:19:48,729 TRACE Log4jLog.trace():72 - found org.hibernate.Session in transaction
      2009-09-04 11:19:48,730 TRACE Log4jLog.trace():72 - constructing org.hibernate.impl.SessionImpl
      2009-09-04 11:19:48,730 TRACE Log4jLog.trace():72 - org.hibernate.SessionFactory not found in transaction 297690383
      2009-09-04 11:19:48,730 TRACE Log4jLog.trace():72 - org.hibernate.SessionFactory not found in process-engine 1538750514
      2009-09-04 11:19:48,731 TRACE Log4jLog.trace():72 - getting current hibernate session
      2009-09-04 11:19:48,748 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.tx.StandardTransaction not found in transaction 297690383
      2009-09-04 11:19:48,748 TRACE Log4jLog.trace():72 - org.jbpm.pvm.internal.tx.StandardTransaction not found in process-engine 1538750514
      2009-09-04 11:19:48,752 TRACE Log4jLog.trace():72 - initializing org.hibernate.impl.SessionImpl
      2009-09-04 11:19:48,752 DEBUG Log4jLog.debug():60 - start querying first acquirable job...
      2009-09-04 11:19:48,754 INFO Log4jLog.info():52 - exception while executing command org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd@3aae43b8
      org.hibernate.HibernateException: getNamedQuery is not valid without active transaction
       at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:297)
       at $Proxy37.getNamedQuery(Unknown Source)
       at org.jbpm.pvm.internal.hibernate.DbSessionImpl.findFirstAcquirableJob(DbSessionImpl.java:387)
       at org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd.execute(AcquireJobsCmd.java:63)
       at org.jbpm.pvm.internal.jobexecutor.AcquireJobsCmd.execute(AcquireJobsCmd.java:41)
       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.execute(EnvironmentInterceptor.java:46)
       at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
       at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.acquireJobs(DispatcherThread.java:126)
       at org.jbpm.pvm.internal.jobexecutor.DispatcherThread.run(DispatcherThread.java:67)
      


      Does anyone have a clue as to what I am doing wrong here?

      Cheers
      bjorn