On Thu, Mar 25, 2004 at 02:21:42PM -0800, Kyle VanderBeek wrote:
> I'm getting an error that someone else saw before:
> 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg05118.html
> 
> I couldn't find a resolution available in the list or elsewhere.  When 
> trying to use xdoclet-1.2 on my BSD build machine, I get the error:
> 
> generate-config:
>      [copy] Copying 4 files to 
> /usr/home/kylev/cvswork/is/www/bondedsender/www-com/build/conf/WEB-INF
> [webdoclet] (XDocletMain.start                   47  ) Running <strutsconfigxml/>
> [webdoclet] (TemplateSubTask.engineStarted       794 ) Generating output 
> 'struts-config.xml' using template file 
> 'jar:/usr/home/kylev/cvswork/is/3rd_party/java/xdoclet-1.2/lib/xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/struts/resources/struts_config_xml.xdt'.
> [webdoclet] (TemplateEngine.invokeMethod         541 ) Invoking method failed: 
> xdoclet.tagshandler.ClassTagsHandler.forAllClassTags, line=65 of template  
> jar:/usr/home/kylev/cvswork/is/3rd_party/java/xdoclet-1.2/lib/xdoclet-apache-module-1.2.jar!/xdoclet/modules/apache/struts/resources/struts_config_xml.xdt
> [webdoclet] java.lang.reflect.InvocationTargetException: 
> [webdoclet] java.lang.AbstractMethodError: xjavadoc/AbstractProgramElement.getName
...

I solved the problem.  Something is slightly tweaky about the xjavadoc 
.jar that comes with xdoclet-1.2 that makes it get unhappy on some 
1.3-series VMs.  So I recompiled under 1.3.1 SDK on FreeBSD and used my 
the new xjavadoc .jar, and things work great.

For posterity, here is how to make a new xjavadoc .jar file with 1.3:

1) Check out the xjavadoc 1.0.2 version:
cvs -z3 -d :pserver:[EMAIL PROTECTED]:/cvsroot/xdoclet export -r XJAVADOC_1_0_2  
xjavadoc

2) Edit the build.xml so that the "jar" target depends on "compile" 
instead of "junit".  Else you have to make junit work in ant.  Honestly, 
I consider this a bug in xjavadoc.  The end product doesn't rely on 
junit, why should the build process?  It should exclude JUnit tests and 
test compilation in the normal build, and have a "test" target that 
depends on "compile" and also compiles/runs unit tests.  That's my 
$0.02.

3) Build with javac 1.3.1, adding xalan and xerces as transformer and
XML tools respectively.  You have to do this since 1.3 doesn't come with 
them built in.  One giant line:

ANT_OPTS="-cp 
/home/kylev/cvswork/is/3rd_party/java/xerces-2_5_0/xercesImpl.jar:lib/xalan.jar 
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl 
-Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"
 
ant

4) Enjoy the glory of a non-sucking target/xjavadoc-1.0.2.jar !


-- 
[EMAIL PROTECTED]
  Some people have a way with words, while others... erm... thingy.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to