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

Maven Compilation Error with JDK 11

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Maven home: /usr/local/Cellar/maven/3.6.0/libexec
      Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home
      Default locale: en_IL, platform encoding: UTF-8
      OS name: "mac os x", version: "10.14.2", arch: "x86_64", family: "mac"

      A DESCRIPTION OF THE PROBLEM :
      Trying to switch workspace to JDK 11.0.1 from JDK 10.0.2

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      mvn clean install

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      build success
      ACTUAL -
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] An exception has occurred in the compiler (11.0.1). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
      java.lang.AssertionError
      at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
      at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr$2$1.setOverloadKind(DeferredAttr.java:172)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.visitReference(ArgumentAttr.java:283)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMemberReference.accept(JCTree.java:2190)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.attribArg(ArgumentAttr.java:197)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:653)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:751)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1997)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3573)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2110)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:2006)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:498)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr.attribSpeculative(DeferredAttr.java:481)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.lambda$processArg$0(ArgumentAttr.java:220)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:242)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.processArg(ArgumentAttr.java:219)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.visitApply(ArgumentAttr.java:307)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
      at jdk.compiler/com.sun.tools.javac.comp.ArgumentAttr.attribArg(ArgumentAttr.java:197)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:653)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:751)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1997)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1866)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1546)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:743)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2598)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1807)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr$4.complete(DeferredAttr.java:374)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:335)
      at jdk.compiler/com.sun.tools.javac.comp.DeferredAttr$DeferredType.check(DeferredAttr.java:321)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$MethodResultInfo.check(Resolve.java:1060)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$4.checkArg(Resolve.java:887)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$AbstractMethodCheck.argumentsAcceptable(Resolve.java:775)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve$4.argumentsAcceptable(Resolve.java:896)
      at jdk.compiler/com.sun.tools.javac.comp.Infer.instantiateMethod(Infer.java:181)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.rawInstantiate(Resolve.java:605)
      at jdk.compiler/com.sun.tools.javac.comp.Resolve.checkMethod(Resolve.java:644)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.checkMethod(Attr.java:4120)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.checkIdInternal(Attr.java:3913)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.checkMethodIdInternal(Attr.java:3814)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.checkId(Attr.java:3803)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:3696)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2110)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitApply(Attr.java:2006)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1634)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1866)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1546)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:743)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1294)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1020)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1098)
      at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:655)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:724)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4683)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4574)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4503)
      at jdk.compiler/com.sun.tools.javac.comp.Attr.attrib(Attr.java:4448)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1341)
      at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
      at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
      at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
      at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:75)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess0(JavacCompiler.java:626)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcessWithProperClassloader(JavacCompiler.java:607)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:596)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:178)
      at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1129)
      at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:188)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      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)

      ---------- BEGIN SOURCE ----------
      Big project with a lot of references. Unable to localize the behavior.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      switch back to JDK 10.0.2

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              pmangal Priyanka Mangal (Inactive)
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: