ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 29904] New: - unable to instantiate tomcat jasper task more than once
Date Sat, 03 Jul 2004 23:40:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29904>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29904

unable to instantiate tomcat jasper task more than once

           Summary: unable to instantiate tomcat jasper task more than once
           Product: Ant
           Version: 1.6.2beta1
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: apache@afyfe.com


Given the following pair of build files:

build.xml
<?xml version="1.0"?>
<project name="jasper problem" default="jasper">
    <property name="tomcat" location="jakarta-tomcat-5.0.25"/>
    <property name="tomcat.bin" location="${tomcat}/bin"/>
    <property name="tomcat.lib" location="${tomcat}/common/lib"/>
    <path id="jasper.path">
        <fileset dir="${tomcat.lib}">
            <include name="*.jar"/>
        </fileset>
        <fileset dir="${tomcat.bin}">
            <include name="*.jar"/>
        </fileset>
    </path>
    <target name="jasper">
        <taskdef classname="org.apache.jasper.JspC" name="jasper2">
            <classpath refid="jasper.path"/>
        </taskdef>
        <jasper2 uriroot="war" outputDir="build" />
    </target>
</project>

buildall.xml
<?xml version="1.0"?>
<project name="master build" default="jasper">
    <target name="jasper">
        <ant dir="." target="jasper" antfile="build.xml"/>
        <ant dir="." target="jasper" antfile="build.xml"/>
    </target>
</project>


"ant -f build.xml" succeeds, but "ant -f buildall.xml" fails, reporting
buildall.xml:5: The following error occurred while executing this line:
java.lang.ExceptionInInitializerError

It is possible to work around this by 1. defining the taskdef in
the buildall.xml file and specifying a loaderref, 2. passing the
created reference in the <ant> tasks, and 3. using the same reference
as the loaderref in the build.xml file.  It's a bit obtuse, though.

The problem exists also with ant 1.6.1 and jasper 5.0.19, and does
not appear to be particular to OSX as I can reproduce it on Solaris.

The failure, with the -v options follows:
$ ant -v -f buildall.xml
Apache Ant version 1.6.2beta1 compiled on July 2 2004
Buildfile: buildall.xml
Detected Java version: 1.4 in:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home
Detected OS: Mac OS X
parsing buildfile /Users/andy/work/bugs/ant-tomcat/buildall.xml with URI =
file:///Users/andy/work/bugs/ant-tomcat/buildall.xml
Project base dir set to: /Users/andy/work/bugs/ant-tomcat
Build sequence for target `jasper' is [jasper]
Complete build sequence is [jasper, ]

jasper:
Project base dir set to: /Users/andy/work/bugs/ant-tomcat
      [ant] calling target jasper in build file
/Users/andy/work/bugs/ant-tomcat/build.xml
parsing buildfile /Users/andy/work/bugs/ant-tomcat/build.xml with URI =
file:///Users/andy/work/bugs/ant-tomcat/build.xml
Project base dir set to: /Users/andy/work/bugs/ant-tomcat
      [ant] Entering /Users/andy/work/bugs/ant-tomcat/build.xml...
Build sequence for target `jasper' is [jasper]
Complete build sequence is [jasper, ]

jasper:
      [ant] Exiting /Users/andy/work/bugs/ant-tomcat/build.xml.
Project base dir set to: /Users/andy/work/bugs/ant-tomcat
      [ant] calling target jasper in build file
/Users/andy/work/bugs/ant-tomcat/build.xml
parsing buildfile /Users/andy/work/bugs/ant-tomcat/build.xml with URI =
file:///Users/andy/work/bugs/ant-tomcat/build.xml
Project base dir set to: /Users/andy/work/bugs/ant-tomcat
      [ant] Entering /Users/andy/work/bugs/ant-tomcat/build.xml...
Build sequence for target `jasper' is [jasper]
Complete build sequence is [jasper, ]

jasper:
      [ant] Exiting /Users/andy/work/bugs/ant-tomcat/build.xml.

BUILD FAILED
/Users/andy/work/bugs/ant-tomcat/buildall.xml:5: The following error occurred
while executing this line:
java.lang.ExceptionInInitializerError
        at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:539)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:388)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ExceptionInInitializerError
        at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        ... 10 more
Caused by: java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        ... 11 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
        at org.apache.jasper.JspC.<clinit>(JspC.java:90)
        ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
        ... 24 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
        ... 25 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
        at org.apache.tools.ant.Project.executeTarget(Project.java:1223)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        ... 11 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
        at org.apache.jasper.JspC.<clinit>(JspC.java:90)
        ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
        ... 24 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
        ... 25 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:246)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:395)
        at org.apache.jasper.JspC.<clinit>(JspC.java:90)
        ... 20 more
Caused by: org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
        ... 24 more
Caused by: org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412)
        ... 25 more

Total time: 4 seconds

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message