java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain

Apache's JIRA Issue Tracker | Philippe Vijghen | 1 decade ago
  1. 0

    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)

    Apache's JIRA Issue Tracker | 1 decade ago | Philippe Vijghen
    java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
  2. 0

    Advice on implementing XSQLConnectionManager

    Oracle Community | 1 decade ago | 311771
    java.lang.NoClassDefFoundError: oracle/xml/xsql/XSQLConnectionManagerFactory
  3. 0

    I cant run JDevepoper's aplication

    Oracle Community | 1 decade ago | 316686
    java.lang.NoClassDefFoundError: oracle/sql/NUMBER
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.NoClassDefFoundError: sun/awt/windows/WEmbeddedFrame

    Visual-paradigm | 1 decade ago | dsh
    java.lang.NoClassDefFoundError: sun/awt/windows/WEmbeddedFrame
  6. 0

    Java Portlet plugin Installation issue?

    Oracle Community | 1 decade ago | Aj-Oracle
    java.lang.NoClassDefFoundError: oracle/javatools/dialogs/ExceptionDialog$Throwab leChainTraverser

    8 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org/apache/tools/ant/launch/AntMain

      at java.lang.ClassLoader.defineClass0()
    2. Java RT
      URLClassLoader.findClass
      1. java.lang.ClassLoader.defineClass0(Native Method)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:537)
      3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
      4. java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
      5. java.net.URLClassLoader.access$100(URLClassLoader.java:55)
      6. java.net.URLClassLoader$1.run(URLClassLoader.java:194)
      7. java.security.AccessController.doPrivileged(Native Method)
      8. java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      8 frames
    3. Glassfish Core
      WebappClassLoader.loadClass
      1. org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621)
      2. org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958)
      3. org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
      4. org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:941)
      5. org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
      6. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1429)
      7. org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1289)
      7 frames
    4. Xalan Java
      EnvironmentCheck.checkEnvironment
      1. org.apache.xalan.xslt.EnvironmentCheck.classForName(EnvironmentCheck.java:1202)
      2. org.apache.xalan.xslt.EnvironmentCheck.checkAntVersion(EnvironmentCheck.java:1016)
      3. org.apache.xalan.xslt.EnvironmentCheck.getEnvironmentHash(EnvironmentCheck.java:268)
      4. org.apache.xalan.xslt.EnvironmentCheck.checkEnvironment(EnvironmentCheck.java:211)
      4 frames