ant tasks for 3.3
I'm trying to use Keith's ant tasks for tomcat 3.3 and I'm having some issues. I'm not sure if I'm doing something wrong or if there is an incompatibility somewhere. I have the tomcat 3.3a RPMs installed, and I'm using ant 1.5b1. My build.xml (I added the line breaks on the CLASSPATH variable for readability -- it isn't in the actual file) is as follows: project name=BuildWebSite default=jsp basedir=. property name=CLASSPATH value=/home/jasonc/ant/lib/ant.jar:/home/jasonc/ant/lib/optional.jar:/home/jasonc/ant/lib/tomcat-ant.jar: /var/tomcat3/lib/common/servlet.jar:/var/tomcat3/lib/container/jasper.jar: /var/tomcat3/lib/common/core_util.jar:/var/tomcat3/lib/common/connector_util.jar:/usr/share/java/xerces.jar/ property name=JSPC value=org.apache.tomcat.ant.Tomcat3Precompiler/ property name=TOMCAT_SPOOL value=/var/spool/tomcat3/ property name=WEB_DIR value=/var/www/html// target name=jsp record name=testfile.txt action=start/ jspc srcdir=${WEB_DIR} destdir=${TOMCAT_SPOOL} classpath=${CLASSPATH} compiler=${JSPC} include name=**/*.jsp/ /jspc record name=testfile.txt action=stop/ /target /project The tomcat-ant.jar is Kieth's ant tasks checked out from jakarta-tomcat CVS and compiled using Sun JDK 1.4 RPM. It's contents are: Archive: ant/lib/tomcat-ant.jar testing: META-INF/OK testing: META-INF/MANIFEST.MF OK testing: org/apache/ OK testing: org/apache/tomcat/ OK testing: org/apache/tomcat/ant/ OK testing: org/apache/tomcat/ant/Tomcat3JSPVersionFile.class OK testing: org/apache/tomcat/ant/Tomcat3Precompiler$TomcatJSPMangler.class OK testing: org/apache/tomcat/ant/Tomcat3Precompiler.class OK testing: META-INF/ant.properties OK No errors detected in compressed data of ant/lib/tomcat-ant.jar. When I try to run ant I get the following output in my testfile: BUILD FAILED /home/jasonc/build.xml:23: java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Document class at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:190) at org.apache.tools.ant.taskdefs.Java.run(Java.java:408) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:163) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108) at org.apache.tomcat.ant.Tomcat3Precompiler.compile(Tomcat3Precompiler.java:123) at org.apache.tomcat.ant.Tomcat3Precompiler.execute(Tomcat3Precompiler.java:98) at org.apache.tools.ant.taskdefs.optional.jsp.JspC.doCompilation(JspC.java:460) at org.apache.tools.ant.taskdefs.optional.jsp.JspC.execute(JspC.java:424) at org.apache.tools.ant.Task.perform(Task.java:313) at org.apache.tools.ant.Target.execute(Target.java:309) at org.apache.tools.ant.Target.performTasks(Target.java:334) at org.apache.tools.ant.Project.executeTarget(Project.java:1216) at org.apache.tools.ant.Project.executeTargets(Project.java:1160) at org.apache.tools.ant.Main.runBuild(Main.java:605) at org.apache.tools.ant.Main.start(Main.java:195) at org.apache.tools.ant.Main.main(Main.java:234) --- Nested Exception --- java.lang.LinkageError: loader constraints violated when linking org/w3c/dom/Document class at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java) at org.apache.jasper.compiler.JspUtil.parseXMLDocJaxp(JspUtil.java) at org.apache.jasper.compiler.JspUtil.parseXMLDoc(JspUtil.java) at org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java) at org.apache.jasper.compiler.Parser.parse(Parser.java) at org.apache.jasper.compiler.Parser.parse(Parser.java) at org.apache.jasper.compiler.Parser.parse(Parser.java) at org.apache.jasper.compiler.Compiler.compile(Compiler.java) at org.apache.jasper.JspC.parseFile(JspC.java) at org.apache.jasper.JspC.parseFiles(JspC.java) at org.apache.jasper.JspC.main(JspC.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:208) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:150) at org.apache.tools.ant.taskdefs.Java.run(Java.java:408) at org.apache.tools.ant.taskdefs.Java.executeJava
RE: ant tasks for 3.3
Hmm, you might try taking xerces out the CLASSPATH property if there is already one in {ant.home}/lib I would guess there are two copies of an XML provider in your classpath.. are you using JDK1.4? I did a google on this error and apparently it comes up a lot. Keith | -Original Message- | From: Jason Corley [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, May 22, 2002 9:16 AM | To: [EMAIL PROTECTED] | Subject: ant tasks for 3.3 | | | | I'm trying to use Keith's ant tasks for tomcat 3.3 and I'm having some issues. I'm |not sure if I'm doing something wrong | or if there is an incompatibility somewhere. I have the tomcat 3.3a RPMs installed, |and I'm using ant 1.5b1. My | build.xml (I added the line breaks on the CLASSPATH variable for readability -- it |isn't in the actual file) is as follows: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ant tasks for 3.3
That does make sense since the xerces.jar in my path is 1.4 and the ant 1.5b1 uses xerces 2. So I took the xerces JAR out of my classpath and it spit out java.lang.NoClassDefFound error: org/xml/sax/SAXException. I added the xmlParserAPIs.jar from the 1.5b1 ant binary distribution and I also downgraded to JDK 1.3.1_03. Same error. :-( The odd thing is it seems to get about 1/4 of the way through the process before crapping out. Jason -Original Message- From: Keith Wannamaker [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 11:31 AM To: Tomcat Developers List Subject: RE: ant tasks for 3.3 Hmm, you might try taking xerces out the CLASSPATH property if there is already one in {ant.home}/lib I would guess there are two copies of an XML provider in your classpath.. are you using JDK1.4? I did a google on this error and apparently it comes up a lot. Keith | -Original Message- | From: Jason Corley [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, May 22, 2002 9:16 AM | To: [EMAIL PROTECTED] | Subject: ant tasks for 3.3 | | | | I'm trying to use Keith's ant tasks for tomcat 3.3 and I'm having some issues. I'm |not sure if I'm doing something wrong | or if there is an incompatibility somewhere. I have the tomcat 3.3a RPMs installed, |and I'm using ant 1.5b1. My | build.xml (I added the line breaks on the CLASSPATH variable for readability -- it |isn't in the actual file) is as follows: -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]