且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Tomcat 7 java.lang.NoClassDefFoundError:javax/el/ELManager

更新时间:2022-06-17 18:00:47

此问题是由于在el-api版本3.0中引入了此类javax/el/ELManager引起的.

The issue is caused by the fact that this class javax/el/ELManager is introduced in el-api version 3.0.

Tomcat 7随附了预捆绑的el- api 2.2 (缺少该类),它是在运行时选择的,而不是您的el-api jar.

Tomcat 7 is coming with pre-bundled el-api 2.2 (which is missing the class) and it's picking that at runtime, instead of your el-api jar.

Tomcat 8具有el-api 3.0 ,因此存在javax/el/ELManager类.

***是可以尽可能近地同步开发/测试/产品环境.

It's best if you can sync your dev/test/prod environments as close as possible.

当您的测试环境具有Tomcat 8时,在开发人员中针对Tomcat 8进行开发更有意义.您发现Tomcat 7和8服务器带有不同的库集,因此您的代码对于这些不同的库可以表现不同图书馆.

It makes much more sense to develop against Tomcat 8 in dev, when your test environment has Tomcat 8. As you found out Tomcat 7 and 8 servers comes with different set of libraries, so your code can behave differently against those different set of libraries.