Serialization policy file found in production mode, but not in hosted mode

304 views
Skip to first unread message

Eric

unread,
Jul 20, 2010, 12:08:17 PM7/20/10
to Google Web Toolkit
Hi All,

I am get the following error in hosted mode only (production mode
works fine):
2010-07-20 08:59:22,114 INFO [org.apache.catalina.core.ContainerBase.
[jboss.web].[localhost].[/]](http-0.0.0.0-8001-2) spring-mvc: ERROR:
The serialization policy file '[module url]/
1FCC98CB4966784C26CF80A5A6A52E81.gwt.rpc' was not found; did you
forget to include it in this deployment?
2010-07-20 08:59:23,520 ERROR [org.apache.catalina.core.ContainerBase.
[jboss.web].[localhost].[/]](http-0.0.0.0-8001-2) spring-mvc: WARNING:
Failed to get the SerializationPolicy
'1FCC98CB4966784C26CF80A5A6A52E81' for module [module name]. You may
experience SerializationExceptions as a result.

When I debug the
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead
method on the server:
strongName is 1FCC98CB4966784C26CF80A5A6A52E81 in hosted mode
and
strongName is C8410282FFAF2310BDB57F00F8142C6A in production mode

The strongName in production mode aligns with the gwt.rpc file I see
on the web server.

I'm still trying to find what's going on, but maybe someone else has
experienced this and can point me to a solution/work-around?

Thanks,

Eric

Eric

unread,
Jul 20, 2010, 12:57:11 PM7/20/10
to Google Web Toolkit
Maybe getting closer? I found this
ProxyCreator.writeSerializationPolicyFile() method is responsible for
determining the serialization policy file name. And it is being
called in hosted mode. Is it possible this would generate different
file names in hosted vs. production modes?

com.google.gwt.user.rebind.rpc.ProxyCreator.writeSerializationPolicyFile() ...

byte[] serializationPolicyFileContents = baos.toByteArray();
String serializationPolicyName =
Util.computeStrongName(serializationPolicyFileContents);

On Jul 20, 9:08 am, Eric <ebatz...@gmail.com> wrote:
> Hi All,
>
> I am get the following error in hosted mode only (production mode
> works fine):
> 2010-07-20 08:59:22,114 INFO  [org.apache.catalina.core.ContainerBase.
> [jboss.web].[localhost].[/]](http-0.0.0.0-8001-2) spring-mvc: ERROR:
> The serialization policy file '[module url]/
> 1FCC98CB4966784C26CF80A5A6A52E81.gwt.rpc' was not found; did you
> forget to include it in this deployment?
> 2010-07-20 08:59:23,520 ERROR [org.apache.catalina.core.ContainerBase.
> [jboss.web].[localhost].[/]](http-0.0.0.0-8001-2) spring-mvc: WARNING:
> Failed to get the SerializationPolicy
> '1FCC98CB4966784C26CF80A5A6A52E81' for module [module name].  You may
> experience SerializationExceptions as a result.
>
> When I debug the
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepare­ToRead

Eric

unread,
Jul 20, 2010, 1:27:23 PM7/20/10
to Google Web Toolkit
After much debugging, I saw that the serialization policy file name is
based on the full set of serializable types. My gwt-compile ant task
has a certain classpath which includes only production source.
However, in Eclipse, my classpath includes test source, also. This
meant that, running a Gwt Code server in Eclipse, GWT could find a
different set of serialization classes. That's exactly what
happened. When I changed my GWT Code Server's classpath to only
include the production source, my issue was resolved and the
serialization policy file name generated in hosted mode was the same
as in production mode.

Not sure if that's all working as designed, but this was a pain to
track down... :-).

-Eric
> > Eric- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages