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 31449] New: - java.lang.ClassNotFoundException with Xdoclet and Struts
Date Tue, 28 Sep 2004 11:29:11 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=31449>.
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=31449

java.lang.ClassNotFoundException with Xdoclet and Struts

           Summary: java.lang.ClassNotFoundException with Xdoclet and Struts
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: dev@ant.apache.org
        ReportedBy: lloyd@gamesys.co.uk


I get the following stack dump when I run this a specific target. It used to 
work fine with 1.5.3-1. It can't find struts.jar even when I add the full path 
to my taskdef classpath.

If I put struts.jar in ant/lib it works and it also works if I use the ant -lib 
option but not when I add it to the taskdef classpath.

=========================================

<target name="generate" depends="init,create-merge-dir">

        <mkdir dir="${build.dir}/generated/web"/>

        <webdoclet destdir="${build.dir}/generated/web"
                excludedtags="@version,@author"
                addedtags="@xdoclet-generated at ${TODAY}"
                verbose="true"
		force="false"
		mergedir="${merge.dir}">

        <fileset dir="gamebox/classes" includes="**/*.java"/>

        <deploymentdescriptor
            servletspec="2.3"
            sessiontimeout="15"
            description="Gamebox Admin Application">
            <welcomefile file="/launcher.do"/>
            </deploymentdescriptor>

	    <jrunwebxml contextRoot="@SERVLET_CONTEXT@"/>
	    <strutsconfigxml version="1.1"/>

        </webdoclet>

        <property name="jrunweb.xml" value="${build.dir}/generated/web/jrun-
web.xml"/>
        <property name="jrunweb0.xml" value="${build.dir}/filtered/jrun-
web.xml"/>
        <uptodate property="uptodate" srcfile="${jrunweb.xml}" 
targetfile="${jrun-web0.xml}"/>
        <antcall target="filter-descriptor"/>

    </target>

=========================================

generate:
[webdoclet] Running <deploymentdescriptor/>
[webdoclet] Generating web.xml.
[webdoclet] - MessageResourcesFactory.createFactory
[webdoclet] java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMes
sageResourcesFactory
[webdoclet]     at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
[webdoclet]     at java.security.AccessController.doPrivileged(Native Method)
[webdoclet]     at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
[webdoclet]     at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
[webdoclet]     at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
[webdoclet]     at org.apache.struts.util.RequestUtils.applicationClass(RequestU
tils.java:207)
[webdoclet]     at org.apache.struts.util.MessageResourcesFactory.createFactory(
MessageResourcesFactory.java:192)
[webdoclet]     at org.apache.struts.util.MessageResources.getMessageResources(M
essageResources.java:576)
[webdoclet]     at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.jav
a:134)
[webdoclet]     at org.apache.struts.util.MessageResourcesFactory.createFactory(
MessageResourcesFactory.java:192)
[webdoclet]     at org.apache.struts.util.MessageResources.getMessageResources(M
essageResources.java:576)
[webdoclet]     at org.apache.struts.actions.DispatchAction.<clinit>(DispatchAct
ion.java:153)
[webdoclet]     at java.lang.Class.forName0(Native Method)
[webdoclet]     at java.lang.Class.forName(Class.java:217)
[webdoclet]     at xjavadoc.XJavaDoc.getClass(XJavaDoc.java:574)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:475)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:182)
[webdoclet]     at xjavadoc.SourceClass.qualify(SourceClass.java:291)
[webdoclet]     at xjavadoc.AbstractClass.addImportedClass(AbstractClass.java:68
6)
[webdoclet]     at xjavadoc.SimpleParser.ImportDeclaration(SimpleParser.java:111
)
[webdoclet]     at xjavadoc.SimpleParser.CompilationUnit(SimpleParser.java:60)
[webdoclet]     at xjavadoc.SourceClass.parse(SourceClass.java:200)
[webdoclet]     at xjavadoc.XJavaDoc.scanAndPut(XJavaDoc.java:672)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:468)
[webdoclet]     at xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:219)
[webdoclet]     at xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:194)
[webdoclet]     at xdoclet.tagshandler.AbstractProgramElementTagsHandler.getAllC
lasses(AbstractProgramElementTagsHandler.java:117)
[webdoclet]     at xdoclet.tagshandler.ClassTagsHandler.forAllClasses(ClassTagsH
andler.java:281)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[webdoclet]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[webdoclet]     at java.lang.reflect.Method.invoke(Method.java:324)
[webdoclet]     at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:57
7)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.j
ava:476)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEng
ine.java:897)
[webdoclet]     at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine
.java:864)
[webdoclet]     at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java
:425)
[webdoclet]     at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:
324)
[webdoclet]     at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:840
)
[webdoclet]     at xdoclet.tagshandler.ConfigTagsHandler.ifConfigParamGreaterOrE
quals(ConfigTagsHandler.java:296)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[webdoclet]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[webdoclet]     at java.lang.reflect.Method.invoke(Method.java:324)
[webdoclet]     at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:57
7)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.j
ava:476)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEng
ine.java:897)
[webdoclet]     at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine
.java:864)
[webdoclet]     at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java
:425)
[webdoclet]     at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:
324)
[webdoclet]     at xdoclet.template.TemplateEngine.start(TemplateEngine.java:373
)
[webdoclet]     at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:549)

