cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1711) Server failed to start and receieved IllegalAnnotationExceptions
Date Mon, 21 Jul 2008 20:27:33 GMT

    [ https://issues.apache.org/jira/browse/CXF-1711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615406#action_12615406
] 

Daniel Kulp commented on CXF-1711:
----------------------------------


OK.  This looks like a behavior change in JAXB2.1, but we can work around it.

Basically, JAXB 2.0 doesn't seem to grab the superclasses of types prior to checking the annotations.
 Thus, the supertype of the AlarmType (EventInformationType and it's superclass CommonEventInformationType)
are not available in the context and thus the element isn't available.   

Two ways to deal with it:
1) Use the "extra classes" configuration stuff to configure in the extra classes that are
needed.  

2) Update the JAXBContextInitializer to walk the parent as well.    I'll get this done on
the fixes branch.




> Server failed to start and receieved IllegalAnnotationExceptions 
> -----------------------------------------------------------------
>
>                 Key: CXF-1711
>                 URL: https://issues.apache.org/jira/browse/CXF-1711
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.0.7
>            Reporter: William Tam
>            Priority: Critical
>             Fix For: 2.0.8
>
>         Attachments: mtosi_v2.tar.gz
>
>
> Un-tar the attached tarball in the samples directory, then change to mtosi_v2/alarm_retrieval
directory and run "ant server".  The following stackstrace can be reproduced.  (It requires
ACTIVEMQ_VERSION and ACTIVEMQ_HOME to be set).  it works find in 2.1.
>      [java] Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException:
> 1 counts of IllegalAnnotationExceptions
>      [java] No element mapping exists for "http://www.tmforum.org/mtop/fmw/xsd/c
> ei/v1":"commonEventInformation"
>      [java]     this problem is related to the following location:
>      [java]             at @javax.xml.bind.annotation.XmlElementDecl(namespace=h
> ttp://www.tmforum.org/mtop/nra/xsd/alm/v1, defaultValue= , substitutionHeadName=
> commonEventInformation, scope=class javax.xml.bind.annotation.XmlElementDecl$GLO
> BAL, substitutionHeadNamespace=http://www.tmforum.org/mtop/fmw/xsd/cei/v1, name=
> alarm)
>      [java]             at public javax.xml.bind.JAXBElement org.tmforum.mtop.nr
> a.xsd.alm.v1.ObjectFactory.createAlarm(org.tmforum.mtop.nra.xsd.alm.v1.AlarmType
> )
>      [java]             at org.tmforum.mtop.nra.xsd.alm.v1.ObjectFactory
>      [java]     at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Build
> er.check(IllegalAnnotationsException.java:66)
>      [java]     at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JA
> XBContextImpl.java:389)
>      [java]     at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContex
> tImpl.java:236)
>      [java]     at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto
> ry.java:76)
>      [java]     at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFacto
> ry.java:55)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>      [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
> sorImpl.java:39)
>      [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
> hodAccessorImpl.java:25)
>      [java]     at java.lang.reflect.Method.invoke(Method.java:585)
>      [java]     at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:2
> 10)
>      [java]     at javax.xml.bind.ContextFinder.find(ContextFinder.java:366)
>      [java]     at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
>      [java]     at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContext(JAXBDat
> aBinding.java:512)
>      [java]     at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBindin
> g.java:268)
>      [java]     ... 14 more
>      [java] Java Result: 1

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


Mime
View raw message