Summary: | <validator> ant task throws NoClassDefFoundError - Tomcat 8.0.18 | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Konstantin Kolinko <knst.kolinko> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 6.0.43 | ||
Target Milestone: | ---- | ||
Hardware: | PC | ||
OS: | All |
Description
Konstantin Kolinko
2015-02-10 15:39:23 UTC
Fixed in trunk and 8.0.x for 8.0.19 onwards. This is observed on 7.0.59 and current 6.0.x as well. I will backport the fix. Complete sample build.xml (to be put into $CATALINA_HOME): [[[ <project default="jspc"> <property name="tomcat.home" location="${basedir}" /> <property name="webapp.path" location="${basedir}/webapps/examples" /> <import file="${tomcat.home}/bin/catalina-tasks.xml"/> <target name="jspc"> <jasper validateXml="false" uriroot="${webapp.path}" webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml" outputDir="${webapp.path}/WEB-INF/src" /> <validator path="${webapp.path}" /> </target> </project> ]]] Fixed in Tomcat 7 by r1658815 and will be in 7.0.60. Proposed for Tomcat 6. For a record: Stacktrace in Tomcat 6 is [[[ build.xml:15: java.lang.NoClassDefFoundError: org /apache/catalina/Globals at org.apache.catalina.ant.ValidatorTask.execute(ValidatorTask.java:95) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at ... ]]] The line that refers the Globals class in ValidatorTask.java: Digester digester = DigesterFactory.newDigester( true, true, null, Globals.IS_SECURITY_ENABLED); |