google-code-export / gwteventservice

Automatically exported from code.google.com/p/gwteventservice
Other
2 stars 2 forks source link

Patch to fix SerializationException occurring on Blackboard 9.1SP8 Building Block #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a Blackboard Building Block web application that uses gwteventservice.
2. Deploy it to a Blackboard 9.1SP8 server.
3. Notice in the stdout-stderr log the application doesn't work due to the 
POSTS to the gwteventservice servlet causing SerializationExceptions.

What is the expected output? What do you see instead?
The application should work (since it works fine on a standalone Tomcat 6 
server) but for some reason doesn't on the Tomcat 6 server contained in 
Blackboard. The stacktrace of the exception looks like...

INFO   | jvm 1    | 2012/05/23 07:54:47 | SEVERE: Exception while dispatching 
incoming RPC call
INFO   | jvm 1    | 2012/05/23 07:54:47 | 
com.google.gwt.user.client.rpc.SerializationException: Type 
'de.novanic.eventservice.client.config.RemoteEventServiceConfigurationTransferab
le' 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 serialized.: instance = 
de.novanic.eventservice.client.config.RemoteEventServiceConfigurationTransferabl
e@28ab3970
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(Se
rverSerializationStreamWriter.java:619)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObjec
t(AbstractSerializationStreamWriter.java:126)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$
8.write(ServerSerializationStreamWriter.java:153)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeVal
ue(ServerSerializationStreamWriter.java:539)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:616)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:474)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:571)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceSer
vlet.java:208)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceSer
vlet.java:248)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemot
eServiceServlet.java:62)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.GeneratedMethodAccessor320.invoke(Unknown Source)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.reflect.Method.invoke(Method.java:597)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:163)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:283)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java
:646)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatc
her.java:436)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.j
ava:374)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.
java:65)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(Application
Dispatcher.java:80)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.jav
a:294)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
blackboard.platform.servlet.B2ContextFilter.doFilter(B2ContextFilter.java:110)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.GeneratedMethodAccessor325.invoke(Unknown Source)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.reflect.Method.invoke(Method.java:597)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:230)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
blackboard.platform.servlet.ContentTypeFilter.doFilter(ContentTypeFilter.java:57
)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.GeneratedMethodAccessor324.invoke(Unknown Source)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.reflect.Method.invoke(Method.java:597)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:230)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
blackboard.platform.servlet.XssServletFilter.doFilter(XssServletFilter.java:139)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.GeneratedMethodAccessor323.invoke(Unknown Source)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.reflect.Method.invoke(Method.java:597)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:230)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
blackboard.platform.servlet.RequestSessionFilter.doFilter(RequestSessionFilter.j
ava:123)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.GeneratedMethodAccessor322.invoke(Unknown Source)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.reflect.Method.invoke(Method.java:597)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:302)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:243)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:230)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChai
n.java:56)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.jav
a:189)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.security.AccessController.doPrivileged(Native Method)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:185)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
33)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
91)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:554)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
blackboard.tomcat.valves.LoggingRemoteIpValve.invoke(LoggingRemoteIpValve.java:4
4)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898
)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:69
0)
INFO   | jvm 1    | 2012/05/23 07:54:47 |   at 
java.lang.Thread.run(Thread.java:662)

What version of the product are you using? On what operating system?
I'm using gwteventservice-1.2.0 deployed to Blackboard 9.1SP8 running on RHEL 
6.2.

Please provide any additional information below.
The following patch fixed the problem when applied against the source code at 
http://gwteventservice.googlecode.com/svn/tags/1.2.0 ...

Index: 
eventservice-rpc/src/main/java/de/novanic/eventservice/client/event/Event.java
===================================================================
24c24
< import java.io.Serializable;

---
> import com.google.gwt.user.client.rpc.IsSerializable;
34c34
< public interface Event extends Serializable {}
\ No newline at end of file

