与 TomEE 一起使用时出现 Arquillian 错误
Arquillian error while using with TomEE
我在嵌入式 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)
这是因为你以某种方式使用了 javax.javaee api 罐子而不是 tomee 罐子 (org.apache.tomee:javaee-api) 所以你有其他默认值而不是 tomee 中的那个服务器。
将系统 属性 设置为正确的 select 或使用正确的 API 依赖项。
我在嵌入式 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)
这是因为你以某种方式使用了 javax.javaee api 罐子而不是 tomee 罐子 (org.apache.tomee:javaee-api) 所以你有其他默认值而不是 tomee 中的那个服务器。
将系统 属性 设置为正确的 select 或使用正确的 API 依赖项。