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

Bug 362713

Summary: JAXB validation stops working when applying @XmlList without @XmlIDREF
Product: [WebTools] Dali JPA Tools Reporter: Nan Li <nan.n.li>
Component: JAXBAssignee: Paul Fullbright <paul.fullbright>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P1 CC: karenfbutzke, neil.hauge
Version: unspecified   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Stack Trace
none
Repository
none
Stack Trace 2
none
Schema none

Description Nan Li CLA 2011-11-02 14:43:59 EDT
Build Identifier: M20110909-1335

1. Load the attached repository
2. Open Employee class and go to either "employees" or "phones" field
3. Try to comment out @XmlIDREF

JAXB validation will stop working with the following NPE:

java.lang.NullPointerException
	at org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlList.validate(GenericJavaXmlList.java:90)
	at org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaBasicMapping.validate(GenericJavaBasicMapping.java:474)
	at org.eclipse.jpt.jaxb.core.internal.context.java.GenericJavaXmlElementMapping.validate(GenericJavaXmlElementMapping.java:226)

The full stack trace and repository are attached. 

Reproducible: Always
Comment 1 Nan Li CLA 2011-11-02 14:45:19 EDT
Created attachment 206362 [details]
Stack Trace
Comment 2 Nan Li CLA 2011-11-02 14:45:45 EDT
Created attachment 206363 [details]
Repository
Comment 3 Paul Fullbright CLA 2011-11-03 09:36:43 EDT
*** Bug 362791 has been marked as a duplicate of this bug. ***
Comment 4 Nan Li CLA 2011-11-03 10:56:39 EDT
Created attachment 206409 [details]
Stack Trace 2

JAXB validation also stops working when generating classes from a schema. The stack trace looks similar so I attach the stack trace and the schema I am using to this bug. If opening a new bug is necessary, please let me know.
Comment 5 Nan Li CLA 2011-11-03 10:57:42 EDT
Created attachment 206410 [details]
Schema
Comment 6 Paul Fullbright CLA 2011-11-03 14:13:37 EDT
fixed for 3.1 m3