Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8068368

NullPointerException while compiling with Apache Maven

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • 8u20
    • tools
    • x86
    • os_x

    Description

      FULL PRODUCT VERSION :
      java version "1.8.0_20"
      Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Darwin cuban4x4 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64

      A DESCRIPTION OF THE PROBLEM :
      Error occurs while using Apache Maven to compile a program.
      command is "maven clean install -U"

      REGRESSION. Last worked in version 8u20

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.8.0_20"
      Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
      Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      mvn clean install -U


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      java.lang.NullPointerException
      at com.sun.tools.javac.code.Scope.includes(Scope.java:296)
      at com.sun.tools.javac.comp.Flow$1.trackable(Flow.java:247)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitVarDef(Flow.java:1832)
      at com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2569)
      at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitLambda(Flow.java:2256)
      at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExpr(Flow.java:1627)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scanExprs(Flow.java:1639)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.visitApply(Flow.java:2236)
      at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
      at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:398)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.scan(Flow.java:1376)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2423)
      at com.sun.tools.javac.comp.Flow$AbstractAssignAnalyzer.analyzeTree(Flow.java:2406)
      at com.sun.tools.javac.comp.Flow.analyzeLambdaThrownTypes(Flow.java:250)
      at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2423)
      at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:284)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:245)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredType.access$000(DeferredAttr.java:132)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredAttrNode.process(DeferredAttr.java:584)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredAttrContext.complete(DeferredAttr.java:479)
      at com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:182)
      at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:564)
      at com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:601)
      at com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:3809)
      at com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3615)
      at com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3522)
      at com.sun.tools.javac.comp.Attr.checkMethodId(Attr.java:3501)
      at com.sun.tools.javac.comp.Attr.checkId(Attr.java:3488)
      at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3370)
      at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1843)
      at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:386)
      at com.sun.tools.javac.comp.DeferredAttr$2.complete(DeferredAttr.java:279)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:245)
      at com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:232)
      at com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:993)
      at com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:826)
      at com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:731)
      at com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:835)
      at com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:576)
      at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1431)
      at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1618)
      at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1689)
      at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1662)
      at com.sun.tools.javac.comp.Resolve$9.doLookup(Resolve.java:2415)
      at com.sun.tools.javac.comp.Resolve$BasicLookupHelper.lookup(Resolve.java:3074)
      at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3325)
      at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2412)
      at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:2406)
      at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:3395)
      at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3281)
      at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1897)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1843)
      at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:656)
      at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1611)
      at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
      at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692)
      at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1142)
      at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
      at com.sun.tools.javac.comp.Attr.visitWhileLoop(Attr.java:1158)
      at com.sun.tools.javac.tree.JCTree$JCWhileLoop.accept(JCTree.java:965)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
      at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:692)
      at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1142)
      at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
      at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1035)
      at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:607)
      at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:676)
      at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4342)
      at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4252)
      at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4181)
      at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4156)
      at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
      at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
      at com.sun.tools.javac.main.Main.compile(Main.java:523)
      at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:483)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: