I am getting a NumberFormatException on a GWT RPC call whenever a string parameter I pass includes a pipe symbol ("|").
I am attempting to pass a String value derived from a JSONObject.onString() call. A string like {"foo":"1|2"} will fail, but {"foo":"1"} will work. This happens in hosted or web mode. (The Tomcat log is at the bottom of this message.) My solution has been to URL.encode() the string on the client side, and URLDecoder.decode() on the server side. But why should I have to? Why are the internals of this string fouling up? I'm running Java 1.5, and GWT 1.5 OOPHM on Linux with a Firefox 3.0.3 browser (but I also see the error in IE7 from Windows). Nov 21, 2008 1:47:43 PM org.apache.catalina.core.ApplicationContext log SEVERE: Exception while dispatching incoming RPC call java.lang.NumberFormatException: For input string: "2"}" at java.lang.NumberFormatException.forInputString (NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:456) at java.lang.Integer.parseInt(Integer.java:497) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readInt (ServerSerializationStreamReader.java:423) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readString (ServerSerializationStreamReader.java:437) at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead (ServerSerializationStreamReader.java:388) at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:234) at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall (RemoteServiceServlet.java:163) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost (RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) 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:175) 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:263) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 447) at java.lang.Thread.run(Thread.java:595) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---