| Summary: | Error creating context if using subclass of JAXBElement<byte[]> | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Rick Barkhouse <rick.barkhouse> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matt.macivor |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 367791 *** The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
If a user maps a custom subclass of JAXBElement<byte[]>, such as: public class MyType { @XmlElementRef(name = "request", namespace = "ns", type = MyType.Request.class) protected MyType.Request request; ... } public class Request extends JAXBElement<byte[]> { public TestRequest(byte[] value) { super(new QName("ns", "request"), byte[].class, MyType.class, value); } ... } context creation will fail with: Exception Description: Class [byte[]] not found. at org.eclipse.persistence.exceptions.JAXBException.classNotFoundException(JAXBException.java:657) at org.eclipse.persistence.jaxb.javamodel.reflection.JavaModelImpl.getClass(JavaModelImpl.java:82) at org.eclipse.persistence.jaxb.javamodel.Helper.getJavaClass(Helper.java:191) at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateDescriptorForJAXBElementSubclass(MappingsGenerator.java:351) The TypeInfo holds "byte[]" in 'factoryMethodParamTypes', but this would need to be converted to '[B' in order to do the Class.forName() in JavaModelImpl. See org.eclipse.persistence.testing.jaxb.xmlelementref.ComplexType for an easy to modify test case.