[webdoclet]     at xdoclet.TemplateSubTask.startProcessForAll(TemplateSubTask.ja
va:604)
[webdoclet]     at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:585
)
[webdoclet]     at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[webdoclet]     at xdoclet.modules.web.WebXmlSubTask.execute(WebXmlSubTask.java:
319)
[webdoclet]     at xdoclet.XDocletMain.start(XDocletMain.java:46)
[webdoclet]     at xdoclet.DocletTask.start(DocletTask.java:352)
[webdoclet]     at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:66)
[webdoclet]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[webdoclet]     at org.apache.tools.ant.Task.perform(Task.java:364)
[webdoclet]     at org.apache.tools.ant.Target.execute(Target.java:341)
[webdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
[webdoclet]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

[webdoclet]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[webdoclet]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[webdoclet]     at org.apache.tools.ant.Task.perform(Task.java:364)
[webdoclet]     at org.apache.tools.ant.Target.execute(Target.java:341)
[webdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
[webdoclet]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

[webdoclet]     at org.apache.tools.ant.Project.executeTargets(Project.java:1062
)
[webdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
[webdoclet]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
[webdoclet]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[webdoclet]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[webdoclet] - MessageResourcesFactory.createFactory
[webdoclet] java.lang.ExceptionInInitializerError
[webdoclet]     at org.apache.struts.util.MessageResourcesFactory.createFactory(
MessageResourcesFactory.java:192)
[webdoclet]     at org.apache.struts.util.MessageResources.getMessageResources(M
essageResources.java:576)
[webdoclet]     at org.apache.struts.actions.DispatchAction.<clinit>(DispatchAct
ion.java:153)
[webdoclet]     at java.lang.Class.forName0(Native Method)
[webdoclet]     at java.lang.Class.forName(Class.java:217)
[webdoclet]     at xjavadoc.XJavaDoc.getClass(XJavaDoc.java:574)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:475)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:182)
[webdoclet]     at xjavadoc.SourceClass.qualify(SourceClass.java:291)
[webdoclet]     at xjavadoc.AbstractClass.addImportedClass(AbstractClass.java:68
6)
[webdoclet]     at xjavadoc.SimpleParser.ImportDeclaration(SimpleParser.java:111
)
[webdoclet]     at xjavadoc.SimpleParser.CompilationUnit(SimpleParser.java:60)
[webdoclet]     at xjavadoc.SourceClass.parse(SourceClass.java:200)
[webdoclet]     at xjavadoc.XJavaDoc.scanAndPut(XJavaDoc.java:672)
[webdoclet]     at xjavadoc.XJavaDoc.getXClass(XJavaDoc.java:468)
[webdoclet]     at xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:219)
[webdoclet]     at xjavadoc.XJavaDoc.getSourceClasses(XJavaDoc.java:194)
[webdoclet]     at xdoclet.tagshandler.AbstractProgramElementTagsHandler.getAllC
lasses(AbstractProgramElementTagsHandler.java:117)
[webdoclet]     at xdoclet.tagshandler.ClassTagsHandler.forAllClasses(ClassTagsH
andler.java:281)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[webdoclet]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[webdoclet]     at java.lang.reflect.Method.invoke(Method.java:324)
[webdoclet]     at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:57
7)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.j
ava:476)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEng
ine.java:897)
[webdoclet]     at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine
.java:864)
[webdoclet]     at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java
:425)
[webdoclet]     at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:
324)
[webdoclet]     at xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:840
)
[webdoclet]     at xdoclet.tagshandler.ConfigTagsHandler.ifConfigParamGreaterOrE
quals(ConfigTagsHandler.java:296)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webdoclet]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
[webdoclet]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
[webdoclet]     at java.lang.reflect.Method.invoke(Method.java:324)
[webdoclet]     at xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:57
7)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.j
ava:476)
[webdoclet]     at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEng
ine.java:897)
[webdoclet]     at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine
.java:864)
[webdoclet]     at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java
:425)
[webdoclet]     at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:
324)
[webdoclet]     at xdoclet.template.TemplateEngine.start(TemplateEngine.java:373
)
[webdoclet]     at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:549)

