java.lang.NoClassDefFoundError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • The Xalan implementation of org.apache.xalan.xslt.EnvironmentCheck.checkEnvironment leads to unexpected exception when there is an ant present that do not implement the AntMain method anymore (which is the case with the ant embedded in various tomcat 4 versions). One workaround is to remove the ant.jar file in the lib directory of tomcat, but then tomcat fails to compile JSP files. A better solution would be to adapt the ant check of xalan in order to make sure that no exception is launched if the version of ant does not support the org/apache/tools/ant/launch/AntMain (it is btw a pity that the backward compatibility of that AntMain was broken by ant.jar) java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1429) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289) at org.apache.xalan.xslt.EnvironmentCheck.classForName(EnvironmentCheck.java:1202) at org.apache.xalan.xslt.EnvironmentCheck.checkAntVersion(EnvironmentCheck.java:1016) at org.apache.xalan.xslt.EnvironmentCheck.getEnvironmentHash(EnvironmentCheck.java:268) at org.apache.xalan.xslt.EnvironmentCheck.checkEnvironment(EnvironmentCheck.java:211)
    via by Philippe Vijghen,
  • I cant run JDevepoper's aplication
    via by 316686,
  • Java Portlet plugin Installation issue?
    via by Aj-Oracle,
  • Spring-Security OpenId won't work
    via Stack Overflow by CorayThan
    ,
    • java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:537) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123) at java.net.URLClassLoader.defineClass(URLClassLoader.java:251) at java.net.URLClassLoader.access$100(URLClassLoader.java:55) at java.net.URLClassLoader$1.run(URLClassLoader.java:194) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941) at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1429) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289) at org.apache.xalan.xslt.EnvironmentCheck.classForName(EnvironmentCheck.java:1202) at org.apache.xalan.xslt.EnvironmentCheck.checkAntVersion(EnvironmentCheck.java:1016) at org.apache.xalan.xslt.EnvironmentCheck.getEnvironmentHash(EnvironmentCheck.java:268) at org.apache.xalan.xslt.EnvironmentCheck.checkEnvironment(EnvironmentCheck.java:211)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    5 more bugmates