Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361994 - NPE Creating a DynamicJAXBContext from eclipselink_oxm_2_4.xsd
Summary: NPE Creating a DynamicJAXBContext from eclipselink_oxm_2_4.xsd
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: Rick Barkhouse CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 15:26 EDT by Denise Smith CLA
Modified: 2022-06-09 10:07 EDT (History)
0 users

See Also:


Attachments
Patch - test changes (1.45 KB, patch)
2012-04-27 14:43 EDT, Rick Barkhouse CLA
no flags Details | Diff

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