Failing to find custom field serilializers in Oracle OC4J 10.1.3.5

24 views
Skip to first unread message

stuckagain

unread,
Jan 5, 2010, 9:01:53 AM1/5/10
to Google Web Toolkit Contributors
Hi,

We are having some issues with classloaders and custom field
serializers in GWT 2.0 in combination with oc4j 10.1.3.5. I was
assuming that the issue was purely an Oracle thing, but I looked
through the RPC code and found some differences in the way
classloaders are used in the RPC package.

The javadocs of RPC.decodeRequest state that the Thread.currentThread
().getContextClassLoader() is used to load the service interfaces.
Unfortunately this approach is not used when searching for the custom
field serializers.

Custom field serializers are looked up using:
com.google.gwt.user.server.rpc.impl.SerializabilityUtil.computeHasCustomFieldSerializer

This method uses the SerializabilityUtil.class.getClassLoader() and in
our specific case this fails to locate our custom field serializer. Is
there a reason why this is different ?

What is special in our EAR/WAR deployment ? All libs (including gwt-
servlet.jar and ourgwt.jar, which contains the custom field
serializer) are available in the EAR and are available in the WAR
classloader through the manifest of the WAR.

David

stuckagain

unread,
Jan 5, 2010, 9:30:19 AM1/5/10
to Google Web Toolkit Contributors
I further investigated and found out that this is actually a
regression issue caused by this change:

http://code.google.com/p/google-web-toolkit/source/diff?spec=svn7354&r=5678&format=side&path=/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java&old_path=/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java&old=5672

When the new deRPC was initially added, a change was checked in on the
old RPC class... as a result, our custom field serializers no longer
work.

David

On Jan 5, 3:01 pm, stuckagain <david.no...@gmail.com> wrote:
> Hi,
>
> We are having some issues with classloaders and custom field
> serializers in GWT 2.0 in combination with oc4j 10.1.3.5. I was
> assuming that the issue was purely an Oracle thing, but I looked
> through the RPC code and found some differences in the way
> classloaders are used in the RPC package.
>
> The javadocs of RPC.decodeRequest state that the Thread.currentThread
> ().getContextClassLoader() is used to load the service interfaces.
> Unfortunately this approach is not used when searching for the custom
> field serializers.
>
> Custom field serializers are looked up using:

> com.google.gwt.user.server.rpc.impl.SerializabilityUtil.computeHasCustomFie­ldSerializer

John Tamplin

unread,
Jan 5, 2010, 11:08:13 AM1/5/10
to google-web-tool...@googlegroups.com
On Tue, Jan 5, 2010 at 9:30 AM, stuckagain <david...@gmail.com> wrote:
I further investigated and found out that this is actually a
regression issue caused by this change:

http://code.google.com/p/google-web-toolkit/source/diff?spec=svn7354&r=5678&format=side&path=/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java&old_path=/trunk/user/src/com/google/gwt/user/server/rpc/impl/SerializabilityUtil.java&old=5672

When the new deRPC was initially added, a change was checked in on the
old RPC class... as a result, our custom field serializers no longer
work.

Can you confirm that changing back to the thread context classloader in SerializabilityUtil fixes your problem? 

--
John A. Tamplin
Software Engineer (GWT), Google

stuckagain

unread,
Jan 6, 2010, 3:24:45 AM1/6/10
to Google Web Toolkit Contributors
Yes,

It fixes the problem. By the way, might it be that the custom field
serializers outside of gwt-servlet are in fact broken in 2.0.0 ? I see
a message in the GWT newsgroup where they detected the same issue ?
When can there be a patched 2.0, this is quite critical!

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/74256de92dd7e781#

David

On Jan 5, 5:08 pm, John Tamplin <j...@google.com> wrote:


> On Tue, Jan 5, 2010 at 9:30 AM, stuckagain <david.no...@gmail.com> wrote:
> > I further investigated and found out that this is actually a
> > regression issue caused by this change:
>

> >http://code.google.com/p/google-web-toolkit/source/diff?spec=svn7354&...

Lex Spoon

unread,
Jan 6, 2010, 6:01:44 PM1/6/10
to google-web-tool...@googlegroups.com
On Wed, Jan 6, 2010 at 3:24 AM, stuckagain <david...@gmail.com> wrote:
It fixes the problem. By the way, might it be that the custom field
serializers outside of gwt-servlet are in fact broken in 2.0.0 ? I see
a message in the GWT newsgroup where they detected the same issue ?
When can there be a patched 2.0, this is quite critical!

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/74256de92dd7e781#


I don't know what the real problem is, but I'm sure that custom serializers are not broken in general.  There must be something more specific going wrong.  -Lex


John Tamplin

unread,
Jan 6, 2010, 6:20:45 PM1/6/10
to google-web-tool...@googlegroups.com
On Wed, Jan 6, 2010 at 6:01 PM, Lex Spoon <sp...@google.com> wrote:
I don't know what the real problem is, but I'm sure that custom serializers are not broken in general.  There must be something more specific going wrong.  -Lex

Yes, the problem is that if it isn't on the classpath used to find the GWT classes it won't be found.  That can be the case depending on how the servlet classpaths are setup.

We are triaging the bugs to fix in 2.0.1 in the next few days, and I expect this one will be included. 

David

unread,
Jan 7, 2010, 2:49:19 AM1/7/10
to google-web-tool...@googlegroups.com
I did not file a bug report yet. Do I need to do this or is it already done ?

> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

stuckagain

unread,
Jan 8, 2010, 3:06:19 AM1/8/10
to Google Web Toolkit Contributors
Since I saw no reply, I created the bug report:

http://code.google.com/p/google-web-toolkit/issues/detail?id=4460

> >http://groups.google.com/group/Google-Web-Toolkit-Contributors- Hide quoted text -
>
> - Show quoted text -

Reply all
Reply to author
Forward
0 new messages