`
jacky6024
  • 浏览: 81131 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

《深入浅出jBPM》一书中第7章与第9章相关工程的源码

阅读更多
《深入浅出jBPM》一书中第7章与第9章相关工程的源码。本书由人民邮电出版社出版。

第7章介绍的报销及采购流程的完整工程及其源代码: jbpm-web-test.rar

第9章企业级应用里涉及到的工程及相关EJB的源代码:jbpm-ent-test.ear.rar
分享到:
评论
111 楼 chenchendf 2009-12-27  
您好,执行到task-list.jsp中的:
List taskList=jbpmContext.getTaskList(currentperson);
出现错误:
currentperson=user1
2009-12-27 18:10:30 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:213)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:473)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:117)
at org.jbpm.persistence.db.DbPersistenceService.getTaskMgmtSession(DbPersistenceService.java:381)
at org.jbpm.JbpmContext.getTaskMgmtSession(JbpmContext.java:579)
at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:189)
at org.apache.jsp.task_002dlist_jsp._jspService(task_002dlist_jsp.java:93)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
但是我看了,我导入的j2ee包中是有这个类的。

我服务器使用的是tomcat
110 楼 chenchendf 2009-12-27  
你的书读了一个星期,然后下了你的第7章jbpm-web-test.rar的工程,配了一个晚上都还有错,好像该项目还少了好多文件,例如jbpm.cfg.xml,hibernate配置文件,jbpm-process-upload-servet等等,虽然我按书的示例手打了很多,不过难免有漏的,希望老师能给一份完整可以运行的项目给我们
jacky6024 写道
org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'jbpm.cfg.xml'

看看是不是你的jbpm.cfg.xml文件没有配置或是配置不正确。

老大,下载的工程里根本就没有'jbpm.cfg.xml' 这个文件
109 楼 chenchendf 2009-12-27  
jbpm-web-test.rar
这个例子的数据库表能不能提供一下啊?~~
108 楼 大漠飞雪 2009-12-27  
jtest2003 写道
垃圾书,垃圾人。靠!!

这种人。
107 楼 chenchendf 2009-12-27  
这方面的书很少,支持作者!
以后有问题还请多多指教!
106 楼 alfan001 2009-12-25  
感觉您写的manager-process.jsp中,long taskId=Long.parseLong(request.getParameter("taskId")) 和<input type="hidden" name="taskId" value="<%=taskId %>">互相矛盾,"taskId"和java中的String变量taskId到底是谁读谁的值?

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="include.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>经理审批页</title>
</head>
<body>
<%
JbpmContext jbpmContext=JbpmConfiguration.getInstance().createJbpmContext();
try{
long taskId=Long.parseLong(request.getParameter("taskId"));
TaskInstance ti=jbpmContext.getTaskInstance(taskId);
String isSubmit=request.getParameter("isSubmit");
if(isSubmit!=null && isSubmit.equals("true")){
//判断当前是部门经理审批还是总经理审批,分别写入不同的流程变量
String result=request.getParameter("approve_result");
if(ti.getDescription().equals("payment.manager.approve")){
ti.getContextInstance().setVariable("manager_approve_result",result);
if(result.equals("1")){
//部门经理审批结果为同意
ti.end("agree");
}else{
//部门经理审批结果为不同意
ti.end("disagree");
}
out.println("<h1>部门经理审批完成!</h1>");
}else{
ti.getContextInstance().setVariable("super_manager_approve_result",result);
ti.end();
out.println("<h1>总经理审批完成!</h1>");
}
}else{
String title=ti.getVariable("title").toString();
String money_count=ti.getVariable("money_count").toString();
String remark=ti.getVariable("remark").toString();
String issueperson=ti.getVariable("issueperson").toString();
%>
报销人:<%=issueperson %><br>
报销主题:<%=title %><br>
报销金额:<%=money_count %><br>
报销说明:<%=remark %><br>
<form action="manager-process.jsp" method="post">
审批意见:      
<input type="radio" name="approve_result" value="1" checked="checked" />同意 &nbsp;&nbsp;
<input type="radio" name="approve_result" value="0" />不同意<br>
<input type="hidden" name="isSubmit" value="true">
<input type="hidden" name="taskId" value="<%=taskId %>">
<input type="submit" value="提交审批结果">
</form>
<%
}
}finally{
jbpmContext.close();
}
%>
</body>
</html>
105 楼 alfan001 2009-12-25  
好像manager-process.jsp又出了问题。用manager1登录,点击处理该任务时,出现错误,控制台异常信息是:
ERROR StandardWrapperValve : Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.jsp.manager_002dprocess_jsp._jspService(manager_002dprocess_jsp.java:115)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
104 楼 alfan001 2009-12-25  
感谢楼主,这个问题已经解决了
103 楼 h409609177 2009-12-25  
作者在书中对mail 的配置文件 讲解的比较少.  能否再次补充相关内容呢?
谢谢
102 楼 jacky6024 2009-12-24  
您好,从这个错误当中可以看到是test.assignment.ManagerAssignment.assign(ManagerAssignment.java:13) 这个类的第13行出错,从代码当中可以看到,13行要从流程上下文中取到与变量“ISSUE_PERSON”对应的流程发起人,这里应该是该变量对应的值在流程上下文当中不存在,所以后面的toString才有一个空指计的异常,请确认您在流程开始时是否将这个变量放入流程上下文,谢谢。
101 楼 alfan001 2009-12-23  
请您多多指教,并为给您带来的不便表示歉意
100 楼 alfan001 2009-12-23  
网页显示的错误信息变为
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


root cause

org.jbpm.graph.def.DelegationException
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:259)
org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
org.jbpm.graph.def.Node.enter(Node.java:318)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.enter(<generated>)
org.jbpm.graph.def.Transition.take(Transition.java:151)
org.jbpm.graph.def.Node.leave(Node.java:393)
org.jbpm.graph.node.StartState.leave(StartState.java:70)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.leave(<generated>)
org.jbpm.graph.exe.Token.signal(Token.java:192)
org.jbpm.graph.exe.Token.signal(Token.java:140)
org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


root cause

java.lang.NullPointerException
test.assignment.ManagerAssignment.assign(ManagerAssignment.java:13)
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
org.jbpm.graph.def.Node.enter(Node.java:318)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.enter(<generated>)
org.jbpm.graph.def.Transition.take(Transition.java:151)
org.jbpm.graph.def.Node.leave(Node.java:393)
org.jbpm.graph.node.StartState.leave(StartState.java:70)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.leave(<generated>)
org.jbpm.graph.exe.Token.signal(Token.java:192)
org.jbpm.graph.exe.Token.signal(Token.java:140)
org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
99 楼 alfan001 2009-12-23  
谢谢您。不好意思,呵呵,由于我的失误把类名弄错了。但是改正之后还是存在第二处异常,控制台信息是
16:43:23,937 [http-8080-Processor23] ERROR StandardWrapperValve : Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at test.assignment.ManagerAssignment.assign(ManagerAssignment.java:13)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
at org.jbpm.graph.def.Node.enter(Node.java:318)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$83c1b644.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:192)
at org.jbpm.graph.exe.Token.signal(Token.java:140)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
at org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
98 楼 jacky6024 2009-12-23  
您好,
“java.lang.ClassNotFoundException: class 'test.assignment.ManagerAssignment' ”
从异常当中可以看到test.assignment.ManagerAssignment这个类没找到,请确认这个类是否被编译到web-inf/classes目录下,如果没有请配置您的classpath及JRE即可。
97 楼 alfan001 2009-12-23  
感谢楼主,我的Java功底不深,请楼主多帮助。控制台信息并未全部贴出,如果您还需要其它信息,我再继续向您说明。
96 楼 alfan001 2009-12-23  
谢谢您。点击“提交报销”后,控制台共写了两处异常
第一处
15:50:25,843 [http-8080-Processor22] ERROR Delegation : couldn't load delegation class 'test.assignment.ManagerAssignment'
java.lang.ClassNotFoundException: class 'test.assignment.ManagerAssignment' could not be found by the process classloader
at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:118)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:140)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$f2b12911.instantiate(<generated>)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:266)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
at org.jbpm.graph.def.Node.enter(Node.java:318)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:192)
at org.jbpm.graph.exe.Token.signal(Token.java:140)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
at org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
15:50:25,843 [http-8080-Processor22] ERROR Delegation : couldn't instantiate delegation class 'test.assignment.ManagerAssignment'
java.lang.NullPointerException
at org.jbpm.instantiation.FieldInstantiator.newInstance(FieldInstantiator.java:105)
at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiator.java:48)
at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:163)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.instantiation.Delegation$$EnhancerByCGLIB$$f2b12911.instantiate(<generated>)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:266)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
at org.jbpm.graph.def.Node.enter(Node.java:318)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:192)
at org.jbpm.graph.exe.Token.signal(Token.java:140)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
at org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)

第二处
15:50:25,953 [http-8080-Processor22] ERROR StandardWrapperValve : Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
at org.jbpm.graph.def.Node.enter(Node.java:318)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.StartState.leave(StartState.java:70)
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)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$dd90d4d3.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:192)
at org.jbpm.graph.exe.Token.signal(Token.java:140)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
at org.apache.jsp.write_jsp._jspService(write_jsp.java:112)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
95 楼 jacky6024 2009-12-23  
alfan001 您好,请将在控制台抛出来的异常贴上来帮你分析,现在贴上来的错误无法判断.
94 楼 alfan001 2009-12-22  
您好,在jbpm-web-test运行时,我填好报销单后,点“提交报销”,页面就会出现如下错误:
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /write.jsp:33

30: ti.setVariable("remark", remark);
31:
32:
33: ti.end();
34:
35: } finally {
36: jbpmContext.close();


而将write.jsp中代码第32行ti.end()去掉,就不出现这一错误。请问这是为什么?



93 楼 jacky6024 2009-11-26  
lifxue 写道
82 85 91楼的邮件问题

请教一下作者,问题是否和NotifyPurchaseAction.java有关?

这个文件中有一段代码如下:
//开始发送邮件
    Properties mailServerProperties = new Properties();

    //初始化mail信息
    String smtpServer = JbpmConfiguration.Configs.getString("jbpm.mail.smtp.host");
    mailServerProperties.put("mail.smtp.host", smtpServer);
    Session session = Session.getDefaultInstance(mailServerProperties, null);
    MimeMessage message = new MimeMessage(session);


需要说明一点的是82楼的错误信息,是在“提交采购单”的步骤报出来的。
而NotifyPurchaseAction.java是在“结束”节点上使用的。


lifxue  您好,看到你的问题所在,在NotifyPurchaseAction.java这个类当中并没有用到jBPM里的Mail.java来发送邮件,可以看到在NotifyPurchaseAction.java这个类当中发送邮件是手工编写的,很明显没有添加smtp验证,请手工修改一下这个类,添加smtp验证即可,至于如何添加,可以在google上搜关键词“javamail stmp验证”有很多这方面的讨论。
92 楼 lifxue 2009-11-25  
82 85 91楼的邮件问题

请教一下作者,问题是否和NotifyPurchaseAction.java有关?

这个文件中有一段代码如下:
//开始发送邮件
    Properties mailServerProperties = new Properties();

    //初始化mail信息
    String smtpServer = JbpmConfiguration.Configs.getString("jbpm.mail.smtp.host");
    mailServerProperties.put("mail.smtp.host", smtpServer);
    Session session = Session.getDefaultInstance(mailServerProperties, null);
    MimeMessage message = new MimeMessage(session);


需要说明一点的是82楼的错误信息,是在“提交采购单”的步骤报出来的。
而NotifyPurchaseAction.java是在“结束”节点上使用的。

相关推荐

    深入浅出JBPM最新源码第七章-报销实例

    【深入浅出JBPM最新源码第七章-报销实例】是一个关于企业流程管理(Business Process Management,简称BPM)的实战教程,主要聚焦在JBPM框架的使用上,结合了myeclipse集成开发环境、SQL数据库、Tomcat6.0应用服务器...

    深入浅出jBPM 5,6章

    《深入浅出jBPM 5,6章》是一本专为理解jBPM这一流程管理系统而精心编写的书籍。jBPM是一个开源的工作流管理系统,它提供了业务流程建模、执行、监控和优化的全面解决方案。这本书的第5章和第6章尤其关键,它们涵盖...

    jbpm深入浅出第7章实例代码

    本资源“jbpm深入浅出第7章实例代码”聚焦于通过jbpm实现工作流的实战演练,旨在帮助读者更深入地理解和掌握jbpm的使用。 jbpm的工作流程管理包括了流程定义、流程执行、流程监控等多个方面。第7章可能涉及的内容...

    深入浅出 jBPM 电子书, ,综合大量例子和资料

    深入浅出jBPM 电子文档,内容包括:面向图的程序设计,流程建模,节点——Node 职责,task-node节点,state节点类型,decision节点类型.等等,.还 综合大量例子和资料 , 是 学习 JBPM 必读首选! 希望这部书,大家能...

    《深入浅出jBPM》第3章

    《深入浅出jBPM》中文版由jBPM方面的专家高杰根据自己的经验编写,是一本实用的jBPM教程。全书分两个部分,第一部分详细讲 解jBPM 3.2,第二部分介绍jBPM 4。作者从初学者的角度由浅入深地介绍jBPM的基本知识、使用...

    深入浅出_jBPM_电子书

    深入浅出 jBPM 电子书,很适合初学者学习的一个开发文档

    《深入浅出jBPM》第2章(2)

    《深入浅出jBPM》中文版由jBPM方面的专家高杰根据自己的经验编写,是一本实用的jBPM教程。全书分两个部分,第一部分详细讲 解jBPM 3.2,第二部分介绍jBPM 4。作者从初学者的角度由浅入深地介绍jBPM的基本知识、使用...

    《深入浅出jBPM》第2章(1)

    《深入浅出jBPM》中文版由jBPM方面的专家高杰根据自己的经验编写,是一本实用的jBPM教程。全书分两个部分,第一部分详细讲 解jBPM 3.2,第二部分介绍jBPM 4。作者从初学者的角度由浅入深地介绍jBPM的基本知识、使用...

    深入浅出jBPM.1-6章测试代码_jbpm-test.rar

    《深入浅出jBPM:1-6章测试代码详解》 jBPM,全称为Java Business Process Management,是一款开源的工作流管理系统,用于处理业务流程的建模、部署、执行和监控。它提供了灵活的工作流定义,支持BPMN 2.0标准,...

    深入浅出JBPM

    **深入浅出JBPM** JBPM,全称Java Business Process Management,是一款开源的工作流管理系统,由JBoss组织开发,现在是Red Hat公司的产品。它提供了一整套解决方案,用于设计、执行、监控和优化业务流程。JBPM的...

    深入浅出jBPM完整版part1

    第 1 章 helloworld..............................................2 1.1 下载开发套件.............................................2 1.2 安装流程设计器 .........................................7 1.3 jBPM...

    深入浅出jBPM完整版.part4

    《深入浅出jBPM》深入浅出,示例丰富,实用性强,适合有一定Java基础的读者阅读。

    深入浅出jBPM电子书

    深入浅出jBPM电子书,JBOSS jBPM是一个灵活的、可扩展的工作流管理系统。JBOSS jBPM拥有直观的流程语言,用任务、异步的等待状态、定时器、自动化动作…等来表示业务流程图,把这些操作绑定在一起,JBOSS jBPM就拥有...

    深入浅出JBPM 采购实例

    【深入浅出JBPM 采购实例】是一个基于Myeclipse8.5、Tomcat6.0和JBPM3.2.3的实践教程,旨在帮助读者理解并掌握工作流管理系统JBPM在采购流程中的应用。在这个实例中,作者省略了邮件功能,因为JBPM3.2.3版本不包含...

    深入浅出jbpm系统开发

    【深入浅出jbpm系统开发】是一本专为jbpm工作流引擎初学者设计的入门指南,旨在帮助读者快速理解和掌握这一强大的开源工作流引擎。jbpm作为一个流行且功能丰富的工具,广泛应用于企业流程自动化、任务管理和决策支持...

    jbpm源码阅读之一

    压缩包中的文件 "Java23种设计模式(总结).doc" 显然是一个关于Java设计模式的文档,这与jbpm源码阅读紧密相关。设计模式是软件工程中的最佳实践,对于理解任何复杂系统的源码都是非常有帮助的。jbpm作为一个成熟的...

Global site tag (gtag.js) - Google Analytics