trantamm (2) [Avatar] Offline
#1
[Chapter 5 example] <strutsconfigxml> problem
I try to test the <strutsconfigxml> subtask in chapter 5 example. In build.xml, I only comment out the build-ejbgen.xml executing line in <target name="generate">:

<target name="generate">
<!-- <ant antfile="build-ejbgen.xml" target="generate-ejb"/> <br /> -->
<ant antfile="build-webgen.xml" target="generate-web"/>
</target>

I run ant, and I get the following error:

BUILD FAILED
/root/archive/xdoclet-in-action/chapter5-struts/build.xml:59: The following error occurred while executing this line:
/root/archive/xdoclet-in-action/chapter5-struts/build-webgen.xml:15: Can't create a strutsconfigxml element under webdoclet. Make sure the jar file containing the corresponding subtask class is on the classpath specified in the <taskdef> that defined {2}.

My lib directory has the following jar files:

commons-beanutils.jar
commons-validator.jar
README
commons-collections-2.0.jar
j2ee.jar
struts.jar
commons-digester.jar
jdbc2_0-stdext.jar
tiles.jar
commons-logging.jar
log4j.jar

and my xdocletlib directory has the following jar files:

ant.jar
xdoclet-1.2b3-dev.jar
commons-collections-2.0.jar
xdoclet-apache-module-1.2b4.jar
commons-logging.jar
xdoclet-ejb-module-1.2b4.jar
javax.servlet.jar
xdoclet-jboss-module-1.2b4.jar
log4j.jar
xdoclet-jmx-module-1.2b4.jar
README
xdoclet-web-module-1.2b3-dev.jar
servlet-api.jar
xjavadoc-1.0.jar
servlet.jar

I wonder why I have all the required jar files in both lib and xdocletlib directories, but xdoclet still cannot recognize <strutsconfigxml> subtask. Would anyone help me with this problem? I appreciate your help.

Tam Tran
zico (1) [Avatar] Offline
#2
Re: [Chapter 5 example] &lt;strutsconfigxml&gt; problem
i have also come across such problem,and i found it needs a class of XDoclet.SubTask,by i didn't find it in and Xdoclet Jar File.but I found that it exsited in the src file for XDoclet-src.So I suppose if we need to recompile the whole Xdoclet project? ,or just compile the single class?