Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331343

Summary: NPE from Canonical model generator when using generic class types
Product: z_Archived Reporter: Guy Pelletier <guy.pelletier>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.orm-inbox, petr.jiricka
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed changes
none
Submitted patch none

Description Guy Pelletier CLA 2010-11-29 09:32:12 EST
Example stack trace:

    [javac] Compiling 21 source files to /Users/petrjiricka/NetBeansProjects/WebApplication208/build/web/WEB-INF/classes
    [javac] Note: Creating static metadata factory ...
    [javac] Note: Building metadata class for round element: service.AbstractFacade
    [javac] error: java.lang.NullPointerException
    [javac] 
    [javac] 
    [javac] An annotation processor threw an uncaught exception.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.RuntimeException: java.lang.NullPointerException
    [javac] at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)
    [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:625)
    [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:554)
    [javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:699)
    [javac] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
    [javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
    [javac] at com.sun.tools.javac.main.Main.compile(Main.java:353)
    [javac] at com.sun.tools.javac.main.Main.compile(Main.java:279)
    [javac] at com.sun.tools.javac.main.Main.compile(Main.java:270)
    [javac] at com.sun.tools.javac.Main.compile(Main.java:69)

Example class definition causing this exception:

public abstract class AbstractFacade<T> {
  ...
}
Comment 1 Guy Pelletier CLA 2010-11-29 11:34:33 EST
Created attachment 184049 [details]
Proposed changes
Comment 2 Guy Pelletier CLA 2010-11-29 13:50:48 EST
Changes have been submitted.

Reviewed by: Tom Ware

Tested manually through Eclipse and our build scripts.
Comment 3 Guy Pelletier CLA 2010-11-30 11:52:05 EST
The actual full changes were checked in today (30th). Somehow my changes were not applied on the SVN commit for the 29th. Nightly tonight should have the fix.
Comment 4 Guy Pelletier CLA 2010-11-30 14:24:35 EST
Created attachment 184174 [details]
Submitted patch
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:23:59 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink