glassfish
  1. glassfish
  2. GLASSFISH-18862

NPE in logging annotation processor when not doing clean build

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b43
    • Fix Version/s: 4.0_b71
    • Component/s: logging
    • Labels:
      None
    • Environment:

      Linux/jdk1.6_31/maven 3

      Description

      Running the following command on a module which was already built but only one file needed recompilation
      mvn -f appserver/common/glassfish-naming/pom.xml install

      resulted in build error decsribed at [1], but if I do clean install, then it succeeds. So, this is definitely a bug in the annotation processor.

      [INFO] Compiling 1 source file to /space/ss141213/WS/gf/trunk/appserver/common/glassfish-naming/target/classes
      error: org.glassfish.annotation.processing.logging.LogMessagesResourceBundleGenerator: Resource bundle name not specified for logger
      ...

      An annotation processor threw an uncaught exception.
      Consult the following stack trace for details.
      java.lang.NullPointerException
      at org.glassfish.annotation.processing.logging.LogMessagesResourceBundleGenerator.getRBFileObject(LogMessagesResourceBundleGenerator.java:246)
      at org.glassfish.annotation.processing.logging.LogMessagesResourceBundleGenerator.loadLogMessages(LogMessagesResourceBundleGenerator.java:186)
      at org.glassfish.annotation.processing.logging.LogMessagesResourceBundleGenerator.process(LogMessagesResourceBundleGenerator.java:149)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:627)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:556)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:701)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:987)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
      at com.sun.tools.javac.main.Main.compile(Main.java:353)
      at com.sun.tools.javac.main.Main.compile(Main.java:279)
      at com.sun.tools.javac.main.Main.compile(Main.java:270)
      at com.sun.tools.javac.Main.compile(Main.java:69)
      at com.sun.tools.apt.main.Main.compile(Main.java:1071)
      at com.sun.tools.apt.Main.processing(Main.java:95)
      at com.sun.tools.apt.Main.process(Main.java:85)
      at com.sun.enterprise.module.maven.HK2CompileMojo$1.compileInProcess(HK2CompileMojo.java:126)
      at com.sun.enterprise.module.maven.AptCompiler.compile(AptCompiler.java:106)
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:528)
      at com.sun.enterprise.module.maven.CompilerMojo.execute(CompilerMojo.java:155)
      at com.sun.enterprise.module.maven.HK2CompileMojo.execute(HK2CompileMojo.java:140)
      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:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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)
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.glassfish.hk2:hk2-maven-plugin:2.0.4:hk2-compile (default-hk2-compile) on project glassfish-naming: Fatal error compiling: APT failed: 3 -> [Help 1]
      [ERROR]

        Activity

          People

          • Assignee:
            sandeep.shrivastava
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: