Problem with Javadoc - NullPointerException

Hi,

I'm using javadoc (jdk1.5.0_07, eclipse 3.0.2) to export my project.

During the export, I get a java.lang.NullPointerException.

What can cause this problem?

I have some external jar files in my project, some may not have their source files. Maybe that's problem?

Here's the problem console output:

java.lang.NullPointerException

at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:180)

at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList(PackageUseWriter.java:124)

at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(PackageUseWriter.java:110)

at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFile(PackageUseWriter.java:99)

at com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseWriter.java:78)

at com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWriter.java:116)

at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:92)

at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:122)

at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:64)

at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:42)

at com.sun.tools.doclets.standard.Standard.start(Standard.java:23)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)Generating D:\QuickScan\QuickScan\doc\package-use.html...

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:269)

at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:143)

at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:340)

at com.sun.tools.javadoc.Start.begin(Start.java:128)

at com.sun.tools.javadoc.Main.execute(Main.java:41)

at com.sun.tools.javadoc.Main.main(Main.java:31)

Thanks.

[2216 byte] By [tzvatota] at [2007-10-3 4:04:04]
# 1

Let's see. Googling for "javadoc bug packageusewriter nullpointerexception"

finds this, which seems to have exactly your stack trace:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6442980

which is closed as a dupe of:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868

which is an unfixed bug. It says known workarounds are either to drop the -use option or use JDK 1.4.2.

Line 180 from PackageUseWriter.java is:

printHyperLink("", pkg.name(), Util.getPackageName(pkg), true);

where "pkg" is a PackageDoc. A PackageDoc is created from a package.html file.(You can get the source by googling for "java scsl source" and looking in j2se/src/share/classes/com/sun/tools/doclets/formats/html/)

If you could isolate which package is causing this problem (may be more than one), this bug might be due to a problem reading the package.html file for that package. We've fixed a bug with package.html before:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4767447

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4697113

Good luck,

-Doug

dhkramera at 2007-7-14 22:03:12 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2
Thanks,I removed the "use" option (in eclipse, unchecked the "generate use page" option), and it's working now.Thanks for all the help!BTW - is there a way to change the p/w in the forum?
tzvatota at 2007-7-14 22:03:12 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 3

I was able to get to the field to change my password:

Click "My Profile" in the upper right and keep moving forward through all the dialog boxes and windows, submit your password to update your data, then keep going forward and eventually you get to a page with "Update your password" link on the right.

HTH

dhkramera at 2007-7-14 22:03:12 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...