Wednesday, September 15, 2010

Why does GWT seem to ignore my overridden doGetSerializationPolicy()?

Gilead 1.3.2's PersistentRemoteService, which extends GWT's
RemoteServiceServlet, has a protected doGetSerializationPolicy() that
calls super.doGetSerializationPolicy().

My own CustomPersistentRemoteService, which extends
PersistentRemoteService, is being created so I can deal with conflicts
between GWT RPC and Apache mod_rewrite by tweaking the moduleBaseURL
parameter [1]. This custom class also has a protected
doGetSerializationPolicy() that calls super.doGetSerializationPolicy()
after it just echoes out for now the parameters it is passed (I'm
logging them at the WARN level so I can see them).

So if I update a service implementation to extend
CustomPersistentRemoteService instead of PersistentRemoteService,
shouldn't I see the logging statements I inserted echoed to my
configured Log4j appender (in this case, the console)?

What is it about the following stack trace that just seems to skip
over both PersistentRemoteService and CustomPersistentRemoteService?

Caused by: java.lang.NullPointerException
at
javax.servlet.GenericServlet.getServletName(GenericServlet.java:322)
at javax.servlet.GenericServlet.log(GenericServlet.java:277)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.loadSerializationPolicy(RemoteServiceServlet.java:
74)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doGetSerializationPolicy(RemoteServiceServlet.java:
251)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.getSerializationPolicy(RemoteServiceServlet.java:
139)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.prepareToRead(ServerSerializationStreamReader.java:
445)
at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:236)
at
org.gwtwidgets.server.spring.GWTRPCServiceExporter.processCall(GWTRPCServiceExporter.java:
292)
... 26 more

I appreciate any and all insights.

Thanks,
Mike

[1] http://code.google.com/p/google-web-toolkit/issues/detail?id=5274

--
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 google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment