我在嵌入式TomEE容器中运行Arquillian测试时遇到错误
Caused by: javax.el.ELException: Provider com.sun.el.ExpressionFactoryImpl not found
at javax.el.FactoryFinder.newInstance(FactoryFinder.java:101)
at javax.el.FactoryFinder.find(FactoryFinder.java:197)
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:197)
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:168)
at org.apache.jasper.runtime.JspApplicationContextImpl.<init>(JspApplicationContextImpl.java:46)
at org.apache.jasper.runtime.JspApplicationContextImpl.getInstance(JspApplicationContextImpl.java:76)
at org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:217)
at org.apache.openejb.cdi.OpenEJBLifecycle.setJspELFactory(OpenEJBLifecycle.java:420)
at org.apache.openejb.cdi.OpenEJBLifecycle.initializeServletContext(OpenEJBLifecycle.java:387)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1464)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1124)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5087)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 97 more
Caused by: java.lang.ClassNotFoundException: com.sun.el.ExpressionFactoryImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
答案 0 :(得分:2)
这是因为你以某种方式使用了javax.javaee api jar而没有使用它(org.apache.tomee:javaee-api),因此你有其他默认值而不是tomee服务器中的默认值。
设置系统属性以选择正确的属性或使用正确的API依赖。