Я использую Intellij IDEA 2016.2.4 для разработки плагина. Когда выполнить задачу Gradle («строить», например), я имею следующую ошибку: gradlew build --debug --stacktrace
Ошибка сборки Intellij: Выполнение не выполнено для задачи ': classes' @NotNull аппаратура не выполнена
[ERROR] [org.gradle.BuildExceptionReporter] Caused by: : @NotNull instrumentation failed for C:\Users\mri\ownCloud\dev\workspace\ca-aqe-livingdoc-intellij\build\classes\main\info\novatec\testit\livingdoc\intellij\common\I18nSupport. class: java.lang.NullPointerException
Этот класс, где происходит ошибка:
public class I18nSupport {
private static final String BUNDLE_PATH = "properties.locale";
@NonNls
private static final ResourceBundle bundle = ResourceBundle.getBundle(BUNDLE_PATH);
private I18nSupport() {
//Utility class
}
public static String getValue
(@PropertyKey(resourceBundle = BUNDLE_PATH) String key, Object... params) {
String value = bundle.getString(key);
if (params.length > 0) {
return MessageFormat.format(value, params);
}
return value;
}
Я попытался для отключив «Добавить @NotNull assertions» в настройке, но это не сработает. Не переустанавливать Intellij или изменять простейший путь. У меня нет новых идей :(
Также скопировать и вставить результат StackTrace:
13:29:55.189 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:instrumentIdeaExtensions] Adding @NotNull assertions to C:\Users\mri\ownCloud\dev\workspace\ca-aqe-livingdoc-intellij\build\classes\main\info\novatec\testit\living
doc\intellij\common\I18nSupport.class
13:29:55.190 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':classes'
13:29:55.190 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :classes FAILED
13:29:55.190 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :classes (Thread[main,5,main]) completed. Took 0.637 secs.
13:29:55.190 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 3.037 secs, idle: 0.0 secs
13:29:55.196 [ERROR] [org.gradle.BuildExceptionReporter]
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter]
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':classes'.
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter] > @NotNull instrumentation failed for C:\Users\mri\ownCloud\dev\workspace\ca-aqe-livingdoc-intellij\build\classes\main\info\novatec\testit\livingdoc\intellij\common\I18nSupport.class: java
.lang.NullPointerException
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter]
13:29:55.197 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':classes'.
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:68)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
13:29:55.198 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Factories$1.create(Factories.java:22)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:241)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:214)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
13:29:55.199 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:207)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.Main.doAction(Main.java:33)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: : @NotNull instrumentation failed for C:\Users\mri\ownCloud\dev\workspace\ca-aqe-livingdoc-intellij\build\classes\main\info\novatec\testit\livingdoc\intellij\common\I18nSupport.
class: java.lang.NullPointerException
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.fireError(Javac2.java:524)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:476)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.instrumentNotNull(Javac2.java:480)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at com.intellij.ant.Javac2.compile(Javac2.java:255)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:936)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.ant.BasicAntBuilder.nodeCompleted(BasicAntBuilder.java:78)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.ant.BasicAntBuilder.doInvokeMethod(BasicAntBuilder.java:93)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.intellij.IntelliJInstrumentCodeAction.instrumentCode(IntelliJInstrumentCodeAction.groovy:75)
13:29:55.200 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.intellij.IntelliJInstrumentCodeAction$_execute_closure2.doCall(IntelliJInstrumentCodeAction.groovy:44)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.intellij.IntelliJInstrumentCodeAction.execute(IntelliJInstrumentCodeAction.groovy:35)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.jetbrains.intellij.IntelliJInstrumentCodeAction.execute(IntelliJInstrumentCodeAction.groovy)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter] ... 60 more
13:29:55.201 [ERROR] [org.gradle.BuildExceptionReporter]
13:29:55.201 [LIFECYCLE] [org.gradle.BuildResultLogger]
13:29:55.201 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
13:29:55.201 [LIFECYCLE] [org.gradle.BuildResultLogger]
13:29:55.201 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 7.474 secs
Связанный выпуск в * JetBrains Поддержке *: https://intellij-support.jetbrains.com/hc/en-us/requests/772795, а также в поисковом журнале * YouTrack *: https://youtrack.jetbrains.com/issue/IDEA-161691. – mruiz