users@jaxb.java.net

Re: There's no ObjectFactory with an _at_XmlElementDecl for the element

From: Trankh <juliend1985_at_gmail.com>
Date: Wed, 30 Jun 2010 04:50:12 -0700 (PDT)

What do you write into the getResult method?





Nadeem Ilyas wrote:
>
> could you be more specific, i am facing similar problem. Following is the
> exception.
>
> java.security.PrivilegedActionException:
> com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 9 counts of
> IllegalAnnotationExceptions
> There's no ObjectFactory with an @XmlElementDecl for the element
> {urn:hl7-org:v3}asAgent.
> this problem is related to the following location:
> at protected javax.xml.bind.JAXBElement
> org.hl7.v3.MCCIMT000300UV01Device.asAgent
> at org.hl7.v3.MCCIMT000300UV01Device
> at protected org.hl7.v3.MCCIMT000300UV01Device
> org.hl7.v3.MCCIMT000300UV01Receiver.device
>
>
>
>
> Guilhem Legal wrote:
>>
>> Hi!
>>
>> for those who have still this problem, i have found a solution.
>>
>> i had the following error when compiling my jax-ws webservice :
>>
>> there's no ObjectFactory with an @XmlElementDecl for the element
>> {http://www.opengis.net/ogc}temporalOps.
>> this problem is related to the following location:
>> at protected javax.xml.bind.JAXBElement
>> net.opengeospatial.sos._0.GetResult.temporalOps
>>
>> but there was an XmlElementDecl in the object factory. so i fix my
>> problem by adding
>>
>> @XmlSeeAlso({ BinaryTemporalOpType.class })
>> public static class GetResut {
>> ..... }
>>
>> (BinaryTemporalOpType is the type of temporalOps)
>>
>> I hope this can help you.
>>
>> regards,
>> Guilhem Legal
>> http://www.geomatys.fr
>>
>> Guilhem Legal wrote:
>>>
>>> Hi!
>>>
>>> I have a problem whith the generated classes with xjc.
>>>
>>> When i try to create the JAXBContext i get the following error :
>>>
>>> There's no ObjectFactory with an @XmlElementDecl for the element
>>> {http://www.opengis.net/ogc}temporalOps.
>>> this problem is related to the following location:
>>> at protected javax.xml.bind.JAXBElement
>>> net.opengeospatial.sos._0.GetResult$EventTime.temporalOps
>>> at net.opengeospatial.sos._0.GetResult$EventTime
>>> at protected java.util.List
>>> net.opengeospatial.sos._0.GetResult.eventTime
>>> at net.opengeospatial.sos._0.GetResult
>>>
>>> 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)
>>>
>>>
>>> I look at the ObjectFactory and there is a @XmlElementDecl for the
>>> element {http://www.opengis.net/ogc}temporalOps :
>>>
>>> @XmlElementDecl(namespace = "http://www.opengis.net/ogc", name =
>>> "temporalOps")
>>> public JAXBElement<TemporalOpsType>
>>> createTemporalOps(TemporalOpsType value) {
>>> return new JAXBElement<TemporalOpsType>(_TemporalOps_QNAME,
>>> TemporalOpsType.class, null, value);
>>> }
>>>
>>> I see in another post that this problem was fixed but i use the last
>>> release of jaxb and i still have the same problem. could you help me?
>>>
>>
>>
>
>

-- 
View this message in context: http://old.nabble.com/There%27s-no-ObjectFactory-with-an-%40XmlElementDecl-for-the-element-tp12798615p29033591.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.