JBPM日常报错处理解决方案

部署JBPM在WEB项目时,会发现多么容易的JSP页面竟然会出现servlet的错误,

严重: Servlet.service() for servlet jsp threw exception
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
    at org.apache.jsp.index_jsp._jspInit(index_jsp.java:26)
    at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
    at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    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:175)
    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:844)
    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(Unknown Source)

 

其实这里是jbpm内的三个包juel.jar ,juel-engine.jar,juel-impl.jar 与tomcat里面的lib目录下的el-api.jar发生冲突,解决方案是将这三个包移除就OK。

不过如果把这三个包删除,如果在其他地方还需要使用到这三个包呢,要这三个包那么只能删出tomcat里面那个el-api.jar了,那么这时仍然会报错

  

严重: Servlet.service() for servlet LeaveServlet threw exception
java.lang.ClassNotFoundException: de.odysseus.el.util.SimpleResolver
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at org.jbpm.pvm.internal.script.JuelScriptEngineFactory.getScriptEngine(JuelScriptEngineFactory.java:185)
    at javax.script.ScriptEngineManager.getEngineByName(Unknown Source)
    at org.jbpm.pvm.internal.script.ScriptManager.evaluate(ScriptManager.java:111)
    at org.jbpm.pvm.internal.script.ScriptManager.evaluateExpression(ScriptManager.java:90)
    at org.jbpm.pvm.internal.model.ExecutionImpl.resolveAssignmentExpression(ExecutionImpl.java:772)
    at org.jbpm.pvm.internal.model.ExecutionImpl.initializeAssignments(ExecutionImpl.java:726)
    at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:95)
    at org.jbpm.jpdl.internal.activity.TaskActivity.execute(TaskActivity.java:58)
    at org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
    at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:656)
    at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:616)
    at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:217)
    at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
    at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
    at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
    at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
    at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
    at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
    at org.jbpm.pvm.internal.svc.SkipInterceptor.execute(SkipInterceptor.java:43)
    at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66)
    at cn.yu.qingjiaServlet.LeaveServlet.leave(LeaveServlet.java:151)
    at cn.yu.qingjiaServlet.LeaveServlet.process(LeaveServlet.java:80)
    at cn.yu.qingjiaServlet.LeaveServlet.doGet(LeaveServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at cn.yu.qingjiaServlet.SetCharaterEncodingFilter.doFilter(SetCharaterEncodingFilter.java:26)
    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:175)
    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:844)
    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(Unknown Source)

 

最佳解决方案就是剪切那三个包到tomcat的lib目录下,不用删除el-api.jar

你可能感兴趣的:(java,apache,tomcat,servlet,jbpm)