简体   繁体   English

来自Websphere的java.lang.NoClassDefFoundError

[英]java.lang.NoClassDefFoundError from websphere

I have a problem that I can't figure out. 我有一个我不知道的问题。

Context : 内容:

was 7.0.0.19 version (with no preCompileJsp) Caused by: java.lang.NoClassDefFoundError: org/apache/jsp/_xxx (wrong name: com/ibm/_jsp/_xxx) at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:275) at java.lang.ClassLoader.defineClass(ClassLoader.java:212) at com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader.defClass(JSPExtensionClassLoader.java:181) at com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader._loadClass(JSPExtensionClassLoader.java:133) 是7.0.0.19版本(没有preCompileJsp)的原因:java.lang.ClassLoader.defineClassImpl(本机方法)处的java.lang.NoClassDefFoundError:org / apache / jsp / _xxx(错误名称:com / ibm / _jsp / _xxx)在java.lang.ClassLoader.defineClass(ClassLoader.java:275)在com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader.defClass(JSPExtensionClassLoader.java:181)在java.lang.ClassLoader.defineClass(ClassLoader.java:212) )com.ibm.ws.jsp.webcontainerext.JSPExtensionClassLoader._loadClass(JSPExtensionClassLoader.java:133)

It's the only JSP that give problem, and only on a specific environment (no problem on the others environments with the same configuration) the xxx.class is well present in my profile/tmp directory with others jsp in the same directory (that all give no problem) and the filesystem is not full. 这是唯一一个有问题的JSP,并且仅在特定环境(配置相同的其他环境没有问题)上,xxx.class很好地存在于我的profile / tmp目录中,而其他jsp则位于同一目录中(所有这些都给没问题),并且文件系统未满。

Tests 测验

I did a copy of xxx.jsp to xxxNew.jsp in the same directory I can access the xxxNew.jsp without any problem (so there is no coding problem) So I did a mv from xxx.jsp to xxx1.jsp and had no problem to access the jsp new named I deleted the xxx.class in the tmp directory I did the mv back to the first name (xxx.jsp) and still get the error with a newly xxx.class in the tmp directory. 我在同一目录中将xxx.jsp复制到xxxNew.jsp,我可以毫无问题地访问xxxNew.jsp(因此没有编码问题),所以我做了从xxx.jsp到xxx1.jsp的MV,并且没有访问名为jsp new的新问题我删除了tmp目录中的xxx.class我将mv改回了名字(xxx.jsp),但仍然在tmp目录中得到了新的xxx.class的错误。 Is there a class cache anywhere in websphere that could explain this ? 在Websphere的任何地方都存在可以解释此问题的类缓存吗? (no cachespec.xml for dynacache found in the war module). (在war模块中找不到dynacache的cachespec.xml)。

Why Websphere try to find a class from the org.apache.jsp package and not from com.ibm._jsp ? 为什么Websphere尝试从org.apache.jsp包而不是com.ibm._jsp查找类? (how the AS choose the mapping from the URL to the classes ?) (AS如何选择从URL到类的映射?)

Thxs ! 谢谢!

Make sure you are not including in your webapp classpath any JSP engine or other implementation of standard JSP libraries that might be incompatible with WebSphere's runtime. 确保您的webapp类路径中没有包含任何可能与WebSphere运行时不兼容的JSP引擎或标准JSP库的其他实现。 Also, once you delete all potentially incompatible jars, try deleting the generated classes from JSP compilation (which are under {WAS_HOME}/AppServer/profiles/{YOUR_PROFILE}/temp), so recompilation would be triggered and discard any stale .class generated with a previous classpath state. 另外,一旦删除了所有可能不兼容的jar,请尝试从JSP编译中删除生成的类(它们位于{WAS_HOME} / AppServer / profiles / {YOUR_PROFILE} / temp下),因此将触发重新编译并丢弃任何使用生成的过时的.class。先前的类路径状态。

It would be helpful if you posted the list of JARs in your app's classpath. 如果您在应用程序的类路径中发布了JAR列表,将会很有帮助。

尝试在WAS控制台上更改Web应用程序类的加载策略:PARENT_FIRST / PARENT_LAST。

this bug is due to websphere incorrect log : the original exception is not displayed. 此错误是由于Websphere错误日志导致的:未显示原始异常。

You should check for instance if there is no missing jsp tag libraries in your page. 例如,您应该检查页面中是否没有缺少的jsp标记库。

See https://www-01.ibm.com/support/docview.wss?uid=swg1PI09596 请参阅https://www-01.ibm.com/support/docview.wss?uid=swg1PI09596

Regards. 问候。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM