|
Anyone have a clue how to fix this one? I tried again today with no luck. I'd be happy with a workaround if no one knows of a fix.
On 2nd check, this patch does seem to work. The NPE was caused by recompiling and not including the new xdoclet-xdoclet-module-version.jar. If there are no objections, I'd like to check this in. I've tested it with Ant 1.6.2 and Ant 1.5.4.
The error seems to occur when you try to run an XDoclet task twice in the same Ant execution. I've tried patching 1.2.1 and 1.2.2rc1 with this and I still get the following NPE. I'm sure I included all of the required jars.
[webdoclet] java.lang.NullPointerException [webdoclet] at xdoclet.DocletTask.getConfigParams(DocletTask.java:439) [webdoclet] at xdoclet.DocletTask.createContext(DocletTask.java:615) [webdoclet] at xdoclet.DocletTask.validateSubTasks(DocletTask.java:517) [webdoclet] at xdoclet.DocletTask.validateOptions(DocletTask.java:491) [webdoclet] at xdoclet.modules.web.WebDocletTask.validateOptions(WebDocletTask.java:24) [webdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:94) [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) This issue has bitten me as well - latest (1.2.2 RC1) XDoclet, Ant 1.6.2, and Clover 1.3.1. This bug only happens when I run the build script with Clover enabled.
Here's a 2nd patch that fixes the problem form me. I'm using Ant 1.6.2 on Windows XP.
CVS COMMIT LOG:
SUBJECT: [Xdoclet-devel] CVS: xdoclet/core/src/xdoclet DocletTask.java,1.63,1.64 Fixed "destDir attribute must be present" error that happens when running targets twice in Ant 1.6 ( Re-opened to back out change.
Backed out change since it seems to cause more problems than it fixes.
Here's a quick hack against 1.2.3 which fixes this problem for me.
|
|||||||||||||||||||||||||||||||||||||||||||||||||
[xdoclet] java.lang.NullPointerException
[xdoclet] at xdoclet.DocletTask.getConfigParams(DocletTask.java:439)
[xdoclet] at xdoclet.DocletTask.createContext(DocletTask.java:615)
[xdoclet] at xdoclet.DocletTask.validateSubTasks(DocletTask.java:517)
[xdoclet] at xdoclet.DocletTask.validateOptions(DocletTask.java:491)
[xdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:94)
[xdoclet] at org.apache.tools.ant.Task.perform(Task.java:364)
[xdoclet] at org.apache.tools.ant.Target.execute(Target.java:301)
[xdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:328)
[xdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
[xdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1063)
[xdoclet] at org.apache.tools.ant.Main.runBuild(Main.java:632)
[xdoclet] at org.apache.tools.ant.Main.startAnt(Main.java:183)
[xdoclet] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
[xdoclet] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
I'm guessing that the last changed fix that issue, but caused this one. Who knows. Any ideas on how to resolve this incompatibility with 1.6.1?