You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2008/07/31 15:30:33 UTC

[jira] Updated: (TUSCANY-2519) "throws Exception" causes failure in JAXB type generation

     [ https://issues.apache.org/jira/browse/TUSCANY-2519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws updated TUSCANY-2519:
--------------------------------

    Attachment: TUSCANY-2519-reproduce.patch

I was extending itest/exceptions-simple-ws when I came across this. Apply this patch to the itest and then run the ExampleMinimalTestCase JUnit test. 

> "throws Exception" causes failure in JAXB type generation
> ---------------------------------------------------------
>
>                 Key: TUSCANY-2519
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2519
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: WinXP SP2 IBM JDK5.0
>            Reporter: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: TUSCANY-2519-reproduce.patch
>
>
> An interface with a method such as;
> public String hello(String name) throws Exception;
> Causes our WSDL generation code to bail out with;
> Caused by: java.lang.TypeNotPresentException: Type javax.xml.bind.annotation.XmlRootElement not present
> 	at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:38)
> 	at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
> 	at java.lang.Class.getDeclaredAnnotations(Class.java:1620)
> 	at java.lang.Class.getAnnotations(Class.java:1581)
> 	at java.lang.Class.getAnnotation(Class.java:1561)
> 	at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassAnnotation(RuntimeInlineAnnotationReader.java:102)
> 	at com.sun.xml.bind.v2.model.annotation.RuntimeInlineAnnotationReader.getClassAnnotation(RuntimeInlineAnnotationReader.java:53)
> 	at com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:325)
> 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:432)
> 	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:64)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:615)
> 	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 org.apache.tuscany.sca.databinding.jaxb.JAXBContextCache.getJAXBContext(JAXBContextCache.java:275)
> 	at org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBContext(JAXBContextHelper.java:179)
> 	at org.apache.tuscany.sca.databinding.jaxb.JAXBContextHelper.createJAXBContext(JAXBContextHelper.java:211)
> 	at org.apache.tuscany.sca.databinding.jaxb.JAXBTypeHelper.getSchemaDefinitions(JAXBTypeHelper.java:238)
> 	... 28 more
> Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlRootElement
> 	at java.lang.Class.forName(Class.java:163)
> 	at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:33)
> 	... 51 more
> The RI tooling seems to able to happily cope with this. 

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