Friday, June 13, 2014

Re: Dev mode throws MissingResourceException on SerializationStreamFactory.createStreamReader()

That looks like a bug in DevMode's CompilingClassLoader.

I wonder if someone ever worked around that problem before.

RPC serialization is not symetric (what the client writes can be read by the server, but not the client; what the server writes can be read by the client, but not the server), so this won't work.
Here, "you" try to interpret as JS (because RPC uses eval()) what definitely is NOT JS, so you're having a syntax error (looking at the stack trace, it's an "invalid label", meaning that it chokes on a ":" char in the payload).

I oversimplified that sample code.  What I'm doing exactly is client->server (de)serialization and vice versa.


Em quarta-feira, 11 de junho de 2014 20h48min09s UTC-3, Thomas Broyer escreveu:


On Wednesday, June 11, 2014 11:01:02 PM UTC+2, Célio Cidral wrote:
This is what happens when SerializationStreamFactory.createStreamReader() is called in dev mode:

java.util.MissingResourceException: Can't find bundle for base name com.google.gwt.dev.js.rhino.Messages, locale en_US

A quick google search shows that a few other people had this issue before, but none of them got an answer.  Does anyone have an idea of how to work around this?

That looks like a bug in DevMode's CompilingClassLoader. BUT:
 
I'm using GWT 2.6.1 from the central Maven repository.  Here's some code to help reproduce the error:

  SerializationStreamFactory ssf = GWT.create(SignalProcessingService.class);
  SerializationStreamWriter writer = ssf.createStreamWriter();
  writer.writeObject(new Foo("bar"));
  String serializedObject = writer.toString();

  SerializationStreamReader reader = ssf.createStreamReader(serializedObject); //exception is thrown here

RPC serialization is not symetric (what the client writes can be read by the server, but not the client; what the server writes can be read by the client, but not the server), so this won't work.
Here, "you" try to interpret as JS (because RPC uses eval()) what definitely is NOT JS, so you're having a syntax error (looking at the stack trace, it's an "invalid label", meaning that it chokes on a ":" char in the payload).

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment