Search code examples
javajspjakarta-eewebsphere-7

java.lang.NoClassDefFoundError: org/apache/jsp/_xxx wrong name: com/ibm/_jsp/_xxx


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)

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.

Tests

  1. I did a copy of xxx.jsp to xxxNew.jsp in the same directory
  2. I can access the xxxNew.jsp without any problem (so there is no coding problem)
  3. So I did a mv from xxx.jsp to xxx1.jsp and had no problem to access the jsp new named
  4. I deleted the xxx.class in the tmp directory
  5. 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.

Is there a class cache anywhere in websphere that could explain this ? (no cachespec.xml for dynacache found in the war module).

Why Websphere try to find a class from the org.apache.jsp package and not from com.ibm._jsp ? (how the AS choose the mapping from the URL to the classes ?)

Thxs !


Solution

  • The problem was solved by redeploying (supress and deploy) the application.