Closed GoogleCodeExporter closed 8 years ago
Hi,
I can not reproduce that exception. I have upgraded the DemoConversationApp to
GWT
2.0 (trunk and branch 1.0.3) and that works fine. Do you use the "old" Hosted
Mode
Browser or the new Development Mode? Can you build a samll sample
prject/application
to reproduce the error?
Thanks in advance.
Original comment by sven.strohschein@googlemail.com
on 27 Jan 2010 at 9:46
Hi,
I am having the same issue with GWT 2.0 and gwteventservice 1.0.2. It works fine
locally but fails when the app is put up on the Tomcat server. Has this been
resolved?
Original comment by mickgra...@gmail.com
on 20 Apr 2010 at 12:45
Hi,
I think, when the issue exists, it does still exist in the latest version
(1.1.1),
because I couldn't reproduce the issue. I got no answer to my last request for
this
ticket and I thought that was something like a configuration mistake, because
there
came no more issue reports like this.
We could need some more information to take a look at it again. Is the issue
reproduceable with your configuration? Which version of Tomcat do you use? Do
you
tried to run the DemoConversationApp or your custom application?
Thanks in advance.
Regards,
Sven S.
Original comment by sven.strohschein@googlemail.com
on 20 Apr 2010 at 7:58
Hi,
I got the same exception 2 months ago, when upgrading my app to GWT 2.0. The
issue is
the use of java.io.Serializable in all your package. In GWT 2.0, it seems that
we
have to go back and use com.google.gwt.user.client.rpc.IsSerializable instead of
java.io.Serializable. That's what I did for gwteventservice project, and it
works.
Anyway, I found a guy who fix the same king of issue but in a different way :
"The way I fixed it is a little bit different:
I deleted all files generated by old compiler, and then, the problem
disappeared. I guess, the problem is because the new compiler is
different from the new compiler."
Regards,
Thomas
Original comment by tleh...@gmail.com
on 20 Apr 2010 at 8:59
[deleted comment]
Hi,
GWT 2.0 should actually support java.io.Serializable (since GWT 1.5) and the
most
users seem not to have problems with that. I had explicit tried to reproduce
that
issue earlier with GWTEventService 1.0.2 and had no "success". There are some
other threads where users are reporting about problems like that after
upgrading to
GWT 2.0. It seems that these problems occur when the project isn't completely
re-compiled with the GWT 2.0 compiler. I will spend some time to build a
migration
scenario from GWT 1.7 to GWT 2.0, maybe I can find a way to reproduce that
issue, but
that could get difficult... Could someone please try to setup the
DemoConversationApp
or HelloGWTEventService in an environment where the issue is reproducable? That
would
help a lot. I think that issue doesn't occur in a fresh environment.
Other threads regarding that problem:
http://groups.google.kg/group/google-web-toolkit/browse_thread/thread/c940f8d3d6
742796
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/0703645e3
d3fe773/f0c221523dab8f7f?lnk=raot&pli=1
Thanks in advance.
Regards,
Sven S.
Original comment by sven.strohschein@googlemail.com
on 20 Apr 2010 at 9:46
I tried to reproduce the issue, and unfortunately (or fortunately ;)), the
migration
from GWT1.7 to GWT 2.0 works fine, without any serialization exception.
Original comment by tleh...@gmail.com
on 21 Apr 2010 at 6:07
Hi,
Thanks for the input. We have been able to resolve this issue (fyi - gwt
development
mode works fine without these fixes). Turns out we were having 2 issues:
The first one was with the build server. We are running Jakarta (for another
app) and
Tomcat 5 and were having issues with routing. We fixed this by specifying port
8080.
This is the error we were getting;
"SEVERE: locomotiveService: ERROR: The module path requested,
/tomcat/cmpc/cmpc/, is
not in the same web application as this servlet, /cmpc. Your module may not be
properly configured or your client and server code maybe out of date."
The second one was with the event services use of Java's 'Serializable' rather
than
GWT's IsSerializable. We replaced this and recompiled the jar file. This is the
error
we were getting;
"Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
'de.novanic.eventservice.client.event.domain.DefaultDomain' was not assignable
to
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom field
serializer. For security purposes, this type will not be deserialized."
Original comment by mickgra...@gmail.com
on 22 Apr 2010 at 12:22
Hi,
@tlehoux: Thanks for your test to "reproduce" the issue! :-) I think it is a
re-compilation problem which isn't caused by GWTEventService. Do you have tried
it
with a fresh download of GWTEventService 1.0.2 or have you built it yourself
via Ant?
@mickgraham: Do you know how / what resolved the issue for your project? Are
the two
reported problems still open or were you already able to fix it?
Regards,
Sven S.
Original comment by sven.strohschein@googlemail.com
on 24 Apr 2010 at 1:02
Sorry if i wasn't clear, the two issues were fixed, you can close it.
There was a ports issue on our server that we fixed by specifying a port for the
server. We also had to replace the use of java's 'Serializable' with GWT's
'IsSerializable' in the GWTEventService 1.0.2 .jar file.
Original comment by mickgra...@gmail.com
on 27 Apr 2010 at 12:03
Marked as invalid, because it was a general GWT update / migration issue and
not an issue of GWTEventService.
Original comment by sven.strohschein@googlemail.com
on 22 Jun 2010 at 4:49
I have studied the error, only occur on using GWT Eclipse development mode, the
validation code in LegacySerializationPolicy like below:
@Override
public void validateSerialize(Class<?> clazz) throws SerializationException {
if (!isInstantiable(clazz)) {
throw new SerializationException("Type '" + clazz.getName()
+ "' was not assignable to '" + IsSerializable.class.getName()
+ "' and did not have a custom field serializer."
+ "For security purposes, this type will not be serialized.");
}
}
private boolean isInstantiable(Class<?> clazz) {
if (clazz.isPrimitive()) {
return true;
}
if (clazz.isArray()) {
return isInstantiable(clazz.getComponentType());
}
//IsSerialization interface
if (IsSerializable.class.isAssignableFrom(clazz)) {
return true;
}
return SerializabilityUtil.hasCustomFieldSerializer(clazz) != null;
}
I also write a simple testcase to verify it:
@Test
public void test() {
LegacySerializationPolicy policy = LegacySerializationPolicy.getInstance();
try {
policy.validateSerialize(ResourceRequest.class);//change to implement IsSerializtion interface, pass
policy.validateSerialize(HashMap.class);//java.lang.HashMap, pass
policy.validateSerialize(FrameInfoDto.class); //failed
} catch (SerializationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
I saw server mode (without eclipse development mode) using
"StandardSerializationPolicy" not " LegacySerializationPolicy" to do this
validation, it works!!!! StandardSerializationPolicy have a whitelist to save
the serialized Dto such as FrameInfoDto, it an instance in the whitelist will
not throw this error, I am not sure why the development mode choose
LegacySerializationPolicy to do this validation. It seems from RPCRequest.
Original comment by zhanglif...@gmail.com
on 25 Jul 2012 at 5:47
Original issue reported on code.google.com by
fri...@gmail.com
on 16 Dec 2009 at 8:09