首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 其他服务器 >

jbpm+ssh流程结束时出现java.lang.NoSuchMethodError: org.hibernate.Session.getTransaction

2012-12-14 
jbpm+ssh流程结束时出现java.lang.NoSuchMethodError: org.hibernate.Session.getTransaction[1]ERROR:恭

jbpm+ssh流程结束时出现java.lang.NoSuchMethodError: org.hibernate.Session.getTransaction
[1]ERROR:
恭喜你 301 , 你的文章<7172>已经被发表。这个是在结束流程的end节点进入事件里面打印出来的。
16:58:45,656 [http-8082-6] DEBUG Token : token[330] is unlocked by token[330]
16:58:53,562 [http-8082-6] WARN  PropertyMessageResources :   Resource org/apache/struts/actions/LocalStrings_zh_CN.properties Not Found.
16:58:53,562 [http-8082-6] WARN  PropertyMessageResources :   Resource org/apache/struts/actions/LocalStrings_zh.properties Not Found.
16:58:54,500 [http-8082-6] ERROR DispatchAction : Dispatch[/info] to method 'approvePersonIdea' returned an exception
java.lang.reflect.InvocationTargetException
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.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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 catt.irr.web.util.CharacterCodeFilter.doFilter(CharacterCodeFilter.java:57)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchMethodError: org.hibernate.Session.getTransaction()Lorg/hibernate/Transaction;


at org.jbpm.db.JobSession.deleteJobsForProcessInstance(JobSession.java:206)
at org.jbpm.scheduler.db.DbSchedulerService.deleteTimersByProcessInstance(DbSchedulerService.java:54)
at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
at org.jbpm.graph.exe.ProcessInstance$$FastClassByCGLIB$$5167cc59.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:137)
at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$f25c5be7.end(<generated>)
at org.jbpm.graph.exe.Token.notifyParentOfTokenEnd(Token.java:329)
at org.jbpm.graph.exe.Token.end(Token.java:301)
at org.jbpm.graph.exe.Token.end(Token.java:251)
at org.jbpm.graph.node.EndState.execute(EndState.java:59)
at org.jbpm.graph.def.Node.enter(Node.java:318)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:137)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c9fa72d0.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.exe.ExecutionContext.leaveNode(ExecutionContext.java:136)
at org.jbpm.graph.node.Decision.execute(Decision.java:152)
at org.jbpm.graph.def.Node.enter(Node.java:318)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:137)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c9fa72d0.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.TaskNode.leave(TaskNode.java:209)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:137)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c9fa72d0.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.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:137)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$a5c2e484.signal(<generated>)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:479)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:393)
at catt.irr.web.struts.action.baseaction.BaseDispatchAction.processApproveTask(BaseDispatchAction.java:108)
at catt.irr.ncsl.struts.informationaction.InformationAction.approvePersonIdea(InformationAction.java:152)
... 33 more
[2]Action:
public ActionForward approvePersonIdea(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) {
InfoForm infoform=(InfoForm)form;
// 得到登陆用户
TUser self=(TUser)request.getSession().getAttribute("self");
String userid=self.getUserid()+"";
String ret = "approve_success" ;
try {
String ret2 = processApproveTask(infoform.getTaskId() , infoform.getApproveValue() , userid ) ;


if(ret2.equals("end")){
request.setAttribute("info", "流程结束") ;
}else{
request.setAttribute("info", "流程处理") ;
}
} catch (Exception e) {
e.printStackTrace();
} finally{

}
return mapping.findForward( ret );
}
[3]processApproveTask方法:
/**审批任务*/ 
public String processApproveTask( String taskId , String idea ,String userId ){
JbpmContext jc = getJbpmContext() ;// 创建一个JbpmContext 
String ret = "" ;
try {
TaskInstance ti = jc.getTaskInstance(Long.parseLong(taskId)) ;
userId = "301" ;
if(ti != null){
String des = ti.getDescription() ;
if(des.equals( APPROVE_ONE_PERSON_DESC )){
ti.getContextInstance().setVariable("liuhueiApprove",idea) ;
ti.getContextInstance().setVariable( APPROVE_TWO_PERSON ,userId) ;
ret = "approve" ;
} else if(des.equals( APPROVE_TWO_PERSON_DESC )){
if(idea.equals("2")){
ti.getContextInstance().setVariable("wangxlApprove",idea) ;
ti.getContextInstance().setVariable( APPROVE_LEAD_PERSON ,userId) ;
ret = "approve" ;
}else{
ti.getContextInstance().setVariable("wangxlApprove",idea) ;
ret = "end" ;
}
}
                                    ti.end() ;
}
} catch (Exception e) {
e.printStackTrace() ;
} finally{
if(jc != null){jc.close() ;}
}
return ret ;
}
【4】所有的人员走流程的时候都是没有问题的,就是结束流程的时候才出那个错误还是在if(jc != null){jc.close() ;}
之后才出的错误,我不关闭jc,依然是有这个问题。请问,这个是为什么?
[解决办法]
我完全发现了~CSDN的回帖率也不是很高啊...........

热点排行