[webdoclet]     at xdoclet.TemplateSubTask.startProcessForAll(TemplateSubTask.ja
va:604)
[webdoclet]     at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:585
)
[webdoclet]     at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:196)
[webdoclet]     at xdoclet.modules.web.WebXmlSubTask.execute(WebXmlSubTask.java:
319)
[webdoclet]     at xdoclet.XDocletMain.start(XDocletMain.java:46)
[webdoclet]     at xdoclet.DocletTask.start(DocletTask.java:352)
[webdoclet]     at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:66)
[webdoclet]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[webdoclet]     at org.apache.tools.ant.Task.perform(Task.java:364)
[webdoclet]     at org.apache.tools.ant.Target.execute(Target.java:341)
[webdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
[webdoclet]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

[webdoclet]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
[webdoclet]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[webdoclet]     at org.apache.tools.ant.Task.perform(Task.java:364)
[webdoclet]     at org.apache.tools.ant.Target.execute(Target.java:341)
[webdoclet]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
[webdoclet]     at org.apache.tools.ant.Project.executeTarget(Project.java:1214)

[webdoclet]     at org.apache.tools.ant.Project.executeTargets(Project.java:1062
)
[webdoclet]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
[webdoclet]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
[webdoclet]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
[webdoclet]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
[webdoclet] Caused by: java.lang.NullPointerException
[webdoclet]     at org.apache.struts.util.MessageResources.getMessageResources(M
essageResources.java:577)
[webdoclet]     at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.jav
a:134)
[webdoclet]     ... 66 more
[webdoclet] Running <jrunwebxml/>
[webdoclet] Generating output 'jrun-web.xml' using template file 'jar:file:/C:/j
run4/lib/jrun-xdoclet.jar!/xdoclet/modules/macromedia/jrun/web/resources/jrun_we
b_xml.xdt'.
[webdoclet] Running <strutsconfigxml/>
[webdoclet] Generating output 'struts-config.xml' using template file 'jar:file:
/C:/source/sites_trunk/sites/skeleton/lib/xdoclet/xdoclet-apache-module-1.2.2-RC
1.jar!/xdoclet/modules/apache/struts/resources/struts_config_xml.xdt'.

filter-descriptor:
     [copy] Copying 1 file to C:\source\sites_trunk\sites\skeleton\build\gamebox
\filtered

BUILD SUCCESSFUL
Total time: 6 seconds
C:\source\sites_trunk\sites\skeleton>ant 199
Buildfile: build.xml

199:

init:
     [echo] +----------------- gamebox build -----------------+

create-merge-dir:
   [delete] Deleting directory C:\source\sites_trunk\sites\skeleton\build\gamebo
x\merge
    [mkdir] Created dir: C:\source\sites_trunk\sites\skeleton\build\gamebox\merg
e
     [copy] Copying 6 files to C:\source\sites_trunk\sites\skeleton\build\gamebo
x\merge
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\web-
security.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\merge\web-sec
urity.xml
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\tagl
ibs.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\merge\taglibs.xml
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\serv
let-mappings.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\merge\ser
vlet-mappings.xml
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\stru
ts-plugins.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\merge\strut
s-plugins.xml
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\stru
ts-message-resources.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\m
erge\struts-message-resources.xml
     [copy] Copying C:\source\sites_trunk\sites\skeleton\gamebox\meta\merge\serv
lets.xml to C:\source\sites_trunk\sites\skeleton\build\gamebox\merge\servlets.xm
l

generate:
[webdoclet] Running <deploymentdescriptor/>
[webdoclet] Generating web.xml.
[webdoclet] Running <jrunwebxml/>
[webdoclet] Generating output 'jrun-web.xml' using template file 'jar:file:/C:/j
run4/lib/jrun-xdoclet.jar!/xdoclet/modules/macromedia/jrun/web/resources/jrun_we
b_xml.xdt'.
[webdoclet] Running <strutsconfigxml/>
[webdoclet] Generating output 'struts-config.xml' using template file 'jar:file:
/C:/source/sites_trunk/sites/skeleton/lib/xdoclet/xdoclet-apache-module-1.2.2-RC
1.jar!/xdoclet/modules/apache/struts/resources/struts_config_xml.xdt'.

filter-descriptor:
     [copy] Copying 1 file to C:\source\sites_trunk\sites\skeleton\build\gamebox
\filtered

BUILD SUCCESSFUL
Total time: 6 seconds

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


Mime
View raw message