私はジェンキンでソナーターゲットを設定しました。それは以前から使用されていましたが、数日前に次の例外を投げ始めました。NullPointerExceptionでソナービルドが失敗する
何が間違っているかわかりません。コードはローカルでコンパイルされ、anbdは非ソナーのターゲットビルドをパスします。
[INFO] Instrumentation was successful.
[INFO] NOT adding cobertura ser file to attached artifacts list.
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 14 source files to /var/lib/jenkins/workspace/4Life-SONAR/4lifestyle/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
An exception has occurred in the compiler (1.6.0_20). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.code.Symbol$MethodSymbol.params(Symbol.java:1212)
at com.sun.tools.javac.jvm.ClassReader.attachParameterAnnotations(ClassReader.java:1125)
at com.sun.tools.javac.jvm.ClassReader.readMemberAttr(ClassReader.java:885)
at com.sun.tools.javac.jvm.ClassReader.readMemberAttrs(ClassReader.java:1041)
at com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:1504)
at com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:1600)
at com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:1672)
at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1859)
at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1791)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:782)
at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1965)
at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:856)
at com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:1021)
at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:1969)
at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1883)
at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1651)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:372)
at com.sun.tools.javac.comp.Attr.attribType(Attr.java:402)
at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:693)
at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:557)
at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:507)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:400)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:412)
at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:524)
at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:454)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:400)
at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:831)
at com.sun.tools.javac.code.Symbol.complete(Symbol.java:400)
at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:782)
at com.sun.tools.javac.comp.Enter.complete(Enter.java:481)
at com.sun.tools.javac.comp.Enter.main(Enter.java:459)
at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:895)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:795)
at com.sun.tools.javac.main.Main.compile(Main.java:380)
at com.sun.tools.javac.main.Main.compile(Main.java:306)
at com.sun.tools.javac.main.Main.compile(Main.java:297)
at com.sun.tools.javac.Main.compile(Main.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.sonar.maven2.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:65)
at org.sonar.maven2.Maven2PluginExecutor.execute(Maven2PluginExecutor.java:47)
at org.sonar.batch.SensorsExecutor.executeMavenPlugin(SensorsExecutor.java:69)
at org.sonar.batch.SensorsExecutor.execute(SensorsExecutor.java:55)
at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:53)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:109)
at org.sonar.batch.AggregatorBatch.analyzeProject(AggregatorBatch.java:106)
at org.sonar.batch.AggregatorBatch.analyzeProjects(AggregatorBatch.java:101)
at org.sonar.batch.AggregatorBatch.execute(AggregatorBatch.java:85)
at org.sonar.maven2.BatchMojo.executeBatch(BatchMojo.java:149)
at org.sonar.maven2.BatchMojo.execute(BatchMojo.java:131)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:75)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar
Javaコンパイラのバグのようです。 javacのバージョンはまったく同じですが、ローカルで動作しますか?これは、ソナーがビルドを計測するためにやっていることによって引き起こされる可能性があります。 CIサーバーのJDKをアップグレードできますか? – Rup
ありがとうございます - jdk 1.7にアップグレードしてください。回答ポイントが必要な場合は、回答として追加してください! – laura