After disabling generation of 'Use' pages, javadoc works fine for my project.
I removed '-use' from options file that mavan/javadoc plugin generated and javadoc didn't throw NPE. Setting 'use' to 'false' in maven-javadoc-plugin also works fine: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <use>false</use> <links> <link>http://java.sun.com/javase/6/docs/api/</link> </links> </configuration> </plugin> Denis Kranjcec -----Original Message----- From: Denis Kranjčec [mailto:denis.kranj...@srce.hr] Sent: Friday, May 21, 2010 2:22 PM To: Maven Users List Subject: RE: javadoc throws NPE Martin, thanks for reply. I'm using default values: outputDirectory: ${project.build.directory}/apidocs reportOutputDirectory: ${project.reporting.outputDirectory}/apidocs Maven/javadoc plugin generate javadoc.bat in target\site\apidocs: "C:\Program Files\Java\jdk1.6.0_20\jre\..\bin\javadoc.exe" @options @packages @argfile When I run that javadoc.bat from prompt javadoc throws same exception: ... Generating C:/ci/svn/project/project-name/trunk/target/site/apidocs\mypackage/\pack age-use.ht ml... java.lang.NullPointerException at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P ackageUseWriter.java:180) at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList( PackageUseWriter.java:124) at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P ackageUseWriter.java:110) at com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFi le(PackageUseWriter.java:99) at com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseW riter.java:78) at com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWrite r.java:116) at com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoc let.java:92) at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(Ab stractDoclet.java:122) at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDocl et.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.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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) options file in same folder: -classpath 'C:/ci/svn/XXX.jar' -encoding 'Cp1250' -protected -sourcepath 'C:/ci/svn/project/project-name/trunk/src/main/java' -author -bottom 'Copyright © 2006-2010 <a href="http://www.example.com">Example</a>. All Rights Reserved.' -charset 'UTF-8' -d 'C:/ci/svn/project/project-name/trunk/target/site/apidocs' -docencoding 'UTF-8' -doctitle 'PROJECT_NAME PROJECT_VERSION-SNAPSHOT API' -link 'http://java.sun.com/javase/6/docs/api' -use -version -windowtitle 'PROJECT_NAME PROJECT_VERSION-SNAPSHOT API' packages file in same folder: mypackage mypackage.management mypackage.management.statistika argfile file in same folder: 'C:/ci/svn/project/project-name/trunk/src/main/java/ABCMain.java' 'C:/ci/svn/project/project-name/trunk/src/main/java/XYZ.java' Regards, Denis -----Original Message----- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Thursday, May 20, 2010 7:21 PM To: users@maven.apache.org Subject: RE: javadoc throws NPE Denis- http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html can you provide us the configuration parameters for: outputDirectory reportOutputDirectory thanks, Martin-- ______________________________________________ Jogi és Bizalmassági kinyilatkoztatás Ez az üzenet bizalmas. Ha nem ön az akinek szánva volt, akkor kérjük, hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet tartalma miatt. > Subject: javadoc throws NPE > Date: Thu, 20 May 2010 18:10:57 +0200 > From: denis.kranj...@srce.hr > To: users@maven.apache.org > > I am trying to generate javadoc for a project but javadoc throws NPE > without any information. > > Maven output: > Generating > C:/ci/svn/project/project-name/trunk/target/site/apidocs\package-use.htm > l... > Generating C:/ci/svn/project/project-name > /trunk/target/site/apidocs\mypackage/\package-use.ht > ml... > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Error during page generation > > Embedded error: Error rendering Maven report: > Exit code: 1 - java.lang.NullPointerException > at > com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P > ackageUseWriter.java:180) > at > com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageList( > PackageUseWriter.java:124) > at > com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUse(P > ackageUseWriter.java:110) > at > com.sun.tools.doclets.formats.html.PackageUseWriter.generatePackageUseFi > le(PackageUseWriter.java:99) > at > com.sun.tools.doclets.formats.html.PackageUseWriter.generate(PackageUseW > riter.java:78) > at > com.sun.tools.doclets.formats.html.ClassUseWriter.generate(ClassUseWrite > r.java:116) > at > com.sun.tools.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoc > let.java:92) > at > com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(Ab > stractDoclet.java:122) > at > com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDocl > et.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.jav > a:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor > Impl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > 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) > > Command line was: "C:\Program > Files\Java\jdk1.6.0_20\jre\..\bin\javadoc.exe" @options @packages > @argfile > > Refer to the generated Javadoc files in > 'C:\ci\svn\isvu\razmjena-aai\trunk\target\site\apidocs' dir. > > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1 minute 50 seconds > [INFO] Finished at: Thu May 20 17:55:53 CEST 2010 > [INFO] Final Memory: 108M/453M > [INFO] > ------------------------------------------------------------------------ > > > Here is javadoc plugin configuration: > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-javadoc-plugin</artifactId> > <version>2.7</version> > </plugin> > > > mvn --version: > Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) > Java version: 1.6.0_20 > Java home: C:\Program Files\Java\jdk1.6.0_20\jre > Default locale: hr_HR, platform encoding: Cp1250 > OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows" > > > How to solve this? > > > Thanks in advance. > > Regards, > Denis Kranjcec > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > _________________________________________________________________ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL: ON:WL:en-US:WM_HMP:042010_1 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org