Duplicate of MNG-779, I think.

-----Original Message-----
From: md (JIRA) [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 30, 2005 18:08
To: dev@maven.apache.org
Subject: [jira] Created: (MNG-809) NPE in maven-javadoc-plugin


NPE in maven-javadoc-plugin
---------------------------

         Key: MNG-809
         URL: http://jira.codehaus.org/browse/MNG-809
     Project: Maven 2
        Type: Bug
  Components: maven-plugins  
    Versions: 2.0-beta-1    
 Environment: Windows 2k3 SP1. JDK 1.5.0_04
 Reporter: md
 Attachments: JavadocReport.java

running m2 javadoc:javadoc fails with an NPE:

[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
----
[INFO] Diagnosis: An error has occurred in JavaDocs report generation.
[INFO]
------------------------------------------------------------------------
----
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: An error has occurred in
JavaDocs report generation.
        at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:98)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginMa
nager.java:346)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Default
LifecycleExecutor.java:478)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoa
l(DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultL
ifecycleExecutor.java:441)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifec
ycleExecutor.java:131)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:186)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:316)
        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:585)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.reporting.MavenReportException: An error has
occurred in javadoc report generation.
        at
org.apache.maven.plugin.javadoc.JavadocReport.executeReport(JavadocRepor
t.java:857)
        at
org.apache.maven.plugin.javadoc.JavadocReport.generate(JavadocReport.jav
a:618)
        at
org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenRepo
rt.java:92)
        ... 16 more
Caused by: java.lang.NullPointerException
        at
org.apache.maven.plugin.javadoc.JavadocReport.executeReport(JavadocRepor
t.java:800)
        ... 18 more

I looked at the source code; looks like the variable doctitle needs to
be initialized with the static variable DEFAULT_DOCTITLE in it's
declaration on line 337 in
org.apache.maven.plugin.javadoc.JavadocReport. I tested this fix on my
machine and the NPE went away and the target/javadoc folder appeared.

Attaching the file with the change on line 337.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to