[GRADLE-1596] Exception raised inside JavaDoc generation result in just the exception name being printed, without a stack trace Created: 06/Jun/11  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-3
Fix Version/s: None

Type: Bug
Reporter: Howard M. Lewis Ship Assignee: Unassigned
Resolution: Won't Fix Votes: 1


 Description   

Using the Javadoc task, if a doclet or taglet throws an exception, the stack trace inside the running JavaDoc process is not displayed. Example:

18:08:02.197 [ERROR] [system.err] java.lang.NullPointerException
18:08:02.293 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process finished for command '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javadoc'.
18:08:02.296 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':aggregateJavadoc'
18:08:02.300 [ERROR] [org.gradle.BuildExceptionReporter]
18:08:02.301 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
18:08:02.301 [ERROR] [org.gradle.BuildExceptionReporter]
18:08:02.301 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
18:08:02.301 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':aggregateJavadoc'.
18:08:02.301 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Javadoc generation failed.
18:08:02.303 [ERROR] [org.gradle.BuildExceptionReporter] Cause: Command '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javadoc' finished with (non-zero) exit value 255.
18:08:02.303 [ERROR] [org.gradle.BuildExceptionReporter]
18:08:02.303 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':aggregateJavadoc'.
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:71)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:48)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
18:08:02.304 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask.execute(AbstractTask.java:237)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
18:08:02.305 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)
18:08:02.306 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.execute(Main.java:55)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.main(Main.java:40)
18:08:02.307 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:24)
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.GradleException: Javadoc generation failed.
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.javadoc.Javadoc.executeExternalJavadoc(Javadoc.java:145)
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.javadoc.Javadoc.generate(Javadoc.java:129)
18:08:02.308 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:158)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:93)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.javadoc.Javadoc_Decorated.invokeMethod(Unknown Source)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:129)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$2.execute(AnnotationProcessingTaskFactory.java:127)
18:08:02.309 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:63)
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] ... 28 more
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Command '/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/javadoc' finished with (non-zero) exit value 255.
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:335)
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecAction.execute(DefaultExecAction.java:39)
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.tasks.javadoc.Javadoc.executeExternalJavadoc(Javadoc.java:143)
18:08:02.310 [ERROR] [org.gradle.BuildExceptionReporter] ... 36 more
18:08:02.311 [ERROR] [org.gradle.BuildExceptionReporter]
18:08:02.311 [LIFECYCLE] [org.gradle.BuildResultLogger]
18:08:02.311 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
18:08:02.311 [LIFECYCLE] [org.gradle.BuildResultLogger]
18:08:02.311 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 26.931 secs

This makes it virtually impossible to code & debug doclets.



 Comments   
Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 11:59:34 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.