SuperDev mode and changing RPC strong names causes problems
Our setup is as follows: - Server code runs in a tomcat instance. Our ant build process compiles and sets up the server war. As part of the build, GWT is also built. - We compile the client side code in dev-mode or super-dev mode. Symptom: - As soon as we make changes to the client code, we get intermittent RPC serialization errors. What we see is that the RPC comes with a strong-name that is not available in the server side (i.e., .gwt.rpc file isn't there). When this happens, GWT uses LegacySerializationPolicy which only accepts IsSerializable. All our code now extends this but we also have third-party code that only implements java.io.Serializable. Work-around; In dev-mode, we've set the output to compile into Tomcat's web app directory so that new RPC manifests are found. But super-dev mode creates new directories and cannot be made to output to a deterministic folder. I can't believe we are the first to encounter this? What are our options? Not use super-dev? Override the RemoteServiceServlet's method that retrieves the RPC file and look through super-dev's output folders? I'm hoping we are overlooking something else. Thanks KA -- 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+unsubscr...@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: GWT RPC Serialization - circular references not allowed?
This is using GWT 2.1.1 with JDK 1.6 On Feb 17, 1:14 pm, Karthik Abram wrote: > I'm serializing to the client from Java using the standard GWT RPC > mechanism (using Async Service, not the factory introduced in 2.1). > I'm seeing an issue with deserialization at the client when my > serialized object has circular references. This is what I see: > > Serializing a "Result" object that has a "Fund" object reference. This > fund has a reference to a "Distributor" object that contains a list of > Funds, one of which is the same as the Fund that result references. So > it is a two-hop circular reference. > > The Fund object's hashCode method is overridden to use the fund-id's > hashcode (fund-id is a string). The error I get is that the hashcode > threw a NullPointerException. > > Here is the stacktrace: > at com.foo.dm.fund.Fund.hashCode(Fund.java:709) > at java.util.HashMap.put(HashMap.java:372) > at java.util.HashSet.add(HashSet.java:200) > at > com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.deserialize(Collection_CustomFieldSerializerBase.java:35) > at > com.google.gwt.user.client.rpc.core.java.util.HashSet_CustomFieldSerializer.deserialize(HashSet_CustomFieldSerializer.java:32) > at > com.google.gwt.user.client.rpc.core.java.util.HashSet_FieldSerializer$Handler.deserialize(HashSet_FieldSerializer.java:11) > at > com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:91) > at > com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:108) > at > com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119) > at > com.foo.dm.user.Distributor_FieldSerializer.deserialize(Distributor_FieldSerializer.java:42) > > Are circular references not allowed? I can't believe this is the first > time I'm running across this in 2 years! -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Google Web Toolkit 2.0 RC2 Now Available
I have a class Foo in com.mycompany.myapp.client that is annotated with @Bar where bar is defined in com.mycompany.myapp.client.gwt.rpc. The GWT compiler complains that it cannot find Bar. Is this a compiler bug? The compiler is able to see other classes in com.mycompany.myapp.client.gwt.rpc. My module lives under com.mycompany.myapp. -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.