[jboss-user] [jBPM Users] - NullPointer Exception when starting a process whith Tomcat/S
hidman78
do-not-reply at jboss.com
Sat Sep 5 06:51:14 EDT 2009
Hi,
I'm using :
Tomcat 6.0
JBPM 4.1
Mysql
I have a NullPointer exception when starting a process when executing this code in my DAO :
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
| ExecutionService executionService = processEngine.getExecutionService();
| IdentityService identityService = processEngine.getIdentityService();
|
| ProcessInstance processinstance = executionService.startProcessInstanceByKey("taskformExample");
My hibernate config file :
<?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE hibernate-configuration
| PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
| <!-- Enable Hibernate's automatic session context management -->
|
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password"></property>
| <property name="hibernate.format_sql">true</property>
| <property name="current_session_context_class">thread</property>
|
| <mapping resource="javaclass.beans.Bill.hbm.xml"/>
| <mapping resource="javaclass.beans.Test.hbm.xml" />
| <mapping resource="javaclass.beans.User.hbm.xml" />
| <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" />
| <mapping resource="jbpm.identity.hbm.xml" />
| </session-factory>
| </hibernate-configuration>
jbpm.cfg
<?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration>
|
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
| <import resource="jbpm.businesscalendar.cfg.xml" />
| <!-- <import resource="jbpm.jobexecutor.cfg.xml" /> -->
|
| </jbpm-configuration>
web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
| <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| id="WebApp_ID" version="2.5">
|
| <display-name>MonApplication</display-name>
|
| <!-- Configuration de l'action servlet -->
| <servlet>
| <servlet-name>action</servlet-name>
| <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
| <init-param>
| <param-name>config</param-name>
| <param-value>/WEB-INF/struts-config.xml</param-value>
| </init-param>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>action</servlet-name>
| <url-pattern>*.do</url-pattern>
| </servlet-mapping>
| </web-app>
stack variables:
processEngine JbpmConfiguration (id=77)
| authenticatedUserIdThreadLocal ThreadLocal<T> (id=481)
| impl null
| isConfigured true
| processEngineWireContext WireContext (id=484)
| transactionWireDefinition WireDefinition (id=489)
| userCommandService null
| userProvidedEnvironmentObjectsThreadLocal ThreadLocal<T> (id=492)
executionService ExecutionServiceImpl (id=80)
| commandService null
I think it come from commandService that is null but I don't know why it is null.
Thx
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253716#4253716
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253716
More information about the jboss-user
mailing list