nawawa001 发表于 2017-2-27 10:16:10

在jetty下使用jbpm和el标签 报Ljavax/el/ExpressionFactory

在maven项目中,如果使用jetty作为服务器,项目中使用了jbpm工作流和el表达式的时候
项目启动没有问题,当在访问有el标签的页面的时候会报
java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;

java.lang.ClassCastException: de.odysseus.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory.
这是由于jbpm和el有冲突

在pom.xml中把juel排除掉
<dependency>
   <groupId>org.jbpm.jbpm4</groupId>
   <artifactId>jbpm-pvm</artifactId>
   <version>4.4</version>
   <exclusions>
    <exclusion>
   <groupId>juel</groupId>
   <artifactId>juel-engine</artifactId>
    </exclusion>
    <exclusion>
   <groupId>juel</groupId>
   <artifactId>juel-api</artifactId>
    </exclusion>
    <exclusion>
   <groupId>juel</groupId>
   <artifactId>juel-impl</artifactId>
    </exclusion>
   </exclusions>
</dependency>

如果还不行,找到你的资源目录repository\org\jbpm\jbpm4\jbpm-pvm\4.3\jbpm-pvm-4.3.pom.xml
把 <dependency>
      <groupId>juel</groupId>
      <artifactId>juel</artifactId>
    </dependency>
    <dependency>
      <groupId>juel</groupId>
      <artifactId>juel-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>juel</groupId>
      <artifactId>juel-engine</artifactId>
    </dependency> 给删除掉

以上使用的是eclipse3.6版本

出了上诉方法以外在eclipse里Jetty Webapp配置中Arguments添加下面的参数
-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true
同样可以
页: [1]
查看完整版本: 在jetty下使用jbpm和el标签 报Ljavax/el/ExpressionFactory