You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "kakashi (JIRA)" <ji...@apache.org> on 2011/03/13 12:18:59 UTC

[jira] Created: (CXF-3395) cxf transfer hashmap can't be chinese word

cxf transfer hashmap can't be chinese word
------------------------------------------

                 Key: CXF-3395
                 URL: https://issues.apache.org/jira/browse/CXF-3395
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.3.3
         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
            Reporter: kakashi
            Priority: Critical


hi cxf team:
   i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
   i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
    HelloWorldImpl.java
    public Map<Integer, User> getUsers() {
    	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
    	//汉字bug 中文 bug
    	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
    	usersForMap.put(2,  new UserImpl("wybl"));
        System.out.println("getUsers called");
        return usersForMap;
    }
   
   it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
org.apache.cxf.interceptor.Fault: Marshalling Error: null
	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
	at $Proxy61.getMapByCXFDocument(Unknown Source)
	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.UndeclaredThrowableException
	at $Proxy74.unmarshal(Unknown Source)
	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
	... 49 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:592)
	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
	... 51 more
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
	... 56 more
Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
	... 59 more

i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006392#comment-13006392 ] 

Benson Margulies commented on CXF-3395:
---------------------------------------

I think I see the disconnect.

kakashi, are you compiling your Java code with a charset of UTF-8?

The escapes Glen is talking about are source code escapes, like "\u4e00". I thought he meant XML escapes.

The fact that file.encoding had an effect means, probably, that the sample code that you are using has a use of the default string/byte conversion. I would consider that a bug in a small way, I'll go have a look.


> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006319#comment-13006319 ] 

Willem Jiang commented on CXF-3395:
-----------------------------------

What's your System System.Lang setting is ?
I just test the sample with some Chinese character in Mac OSX, everything looks find.

Here are the settings
{code}
JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/home
JAVA_VERSION=1.6.0
LANG=en_US.UTF-8
{code}

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006393#comment-13006393 ] 

Benson Margulies commented on CXF-3395:
---------------------------------------

Since we have a jira at this point, please make a tar of your modified version of the sample and attach it. I'd like to see precisely what you did.


> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "kakashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006364#comment-13006364 ] 

kakashi commented on CXF-3395:
------------------------------

thank you very much.
i found the error.when i add -Dfile.encoding=UTF-8 to jvm,the error disappear.but when i transfer arraylist,the code still run ok without -Dfile.encoding=UTF-8.when i transfer hashmap the code tell error without -Dfile.encoding=UTF-8? the default file.encoding in my machine is GBK.
the case should be add to document.
i think cfx should run in this case(just like transfer arraylist),it can tell garbled message,but not tell me some exception.
thanks again

kakashi

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006508#comment-13006508 ] 

Daniel Kulp commented on CXF-3395:
----------------------------------


I think the issue may be with the maven pom.xml or the common_build.xml for the samples.  We don't set the encoding for the samples and thus they always use the platform encoding which is probably not what we want.   I just commited a change that sets the encoding to utf-8 when compiling the samples and that alone may fix it as I think the compiler may error when it encounters non-utf8 characters.   

Can you try adding:  
{code}
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
{code}
to the maven pom if using maven and rebuilding (mvn clean install) to see if that helps?

If using ant, change the common_build.xml to update the javac call to include  encoding="utf-8".







> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006210#comment-13006210 ] 

Benson Margulies commented on CXF-3395:
---------------------------------------

Glen, *no he does not need to escape anything*. StaX will escape as needed, unless something very funny is going on.


> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006194#comment-13006194 ] 

Glen Mazza commented on CXF-3395:
---------------------------------

