Name: nt126004 Date: 03/04/2003
FULL PRODUCT VERSION :
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OS VERSION :
Linux opus 2.2.14-5.0 #1 Tue Mar 7 21:07:39 EST 2000 i686 unknown
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using a build script with Jakarta Ant 1.5.1
A DESCRIPTION OF THE PROBLEM :
I have a project tree like
JavaDev
package1
src -> contains com/mycorp/package1/*.java
package2
src -> contains com/mycorp/package2/*.java
buildhere
src -> contains unpackages serlvets (*.java) and overview.html
war -> HTML, WEB-INF directory, etc.
packagen
...
I run an ant build.xml in JavaDev/buildhere. Inside buildhere/src are several
servlets that belong to no package. With 1.3.1, javadoc creates the HTML for these servlets. But in 1.4.1, I get an exception whenever javadoc reaches one of these servlets:
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a tree similar to that in "Description". Attempt to run javadoc for all packages and the Java files in buildhere/src. The error appears whenever an unpackaged servlet in buildhere/src is reached.
The attached script runjavadoc.sh is:
javadoc -d doc/javadocs -classpath /usr/local/j2sdkee1.3.1/lib/j2ee.jar:../package1/package1.jar:../package2/package2.jar:../packagen/packagen.jar -overview ./src/overview.html -windowtitle "Testing javadoc 1.4.1_01" -sourcepath ./src:../package1/src:../package2/src:../packagen/src -doctitle "<h1>Testing javadoc 1.4.1_01</h1>" -bottom "<i>Copyright © 2003 mindwrap, inc. All Rights Reserved.</i>" -package ./src/HelloWorld.java com.mycorp.package1 com.mycorp.package2 com.mycorp.packagen
EXPECTED VERSUS ACTUAL BEHAVIOR :
All docs should build.
java.lang.NullPointerException at java.util.zip.ZipFile.getInputStream(ZipFile.java:182) when no zip file is present.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
From the Ant console:
$ ant javadocs
Buildfile: build.xml
init:
javadocs:
[delete] Deleting directory /home/thad/optixdev/JavaDev/optix-web/doc/javadocs
[mkdir] Created dir: /home/thad/optixdev/JavaDev/optix-web/doc/javadocs
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source file /home/thad/optixdev/JavaDev/optix-web/src/DeleteFolderItemServlet.java...
[javadoc] Loading source file /home/thad/optixdev/JavaDev/optix-web/src/GetScreenDef.java...
[javadoc] Loading source file /home/thad/optixdev/JavaDev/optix-web/src/OpenObjectServlet.java...
[javadoc] Loading source files for package com.optix.database...
[javadoc] Loading source files for package com.optix.database.util...
[javadoc] Loading source files for package com.optix.scrdef...
[javadoc] Loading source files for package com.optix.servlet...
[javadoc] Loading source files for package com.optix.util...
[javadoc] Loading source files for package com.optix.util.collection...
[javadoc] Loading source files for package com.optix.xml...
[javadoc] Constructing Javadoc information...
[javadoc] Standard Doclet version 1.4.1
[javadoc] Building tree for all the packages and classes...
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
[javadoc] javadoc: In doclet class com.sun.tools.doclets.standard.Standard, method start has thrown an exception java.lang.reflect.InvocationTargetException
[javadoc] java.lang.NullPointerException
[javadoc] at java.util.zip.ZipFile.getInputStream(ZipFile.java:182)
[javadoc] at com.sun.tools.javadoc.PackageDocImpl.documentation(PackageDocImpl.java:71)
[javadoc] at com.sun.tools.javadoc.DocImpl.comment(DocImpl.java:74)
[javadoc] at com.sun.tools.javadoc.DocImpl.tags(DocImpl.java:104)
[javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.serialDocInclude(HtmlStandardWriter.java:1432)
[javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.serialInclude(HtmlStandardWriter.java:1413)
[javadoc] at com.sun.tools.doclets.standard.tags.SeeTaglet.toString(SeeTaglet.java:105)
[javadoc] at com.sun.tools.doclets.standard.HtmlStandardWriter.generateTagInfo(HtmlStandardWriter.java:1545)
[javadoc] at com.sun.tools.doclets.standard.ClassWriter.generateClassFile(ClassWriter.java:236)
[javadoc] at com.sun.tools.doclets.standard.ClassWriter.generate(ClassWriter.java:95)
[javadoc] Generating /home/thad/optixdev/JavaDev/optix-web/doc/javadocs/DeleteFolderItemServlet.html...
[javadoc] 1 error
[javadoc] at com.sun.tools.doclets.standard.Standard.generateClassCycle(Standard.java:245)
[javadoc] at com.sun.tools.doclets.standard.Standard.generateClassFiles(Standard.java:195)
[javadoc] at com.sun.tools.doclets.standard.Standard.startGeneration(Standard.java:166)
[javadoc] at com.sun.tools.doclets.standard.Standard.start(Standard.java:44)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:324)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:193)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:92)
[javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:301)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:120)
[javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:41)
[javadoc] at com.sun.tools.javadoc.Main.main(Main.java:31)
REPRODUCIBILITY :
This bug can be reproduced always.
----------- BEGIN SOURCE ---------------
<see comments>
------------ END SOURCE ----------------
CUSTOMER SUBMITTED WORKAROUND :
I'm building the javadoc with 1.3.1. It's an inconvenience.
(Review ID: 181649)
======================================================================