[jBPM Users] - Re: NullPointer Exception when starting a process whith Tomc
by hidman78
| java.lang.NullPointerException
| at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.ja
| va:66)
| at javaclass.DAO.BillDAO.findByExample(BillDAO.java:45)
| at javaclass.action.ListBillAction.execute(ListBillAction.java:29)
| at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
| at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
| at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
| at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
| at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290
| )
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
|
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
| at java.lang.Thread.run(Unknown Source)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253726#4253726
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253726
16 years, 7 months
[jBPM Users] - NullPointer Exception when starting a process whith Tomcat/S
by hidman78
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
16 years, 7 months