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

Bug 361994

Summary: NPE Creating a DynamicJAXBContext from eclipselink_oxm_2_4.xsd
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: Rick Barkhouse <rick.barkhouse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch - test changes none

Description Denise Smith CLA 2011-10-25 15:26:00 EDT
Creating a DynamicJAXBContext from  eclipselink_oxm_2_4.xsd throws the following exception

java.lang.NullPointerException
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processReferenceProperty(AnnotationsProcessor.java:2163)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:886)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processPropertyTypes(AnnotationsProcessor.java:859)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.processClassesAndProperties(AnnotationsProcessor.java:238)
	at org.eclipse.persistence.jaxb.compiler.Generator.<init>(Generator.java:104)
	at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext$SchemaContextInput.createContextState(DynamicJAXBContext.java:310)
	at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:168)
	at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext.<init>(DynamicJAXBContext.java:70)
	at org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory.createContextFromXSD(DynamicJAXBContextFactory.java:270)
	at org.eclipse.persistence.testing.jaxb.dynamic.DynamicJAXBFromXSDTestCases.testBindingsSchema(DynamicJAXBFromXSDTestCases.java:602)
Comment 1 Rick Barkhouse CLA 2012-04-27 14:43:12 EDT
Created attachment 214730 [details]
Patch - test changes
Comment 2 Rick Barkhouse CLA 2012-04-27 14:47:03 EDT
The bug causing the NPE seems to have already been fixed in another transaction, I am able to bootstrap a dynamic JAXB context from eclipselink_oxm_2_4.xsd with no errors.

However, bootstrapping from this schema causes an XJC artifact to be generated that uses JAXB 2.2 apis (XmlElementRef.required()), so this new test will only run in Java 7 environments.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:07:19 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink