You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jake Goulding (JIRA)" <ji...@apache.org> on 2008/09/23 02:40:44 UTC

[jira] Created: (AXIS2-4043) jaxbri does not properly create new instances when using inheritance of abstract elements

jaxbri does not properly create new instances when using inheritance of abstract elements
-----------------------------------------------------------------------------------------

                 Key: AXIS2-4043
                 URL: https://issues.apache.org/jira/browse/AXIS2-4043
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: Jake Goulding
         Attachments: inheritance.wsdl, Main.java

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 {urn:/test/types}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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-4043) jaxbri does not properly create new instances when using inheritance of abstract elements

Posted by "Jake Goulding (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Goulding updated AXIS2-4043:
---------------------------------

    Attachment: inheritance.wsdl

WSDL demonstrating the problem.

> jaxbri does not properly create new instances when using inheritance of abstract elements
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4043
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4043
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Jake Goulding
>         Attachments: inheritance.wsdl, Main.java
>
>
> 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 {urn:/test/types}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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-4043) jaxbri does not properly create new instances when using inheritance of abstract elements

Posted by "Jake Goulding (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Goulding updated AXIS2-4043:
---------------------------------

    Attachment: Main.java

Simple Main that tests the problem.

> jaxbri does not properly create new instances when using inheritance of abstract elements
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4043
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4043
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.4
>            Reporter: Jake Goulding
>         Attachments: inheritance.wsdl, Main.java
>
>
> 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 {urn:/test/types}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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org