JBoss Community

NullPointerException when trying to configure jbpm5 with Spring 3.0 and Persistence

created by liliana.iovanovici in jBPM - View the full discussion

Hi,

 

I am trying to configure Spring 3.0 with JBPM 5 and Persistence:

 

 

          <jbpm:ksession id="persistentKSession" type="stateful"

                    kbase="kbase">

                    <jbpm:configuration>

                              <jbpm:jpa-persistence>

                                        <jbpm:transaction-manager ref="transactionManager" />

                                        <jbpm:entity-manager-factory ref="entityManagerFactory" />

                              </jbpm:jpa-persistence>

                    </jbpm:configuration>

          </jbpm:ksession>

 

 

          <bean id="entityManagerFactory"

                    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">

                    <property name="persistenceUnitName" value="oracle" />

          </bean>

 

 

          <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">

                    <property name="entityManagerFactory" ref="entityManagerFactory" />

          </bean>

</beans>

 

 

When I trying to create the context:

 

new ClassPathXmlApplicationContext("conf.xml");

 

I got an error:

Caused by: java.lang.NullPointerException

          at org.jbpm.persistence.processinstance.JPAProcessInstanceManager.getProcessInstances(JPAProcessInstanceManager.java:97)

          at org.jbpm.process.instance.ProcessRuntimeImpl.getProcessInstances(ProcessRuntimeImpl.java:200)

          at org.drools.common.AbstractWorkingMemory.getProcessInstances(AbstractWorkingMemory.java:1093)

          at org.jbpm.marshalling.impl.ProcessMarshallerImpl.writeProcessInstances(ProcessMarshallerImpl.java:32)

          at org.drools.marshalling.impl.OutputMarshaller.writeSession(OutputMarshaller.java:158) ...

 

Does anybody know what I am doing wrog?

 

Thanks.

Reply to this message by going to Community

Start a new discussion in jBPM at Community