java.lang.NullPointerException

Hibernate JIRA | Thomas Greve | 3 years ago
  1. 0

    I have added the jpamodelgen as annotation processor to an ejb project. However, when recompiling, not all meta classes are created. The processor crashes with a NPE. Compiling the project with the same jdk and ant works fine. {noformat} java.lang.NullPointerException at org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.addJava6GeneratedFile(AptCompilationParticipant.java:272) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeProcessingEnvImpl.addNewUnit(IdeProcessingEnvImpl.java:132) at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeJavaSourceOutputStream.close(IdeJavaSourceOutputStream.java:72) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:266) at java.io.PrintWriter.close(PrintWriter.java:339) at org.hibernate.jpamodelgen.ClassWriter.writeFile(ClassWriter.java:80) at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.createMetaModelClasses(JPAMetaModelEntityProcessor.java:155) at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.process(JPAMetaModelEntityProcessor.java:145) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:422) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) {noformat}

    Hibernate JIRA | 3 years ago | Thomas Greve
    java.lang.NullPointerException
  2. 0

    I have added the jpamodelgen as annotation processor to an ejb project. However, when recompiling, not all meta classes are created. The processor crashes with a NPE. Compiling the project with the same jdk and ant works fine. {noformat} java.lang.NullPointerException at org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.addJava6GeneratedFile(AptCompilationParticipant.java:272) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeProcessingEnvImpl.addNewUnit(IdeProcessingEnvImpl.java:132) at org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeJavaSourceOutputStream.close(IdeJavaSourceOutputStream.java:72) at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320) at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149) at java.io.OutputStreamWriter.close(OutputStreamWriter.java:233) at java.io.BufferedWriter.close(BufferedWriter.java:266) at java.io.PrintWriter.close(PrintWriter.java:339) at org.hibernate.jpamodelgen.ClassWriter.writeFile(ClassWriter.java:80) at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.createMetaModelClasses(JPAMetaModelEntityProcessor.java:155) at org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.process(JPAMetaModelEntityProcessor.java:145) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159) at org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178) at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302) at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60) at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374) at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513) at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:422) at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) {noformat}

    Hibernate JIRA | 3 years ago | Thomas Greve
    java.lang.NullPointerException
  3. 0

    Stick 2 Code: March 2014

    blogspot.com | 1 year ago
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Intermittent NullPointerException in AptCompilationParticipant

    Eclipse Bugzilla | 5 years ago | matthias.keller
    java.lang.NullPointerException
  6. 0

    Error in eclipse

    GitHub | 3 years ago | kkocel
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.addJava6GeneratedFile()
    2. org.eclipse.jdt
      IdeJavaSourceOutputStream.close
      1. org.eclipse.jdt.apt.core.internal.AptCompilationParticipant.addJava6GeneratedFile(AptCompilationParticipant.java:272)
      2. org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeProcessingEnvImpl.addNewUnit(IdeProcessingEnvImpl.java:132)
      3. org.eclipse.jdt.internal.apt.pluggable.core.filer.IdeJavaSourceOutputStream.close(IdeJavaSourceOutputStream.java:72)
      3 frames
    3. Java RT
      PrintWriter.close
      1. sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)
      2. sun.nio.cs.StreamEncoder.close(StreamEncoder.java:149)
      3. java.io.OutputStreamWriter.close(OutputStreamWriter.java:233)
      4. java.io.BufferedWriter.close(BufferedWriter.java:266)
      5. java.io.PrintWriter.close(PrintWriter.java:339)
      5 frames
    4. org.hibernate.jpamodelgen
      JPAMetaModelEntityProcessor.process
      1. org.hibernate.jpamodelgen.ClassWriter.writeFile(ClassWriter.java:80)
      2. org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.createMetaModelClasses(JPAMetaModelEntityProcessor.java:155)
      3. org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor.process(JPAMetaModelEntityProcessor.java:145)
      3 frames
    5. Eclipse ECJ
      BaseAnnotationProcessorManager.processAnnotations
      1. org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
      2. org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:121)
      3. org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
      3 frames
    6. org.eclipse.jdt
      IdeAnnotationProcessorManager.processAnnotations
      1. org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager.processAnnotations(IdeAnnotationProcessorManager.java:134)
      1 frame
    7. JDT Core
      JavaBuilder.build
      1. org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:820)
      2. org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:434)
      3. org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:365)
      4. org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:178)
      5. org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:302)
      6. org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:60)
      7. org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:254)
      8. org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:173)
      8 frames
    8. Core Resource Management
      BuildManager$2.run
      1. org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
      1 frame
    9. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    10. Core Resource Management
      BuildManager$1.run
      1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
      2. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
      3. org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
      3 frames
    11. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    12. Core Resource Management
      Workspace.build
      1. org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
      2. org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
      3. org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
      4. org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:513)
      5. org.eclipse.core.internal.resources.Workspace.build(Workspace.java:422)
      5 frames
    13. Eclipse UI
      GlobalBuildAction$1.run
      1. org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180)
      1 frame
    14. Eclipse Jobs
      Worker.run
      1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
      1 frame