Closed GoogleCodeExporter closed 8 years ago
Original comment by ano...@google.com
on 6 Mar 2011 at 9:32
The bug is in protostuff.
The generated JSON stringify methods do not properly escape string components.
In ProtocolDocumentOperation.Component.stringify:
...
if(_2 != null)
buf.push("\"2\":\"" + _2 + "\"");
...
Here, field _2 is a characters component, and its string is copied verbatim
into the JSON string. JSON control characters ({},"') are not escaped.
If someone wants to take this on, then that's great, but I'd rather spend
resources on switching to PST instead of protostuff. Most of switching to PST
is not about code, but about the ant-build-fu, especially figuring out WIAB's
classpaths. (I spent a few hours a few weeks ago trying to hook it up, but was
not fully successful).
Original comment by hearn...@google.com
on 7 Mar 2011 at 4:08
[deleted comment]
[deleted comment]
When the serialization issue will be fixed, the code with work around to
manually escape double quotes in WaveletOperationSerializer should be removed.
Original comment by vega113
on 16 Mar 2011 at 11:03
someone who knows the details, should file a new bug to fix the
temporary solution with a proper one? what is the solution, is it to
change from protostuff to pst, or something else?
���� 16 ������� 2011 4:04 �.�., � �������
<wave-protocol@googlecode.com> ������:
Original comment by danila...@google.com
on 16 Mar 2011 at 6:38
I'm working on hooking up PST, which should address this bug properly.
I've updated the WIAB code, that was not so hard, but trying to unwrangle how
WIAB's build.xml files work is taking me quite some time. Part of the problem
is that the core structure of it traces back to the fedone build.xml.
I'm planning to be finished today though.
Original comment by hearn...@google.com
on 16 Mar 2011 at 9:52
OK, awesome, nice work.
���� 16 ������� 2011 2:53 �.�., � �������
<wave-protocol@googlecode.com> ������:
Original comment by danila...@google.com
on 16 Mar 2011 at 9:59
@danilatos
I experience similar exceptions in the Google Wave server. I am just curious -
are they caused by similar issue or there's no connection?
Here is the exception:
wave/robot/jsonrpc
com.google.gson.JsonParseException: Failed parsing JSON source:
java.io.StringReader@140243b to Json
at com.google.gson.JsonParser.parse(JsonParser.java:57)
at com.google.gson.Gson.fromJson(Gson.java:443)
at com.google.gson.Gson.fromJson(Gson.java:396)
at com.google.gson.Gson.fromJson(Gson.java:372)
at com.google.wave.api.WaveService.makeRpc(WaveService.java:726)
at com.google.wave.api.WaveService.submit(WaveService.java:422)
at com.google.wave.api.AbstractRobot.submit(AbstractRobot.java:162)
at com.vegalabz.robot.TestRobot.onWaveletSelfAdded(TestRobot.java:49)
at com.google.wave.api.AbstractRobot.processEvents(AbstractRobot.java:640)
at com.google.wave.api.AbstractRobot.processRpc(AbstractRobot.java:589)
at com.google.wave.api.AbstractRobot.doPost(AbstractRobot.java:317)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:216)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:141)
at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:63)
at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:122)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:110)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:97)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:238)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:135)
at com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:261)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime$2.handleRequest(RuntimePb.java:8440)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:454)
at com.google.net.rpc.impl.Server$RpcTask.runInContext(Server.java:572)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:448)
at com.google.tracing.TraceContext.runInContext(TraceContext.java:688)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:326)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:318)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:446)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: com.google.gson.TokenMgrError: Lexical error at line 1, column 1.
Encountered: "<" (60), after : ""
at com.google.gson.JsonParserJavaccTokenManager.getNextToken(JsonParserJavaccTokenManager.java:1168)
at com.google.gson.JsonParserJavacc.jj_ntk(JsonParserJavacc.java:635)
at com.google.gson.JsonParserJavacc.parse(JsonParserJavacc.java:10)
at com.google.gson.JsonParser.parse(JsonParser.java:54)
... 50 more
Original comment by vega113
on 19 Mar 2011 at 10:44
The quoting issue is now fixed. Some unicode characters work fine too, both in
wave content and in snippets, but Cyrillic characters only appear to be work in
wave content - the snippet shows them as '?'. I believe that issue is being
tracked in a separate bug?
I'm not sure what the Google Wave status is for the Robot API. I wouldn't be
surprised if it had the same quoting issue that protostuff had, but it
shouldn't stop this issue from being closed.
Original comment by hearn...@google.com
on 31 Mar 2011 at 12:41
Any progress on the issue posted by vega113 above. I'm experiencing the same
problem when calling fetchwavelet.
Original comment by hiriza...@gmail.com
on 4 Apr 2011 at 4:16
Original issue reported on code.google.com by
vega113
on 4 Mar 2011 at 2:53