---
> public interface Event extends IsSerializable {}
\ No newline at end of file
Index: 
eventservice-rpc/src/main/java/de/novanic/eventservice/client/event/filter/Event
Filter.java
===================================================================
26c26
< import java.io.Serializable;

---
> import com.google.gwt.user.client.rpc.IsSerializable;
36c36
< public interface EventFilter extends Serializable

---
> public interface EventFilter extends IsSerializable
Index: 
eventservice-rpc/src/main/java/de/novanic/eventservice/client/event/domain/Domai
n.java
===================================================================
24c24
< import java.io.Serializable;

---
> import com.google.gwt.user.client.rpc.IsSerializable;
48c48
< public interface Domain extends Serializable, Comparable<Domain>

---
> public interface Domain extends IsSerializable, Comparable<Domain>
Index: 
eventservice-rpc/src/main/java/de/novanic/eventservice/client/event/DomainEvent.
java
===================================================================
26c26
< import java.io.Serializable;

---
> import com.google.gwt.user.client.rpc.IsSerializable;
35c35
< public interface DomainEvent extends Serializable

---
> public interface DomainEvent extends IsSerializable
Index: 
eventservice-rpc/src/main/java/de/novanic/eventservice/client/config/EventServic
eConfigurationTransferable.java
===================================================================
24c24
< import java.io.Serializable;

---
> import com.google.gwt.user.client.rpc.IsSerializable;
36c36
< public interface EventServiceConfigurationTransferable extends Serializable

---
> public interface EventServiceConfigurationTransferable extends IsSerializable

Original issue reported on code.google.com by m.j...@griffith.edu.au on 23 May 2012 at 12:39

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Thank you for the patch.

Actually IsSerializable shouldn't be required with newer versions of GWT. This 
error came up in the past when the application wasn't clean re-compiled with 
GWT 2.x. This was for example already mentioned in Issue11. Could you please 
try if the issue can be solved with hints of Issue11 
(https://code.google.com/p/gwteventservice/issues/detail?id=11&can=1&q=IsSeriali
zable)? That would help a lot, because we would like to avoid adding 
GWT-specfic classes/interfaces to the generic interfaces.

Thank you in advance.

Original comment by sven.strohschein@googlemail.com on 23 Jul 2012 at 8:41

GoogleCodeExporter commented 9 years ago
Comments from Hugues C.:

I have this error with a clean build of the application using GWT 2.3. I will 
try to fix it by adding @GwtCompatible(serializable = true) from the guava 
library. Would it be an acceptable fix?

The serialization error happens when the server is restarted while a client 
using GWT Event Service is using the application (it does not happen 
everytime). For now, I fixed the problem by providing a custom field serializer 
for RemoteEventServiceConfigurationTransferable.

Original comment by sven.strohschein@googlemail.com on 7 Aug 2012 at 7:40

GoogleCodeExporter commented 9 years ago
Hi

I also saw this problem using 1.2.0 with GWT 2.3 but only when our customer was 
running through a proxy. I added the patch and the problem appears to have been 
resolved.

Regards
Neil

Original comment by n...@hydeabbey.net on 7 Aug 2012 at 7:59

GoogleCodeExporter commented 9 years ago
Hi Neil,

I could imagine that the proxy had cached some old GWT/JS resources. This could 
for example happen when GWTEventService or the GWT version was updated and the 
application wasn't rebuild completely or when some outdated resources were 
still cached. Could that be the reason? Was also a previous version of 
GWTEventService or GWT used and accessed via the proxy?

Regards,

Sven

Original comment by sven.strohschein@googlemail.com on 3 Oct 2012 at 8:47

GoogleCodeExporter commented 9 years ago
Hi Sven

This was a brand new customer install with a clean production build that has 
only ever run gwt 2.3.0 with gwteventservice 1.2.0, so I don't believe it could 
have been contaminated with old cached data. 

Neil

Original comment by n...@hydeabbey.net on 3 Oct 2012 at 9:45