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

Bug 345660

Summary: NPE thrown when generating schema from class
Product: z_Archived Reporter: Nan Li <nan.n.li>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, denise.mahar, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
stack traces
none
Proposed change and tests
none
Updated patch none

Description Nan Li CLA 2011-05-12 16:13:11 EDT
Build Identifier: eclipselink-2.3.0.v20110510-r9336

NullPointerException is thrown when trying to generate schema from the following class:

@XmlType(namespace="personal-info")
public class Test {
    @XmlAttribute(namespace="personal-info")
    public String foo;
}

The attached file includes both stack traces of Eclipselink 2.1.2 and EclipesLnk 2.3.0. 

PS: schema can be generated successful with JDK 1.6.0_23 for the class above.

Reproducible: Always
Comment 1 Nan Li CLA 2011-05-12 16:14:34 EDT
Created attachment 195541 [details]
stack traces
Comment 2 Denise Smith CLA 2011-05-16 14:33:09 EDT
Created attachment 195773 [details]
Proposed change and tests
Comment 3 Denise Smith CLA 2011-05-16 14:36:50 EDT
Created attachment 195774 [details]
Updated patch
Comment 4 Denise Smith CLA 2011-05-16 14:53:37 EDT
Modified schema generation to avoid the null pointer and to create the appropriate attributes.
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:25:14 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink