You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "benson margulies (JIRA)" <ji...@apache.org> on 2007/09/19 14:38:43 UTC

[jira] Commented: (CXF-1037) ClassCastException writing a Map in a reply message with Aegis

    [ https://issues.apache.org/jira/browse/CXF-1037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528746 ] 

benson margulies commented on CXF-1037:
---------------------------------------

The xml type mapper and the type class info were conspiring to treat Map<x,y> as Map<x,x> and produce this problem. I've fixed this much, but now I'm seeing an empty map returned. I continue to poke.

> ClassCastException writing a Map<Long, someclass> in a reply message with Aegis
> -------------------------------------------------------------------------------
>
>                 Key: CXF-1037
>                 URL: https://issues.apache.org/jira/browse/CXF-1037
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.0.2
>         Environment: Initial observation with JDK 1.6
>            Reporter: benson margulies
>         Attachments: maptest.txt
>
>
> Calling a doc/literal service with a return value of Map<Long, Student> results in the following rather horrific explosion.
> Sep 18, 2007 10:13:59 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> java.lang.ClassCastException: org.apache.cxf.aegis.type.java5.map.Student cannot be cast to java.lang.Number
> 	at org.apache.cxf.aegis.type.basic.LongType.writeObject(LongType.java:40)
> 	at org.apache.cxf.aegis.type.collection.MapType.writeEntry(MapType.java:171)
> 	at org.apache.cxf.aegis.type.collection.MapType.writeObject(MapType.java:151)
> 	at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:100)
> 	at org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:1)
> 	at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:93)
> 	at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.transport.MultipleEndpointObserver.onMessage(MultipleEndpointObserver.java:82)
> 	at org.apache.cxf.transport.local.LocalConduit$1.run(LocalConduit.java:131)
> 	at java.lang.Thread.run(Unknown Source)
> Sep 18, 2007 10:13:59 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> 	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:187)
> 	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:1)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:395)
> 	at org.apache.cxf.transport.local.LocalDestination$SynchronousConduit$1.run(LocalDestination.java:88)
> 	at java.lang.Thread.run(Unknown Source)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
> 	at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
> 	at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
> 	at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
> 	at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
> 	at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
> 	at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
> 	... 5 more

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