0 Replies Latest reply: Jul 9, 2012 6:26 PM by User376242 RSS

    Error while processing annotations

    User376242
      Hello.

      My project is a maven project using maven 3.0.4 and with this I'm using the maven-processor-plugin:2.0.5 with the
      hibernate-validator-annotation-processor:4.3.0.Final version with jdk1.7_u4 (32bit). I'm running Windows7 x64.
      The project is about 100Mb with 100 modules. When I compile the whole project I get following Exceptions:

      An exception has occurred in the compiler (1.7.0_04). 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.IllegalAccessError: tried to access class com.sun.tools.javac.comp.Check$4 from class com.sun.tools.javac.comp.Check
      at com.sun.tools.javac.comp.Check.checkSunAPI(Check.java:2482)
      at com.sun.tools.javac.comp.Attr.checkId(Attr.java:2589)
      at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:2354)
      at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1677)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:473)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:466)
      at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:717)
      at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:558)
      at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:513)
      at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401)
      at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:413)
      at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:525)
      at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
      at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401)
      at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:872)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:421)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:821)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:764)
      at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:162)
      at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:157)
      at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:1062)
      at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:1120)
      at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:1172)
      at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:1201)
      at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1395)
      at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:2153)
      at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1705)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:473)
      at com.sun.tools.javac.comp.Attr.attribType(Attr.java:466)
      at com.sun.tools.javac.comp.Attr.attribBase(Attr.java:635)
      at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:883)
      at com.sun.tools.javac.code.Symbol.complete(Symbol.java:421)
      at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:821)
      at com.sun.tools.javac.comp.Enter.complete(Enter.java:491)
      at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
      at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
      at com.sun.tools.javac.main.Main.compile(Main.java:439)
      at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:132)
      at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:350)
      at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:197)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      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:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      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:601)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)


      If I build the project seperatly it works and when it does I get the following message:
      [INFO] diagnostic C:\XXXX.java:45:
      warning: com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl is internal proprietary API and may be removed in a future release
      import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
      ^
      [INFO] diagnostic C:\XXXX.java:45:
      warning: com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl is internal proprietary API and may be removed in a future release
      import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;

      And I get this later down if I skip this module.

      An exception has occurred in the compiler (1.7.0_04). 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.IllegalAccessError: tried to access class com.sun.tools.javac.comp.Check$3 from class com.sun.tools.javac.comp.Check
           at com.sun.tools.javac.comp.Check.checkDeprecated(Check.java:2471)
           at com.sun.tools.javac.comp.Attr.checkId(Attr.java:2588)
           at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:2354)
           at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1677)
           at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
           at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
           at com.sun.tools.javac.comp.Attr.attribType(Attr.java:473)
           at com.sun.tools.javac.comp.Attr.attribType(Attr.java:466)
           at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:717)
           at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:558)
           at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:513)
           at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401)
           at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:413)
           at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:525)
           at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459)
           at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:401)
           at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:872)
           at com.sun.tools.javac.code.Symbol.complete(Symbol.java:421)
           at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:821)
           at com.sun.tools.javac.comp.Enter.complete(Enter.java:491)
           at com.sun.tools.javac.comp.Enter.main(Enter.java:469)
           at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929)
           at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
           at com.sun.tools.javac.main.Main.compile(Main.java:439)
           at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:132)
           at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:350)
           at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:197)
           at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
           at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
           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:84)
           at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
           at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
           at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
           at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
           at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
           at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
           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:601)
           at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
           at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
           at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
           at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
           
      Not sure what might be causing this but the code access sun.misc.BASE64Encoder. Removing these propertiary deps seems to solve the problem,
      however, later when building a later module in the build I run into the same problem as the last one. But there I can't seem to find a propertiary class.
      Building just the module works, as with the others. Classpath for the compilation is, according to the debug output, the same. Tried with 64bit jvm.
      Does anyone have an idea what might be going on here?