I'm not sure this is a CXF bug.  Escaping the characters should fix your problem (http://www.pinyin.info/tools/converter/chars2uninumbers.html) but I don't know enough if this is otherwise a CXF or a Java configuration issue.  You might also be able to get help on the Chinese CXF users list (http://groups.google.com/group/cxf-zh).  Some CJK developers actually try to avoid multibyte characters in their code for other reasons: http://java.net/jira/browse/JAXB-783.

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006209#comment-13006209 ] 

Benson Margulies commented on CXF-3395:
---------------------------------------

I send arbitrary text (including Chinese) though CXF+JAXB all the time. You'll have to give us repeatable test case to diagnose your particular issue.

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3395.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.4


I'm going to close this as it seems to be a compiler encoding issue with compiling the code, not really CXF.   I did update the examples to make sure they all are compiled as UTF-8 instead of platform encoding.

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>             Fix For: 2.3.4
>
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006322#comment-13006322 ] 

Willem Jiang commented on CXF-3395:
-----------------------------------

kakashi,

Please use cxf user mailing list users@cxf.apache.org to start a discussion before filling a JIRA.
We don't want to bring the CXF JIRA into a support question lists, as most our JIRAs should be linked back to a code commit.
Please use the mailing list first and fill a JIRA if we feel it necessary.  

Willem


> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006383#comment-13006383 ] 

Glen Mazza commented on CXF-3395:
---------------------------------

Benson:  Glen, no he does not need to escape anything. StaX will escape as needed, unless something very funny is going on.

As I understood the developer's question per his example, he wanted to directly insert Chinese characters within his Java code, and CXF wasn't working under those circumstances.  The handful of times I had seen Asian character sets within Java code (or within messages properties files), the characters were escaped as I had shown, and I suggested that that might be a solution for him.

To me, StAX/DOM/SAX is only an issue once we are sure the Java runtime has happily accepted the hardcoded Chinese characters in the string constant--it did not appear to me that the user was at that level at the time of posting his question.

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "kakashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006315#comment-13006315 ] 

kakashi commented on CXF-3395:
------------------------------

hi Benson,i only use the official promulgate package cxf 2.3.3,the path is apache-cxf-2.3.3\samples\java_first_jaxws,i only add some Chinese word to the server implement to transfer hashmap,then it tell me error.when i use english word ,the error disappear.i transfer arraylist or other object,it runs ok.
how can i provide my total code?

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CXF-3395) cxf transfer hashmap can't be chinese word

Posted by "kakashi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13006852#comment-13006852 ] 

kakashi commented on CXF-3395:
------------------------------

i found another issue about wsdl2java(also about transfer hashmap with cxf),but i don't know the issue belong to witch component in create issue.

> cxf transfer hashmap can't be chinese word
> ------------------------------------------
>
>                 Key: CXF-3395
>                 URL: https://issues.apache.org/jira/browse/CXF-3395
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.3
>         Environment: spring 3.0+dwr3.0+jdk5+tomcat6
>            Reporter: kakashi
>            Priority: Critical
>
> hi cxf team:
>    i use cxf2.3.3 in my project,and i tansfer the hashmap through cxf client to server(i use the example of apache-cxf-2.3.2,the java_first_jaxws project in official promulgate package) .firstly it run normally,but when i put some chinese word(not englist word) to hashmap
>    i modify the HelloWorldImpl.java(the official example project file,java_first_jaxws is the project name) function just like this:
>     HelloWorldImpl.java
>     public Map<Integer, User> getUsers() {
>     	Map<Integer, User> usersForMap = new LinkedHashMap<Integer, User>();
>     	//汉字bug 中文 bug
>     	usersForMap.put(1,  new UserImpl("yhb汉字bug"));  //-->when total english word,it run ok,when some chinese word here the cxf tell error to me. 
>     	usersForMap.put(2,  new UserImpl("wybl"));
>         System.out.println("getUsers called");
>         return usersForMap;
>     }
>    
>    it' seem the marshal and unmarshal crash and tell fllow error(englisth word in hashmap seem runs ok):
> org.apache.cxf.interceptor.Fault: Marshalling Error: null
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:327)
> 	at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:124)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInterceptor.java:251)
> 	at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:127)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:755)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2193)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2037)
> 	at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
> 	at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:697)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy61.getMapByCXFDocument(Unknown Source)
> 	at com.webservice.cxf.CxfSoapAction.runWebService(CxfSoapAction.java:77)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:740)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:744)
> 	at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:593)
> 	at org.directwebremoting.dwrp.BaseCallHandler.handle(BaseCallHandler.java:90)
> 	at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:120)
> 	at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:141)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> 	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.reflect.UndeclaredThrowableException
> 	at $Proxy74.unmarshal(Unknown Source)
> 	at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshalWithBridge(JAXBEncoderDecoder.java:312)
> 	... 49 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:592)
> 	at org.apache.cxf.common.util.ReflectionInvokationHandler.invoke(ReflectionInvokationHandler.java:52)
> 	... 51 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.]
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:426)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:362)
> 	at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:120)
> 	at com.sun.xml.bind.v2.runtime.BridgeAdapter.unmarshal(BridgeAdapter.java:124)
> 	at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:233)
> 	... 56 more
> Caused by: javax.xml.stream.XMLStreamException: Invalid byte 1 of 1-byte UTF-8 sequence.
> 	at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:560)
> 	at org.apache.cxf.staxutils.DepthXMLStreamReader.next(DepthXMLStreamReader.java:220)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:192)
> 	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:360)
> 	... 59 more
> i think this is a terrible bug in transfer hashmap,and i don't know how to resolve this.can you fix the bug or tell me some solution,my email:wqbz@foxmail.com
> thank you very much

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira