Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
Description
Summary of WSDL:
schema a has abstract type "output" and concrete subclass "output-instance".
schema b imports schema a and references abstract element "output"
Error:
Unable to create JAXBContext for class: test.Outputs
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element
output.
this problem is related to the following location:
at protected java.util.List test.Outputs.output
at test.Outputs
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:372)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
at test.TestServiceStub.<clinit>(TestServiceStub.java:441)
at Main.main(Main.java:14)
The corresponding line in the Stub is:
jc = javax.xml.bind.JAXBContext.newInstance(test.Outputs.class);
If this is changed to
jc = javax.xml.bind.JAXBContext.newInstance(test.Outputs.class, test.types.ObjectFactory.class);
This exception is no longer thrown, and everything else seems to proceed as usual.
Attachments
Attachments
Issue Links
- relates to
-
AXIS2-4042 jaxbri binding should report exception in addition to "Unable to create JAXBContext for class"
- Resolved