I think I've found two issues in the new deRPC code, but I would like
some confirmation before spamming the issuetracker. I'm using the GWT
2.0 release codebase, on various platforms.
The first issue is in RpcServlet. By default the code can't find the
*.gwt.rpc files (in production mode) if the webapp is not deployed at
the root of the server. When determining the path to the ModuleBase,
in getRequestModuleBasePath(), the code simply gets a client-side
header and strips the host and port part (isn't this a security issue
anyway?). Problem is, webapps/servlets don't have to be deployed to
the root of the server. When deployed at an other path, for instance /
webapps/myWebapp/, the client will send this in de ModuleBase header,
but it shouldn't be included in the getServletContext
().getResourceAsStream(resourcePath) call as the resourcePath. I
'fixed' this by overriding findClientOracleDate(), but that shouldn't
be necessary...
The next issue took me somewhat longer to debug. When using a custom
object, containing a bool, and sending that to the client and then
back to the server, deserialization at the serverside fails with a
ClassCastException (can't cast from Double to Boolean) (only in
production mode). This is because the bool gets send over as a double
(I see D1 in the request, instead of Z1). I'm not quite sure where the
problem is, probably somewhere in
CommandClientSerializationStreamWriter. I fixed it by using a Boolean
instead of a bool in my object.
Has anyone seen these bugs before, or is anyone able to reproduce
them?
Regards,
--Mike
yes I can confirm that.
1. overiding findClientOracleData was needed in my system as well
2. class-cast Exception, when sending (can't cast from Double to
Boolean) when sending objects back to the server. I had no time so far
to investigate if it was a bool, but its probably the case, because we
use a lot of bools in our objects.
Regards,
Mark
--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Testcase for the second issue is at
http://souterrain.flatnet.tudelft.nl/~mike/derpctest.tar.gz
It simply sends an 'TestObject' that contains a boolean from server to
client, and then back to server. This causes a 500 in production mode
(GWT compile is already included, just run the server and visit the page
without the dev plugin). Probably fixed by changing the boolean to a
Boolean.
For the first issue you should deploy a .war onto a server outside of
the RootContext, then all calls fail. But I think that's already covered
in issue 4444.
--
Mike Noordermeer
mi...@normi.net