Bug 410638 - JSON Schema Generation NPE with compositemappings that have no reference class
Summary: JSON Schema Generation NPE with compositemappings that have no reference class
Status: NEW
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: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-12 13:37 EDT by Denise Smith CLA
Modified: 2022-06-09 10:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denise Smith CLA 2013-06-12 13:37:42 EDT
This bug can be reproduced with the model in org.eclipse.persistence.testing.jaxb.employee

Trying to generate the JSON schema for this Object will cause the give NPE trying to make use of the Reference Descriptor which is null.  I assume the same issue would happen on a non-collection CompositeObjectMapping with null reference class

public class Employee{
	@XmlElement(name="responsibility")
	@XmlElementWrapper(name="responsibilities")
	public java.util.Collection responsibilities;
}


java.lang.NullPointerException
	at org.eclipse.persistence.internal.jaxb.json.schema.JsonSchemaGenerator.populateProperties(JsonSchemaGenerator.java:85)
	at org.eclipse.persistence.internal.jaxb.json.schema.JsonSchemaGenerator.generateProperty(JsonSchemaGenerator.java:133)
	at org.eclipse.persistence.internal.jaxb.json.schema.JsonSchemaGenerator.populateProperties(JsonSchemaGenerator.java:106)
	at org.eclipse.persistence.internal.jaxb.json.schema.JsonSchemaGenerator.generateSchema(JsonSchemaGenerator.java:79)
	at org.eclipse.persistence.jaxb.JAXBContext.generateJsonSchema(JAXBContext.java:311)
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:10:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink