cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayteeem <michael.chri...@axa.com.au>
Subject org.apache.cxf.interceptor.Fault: Marshalling Error: java.util.Map is not known
Date Tue, 31 Jul 2007 04:32:37 GMT

Hi all,

I'm getting a marshalling error for when using java.util.Map. 
It is works fine for java.util.Collection and I didn't even have to add a
JAXB annotation to return the type for Collection.

I am using Spring2.0.4 libs as per your examples.
I am using cxf Version cxf-2.0.1-incubator-SNAPSHOT.jar.

I get the stacktrace below when calling the line:
Map people = client.getPeople(); // in TestPersonService.java

I have uploaded a zip of my source and Spring beans
It is running under Weblogic app server 9.2

Any help is much appreciated.
thanks
Michael

31/07/2007 13:37:59 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Marshalling Error: java.util.Map is not
known
to this context
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
va:170)
        at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:40)
        at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
ts(AbstractOutDatabindingInterceptor.java:83)
        at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
terceptor.java:67)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Ou
goingChainInterceptor.java:73)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInit
ationObserver.java:73)
        at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(Servle
Destination.java:78)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination
ServletController.java:224)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCon
roller.java:137)
        at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:2
1)
        at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:2
9)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.ru
(StubSecurityHelper.java:223)
        at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecur
tyHelper.java:125)
        at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
a:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
        at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilt
r.java:251)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
n.run(WebAppServletContext.java:3243)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticat
dSubject.java:321)
        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java
121)
        at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebApp
ervletContext.java:2003)
        at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServlet
ontext.java:1909)
        at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.
ava:1359)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: java.util.Map is not known to this context]
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
295)
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.ja
a:221)
        at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarsha
lerImpl.java:70)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecode
.java:181)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
va:155)
        at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:40)
        at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
ts(AbstractOutDatabindingInterceptor.java:83)
        at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
terceptor.java:67)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Ou
goingChainInterceptor.java:73)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInit
ationObserver.java:73)
        at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(Servle
Destination.java:78)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination
ServletController.java:224)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCon
roller.java:137)
        at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:2
1)
        at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:2
9)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.ru
(StubSecurityHelper.java:223)
        at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecur
tyHelper.java:125)
        at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
a:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
        at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilt
r.java:251)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
        at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationActi
n.run(WebAppServletContext.java:3243)
        at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticat
dSubject.java:321)
        at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java
121)
        at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebApp
ervletContext.java:2003)
        at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServlet
ontext.java:1909)
        at
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.
ava:1359)
Caused by: javax.xml.bind.JAXBException: java.util.Map is not known to this
con
ext
        at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.
ava:223)
        at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.
ava:238)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
ntBeanInfoImpl.java:85)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
ntBeanInfoImpl.java:127)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Elemen
BeanInfoImpl.java:244)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
BeanInfoImpl.java:251)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
BeanInfoImpl.java:33)
        at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.
ava:461)
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
292)
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.ja
a:221)
        at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarsha
lerImpl.java:70)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecode
.java:181)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
va:155)
        at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:40)
        at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
ts(AbstractOutDatabindingInterceptor.java:83)
        at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
terceptor.java:67)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Ou
goingChainInterceptor.java:73)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInit
ationObserver.java:73)
        at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(Servle
Destination.java:78)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination
ServletController.java:224)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCon
roller.java:137)
        at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:2
1)
        at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:2
9)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.ru
(StubSecurityHelper.java:223)
        at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecur
tyHelper.java:125)
        at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
a:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
Caused by: javax.xml.bind.JAXBException: java.util.Map is not known to this
con
ext
        at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextI
pl.java:538)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
ntBeanInfoImpl.java:82)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(Elem
ntBeanInfoImpl.java:127)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(Elemen
BeanInfoImpl.java:244)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
BeanInfoImpl.java:251)
        at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(Elemen
BeanInfoImpl.java:33)
        at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.
ava:461)
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java
292)
        at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.ja
a:221)
        at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarsha
lerImpl.java:70)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecode
.java:181)
        at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.j
va:155)
        at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:40)
        at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writePa
ts(AbstractOutDatabindingInterceptor.java:83)
        at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutI
terceptor.java:67)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Ou
goingChainInterceptor.java:73)
        at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
orChain.java:207)
        at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInit
ationObserver.java:73)
        at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(Servle
Destination.java:78)
        at
org.apache.cxf.transport.servlet.ServletController.invokeDestination
ServletController.java:224)
        at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletCon
roller.java:137)
        at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:2
1)
        at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:2
9)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.ru
(StubSecurityHelper.java:223)
        at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecur
tyHelper.java:125)
        at
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.ja
a:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.j
va:42)
        at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilt
r.java:251)
31/07/2007 13:37:59
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCal
back onClose
INFO: Outbound Message
--------------------------------------
http://www.nabble.com/file/p11918081/src.zip src.zip 
-- 
View this message in context: http://www.nabble.com/org.apache.cxf.interceptor.Fault%3A-Marshalling-Error%3A-java.util.Map-is-not-known-tf4190902.html#a11918081
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message