Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345660 - NPE thrown when generating schema from class
Summary: NPE thrown when generating schema from class
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 16:13 EDT by Nan Li CLA
Modified: 2022-06-09 10:25 EDT (History)
3 users (show)

See Also:


Attachments
stack traces (2.09 KB, text/plain)
2011-05-12 16:14 EDT, Nan Li CLA
no flags Details
Proposed change and tests (23.39 KB, patch)
2011-05-16 14:33 EDT, Denise Smith CLA
no flags Details | Diff
Updated patch (24.72 KB, patch)
2011-05-16 14:36 EDT, Denise Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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