need urgent help: RPC Remote Invocation exception

101 views
Skip to first unread message

rakesh

unread,
Jan 31, 2007, 11:21:15 PM1/31/07
to Google Web Toolkit
I am getting a remote invocation exception when I deploy my
application on oc4j.

Here is a little description of what's happening.
- I developed a gwt module in hosted mode. I deployed this module as
webapp on an independent tomcat instance, and it works great!
- My remote service has 4 method calls.
- Two of these methods accept String as parameter and returns
ArrayList of Drawing. Drawing is an value object that implements
IsSerializable and an interface with only one implementation method in
it.
- 2 other methods does the opposite. i.e. accept Drawing as parameter
and return String(one method) and ArrayList of Strings (other
method).
- I get rpc exception on the above two methods. "Call failed at
server, please check the server log".
- There is no other detail or description that I can use to debug. I
dont even get a call log on my server.
- Again: 2 calls with string as parameter and ArrayList<Drawing> as
return, works perfectly fine.
- Other 2 method calls with ArrayList<Drawing> as parameter and String
as return type, gives me rpc exception.


I am running really short on time. We have spend considerable effort
developing a real good looking(custom widget rich) gwt app.

I am doing gwt-compile in my ant build script.
I am using gwt 1.3.1
I am deploying my application in oc4j as an ear.

I know this post might sound really weired, but it is a show stopper
for us now.
Again, any kind of help is reallllly appreciated. ...

The Cook (Kiril)

unread,
Jan 31, 2007, 11:40:49 PM1/31/07
to Google Web Toolkit
Seems that GWT fails to serialize Drawing.
Check what types are in it and have a look in GWT's documentation if
they are serializable.

Heepy days,

The Cook.

rakesh

unread,
Feb 1, 2007, 9:14:35 AM2/1/07
to Google Web Toolkit
I already tried that.
All the types in drawing are allowed by GWT. In One method I return
Drawing and pass a String object, that works perfectly fine. The
problem is only when I do the reverse.

To confirm my assertion: I created a test method that takes a String
and returns a String. RPC works perfectly fine!!
Then I changed the Parameter to a custom class that implements
IsSerializable with a default constructor and only one String
property. RPC FAILS!! And this is only when I deploy my module with
rest of my app in oc4j. Every thing works good in hosted mode and
tomcat!!

I have tried almost every possible combination to isolate the bug, but
no luck so far....

Here's me in the jungle of GWT, still shouting: help help ...

On Jan 31, 10:40 pm, "The Cook (Kiril)" <kirilstan...@gmail.com>
wrote:

Rob Jellinghaus

unread,
Feb 1, 2007, 1:02:49 PM2/1/07
to Google Web Toolkit
On Feb 1, 6:14 am, "rakesh" <rake...@gmail.com> wrote:
> To confirm my assertion: I created a test method that takes a String
> and returns a String. RPC works perfectly fine!!
> Then I changed the Parameter to a custom class that implements
> IsSerializable with a default constructor and only one String
> property. RPC FAILS!! And this is only when I deploy my module with
> rest of my app in oc4j. Every thing works good in hosted mode and
> tomcat!!

You're getting this exception on the client? Are you able to add
logging messages to see whether the request is being received by the
server at all? Can you breakpoint in your code on the server to see
whether the incoming request is arriving from the browser? One would
assume that the browser is behaving identically, so there must be SOME
kind of issue on the server. Perhaps oc4j (which I know nothing
about) is rejecting the request before it even gets to the servlet?
Do the oc4j server logs show the incoming request arriving at all?

Basically you need to trace the request from the moment the packets
arrive at the server down through the oc4j stack to see where it is
going wrong on the server end. Of course you should also use Firebug
or some other app to make sure that the client really is behaving
identically in the Tomcat case vs. the oc4j case (just to make sure
that the problem is on the server).

Do you have debug connection access to this server? If so, get the
GWT 1.3.1 source and set it up so you can breakpoint through
RemoteServiceServlet.

Cheers,
Rob

rakesh

unread,
Feb 1, 2007, 1:26:06 PM2/1/07
to Google Web Toolkit
Rob, thank you for the comment.

On the server side, I dont see any log of the request coming in. I am
"remote debugging" the application, means I can set a break point and
expect the call. No luck either.

Next thing I might plan to do is keep a proxy server between the
client and server that will log all the traffic and fwd the req/res.


On Feb 1, 12:02 pm, "Rob Jellinghaus" <r...@unrealities.com> wrote:
> On Feb 1, 6:14 am, "rakesh" <rake...@gmail.com> wrote:
>
> > To confirm my assertion: I created a test method that takes a String

> > and returns a String.RPCworks perfectly fine!!


> > Then I changed the Parameter to a custom class that implements
> > IsSerializable with a default constructor and only one String

> > property.RPCFAILS!! And this is only when I deploy my module with

Jason Essington

unread,
Feb 1, 2007, 2:44:49 PM2/1/07
to Google-We...@googlegroups.com
I have found that when debugging these sort of problems, tcpmon us a
very useful tool.

tcpmon used to be part of Apache Axis 1.1, but now it appears to be
its own stand alone project:
http://ws.apache.org/commons/tcpmon/

-jason

rakesh

unread,
Feb 1, 2007, 3:16:56 PM2/1/07
to Google Web Toolkit
thanks jason.

apache-tcpmon is a great tool, i have used it before. These days I use
the eclipse embedded tcp-monitor utility.

I could see that a request is send along with all the data(encrypted).
I could see my class names etc being sent. But there is no trace in
the server logs!!!!!!!

I suspect that my web.xml might be a culprit. But I removed all the
filters from it.

still no luck :((

Rob Jellinghaus

unread,
Feb 1, 2007, 4:26:47 PM2/1/07
to Google Web Toolkit
On Feb 1, 12:16 pm, "rakesh" <rake...@gmail.com> wrote:
> I could see that a request is send along with all the data(encrypted).
> I could see my class names etc being sent. But there is no trace in
> the server logs!!!!!!!

That's just weird. What's the HTTP endpoint? Is it going to the
right server / port? Is there any request-level logging (like Apache
request logging, or something) that oc4j provides? It really seems
like the bits just aren't reaching the server at all... doesn't it?

Cheers,
Rob

rakesh

unread,
Feb 1, 2007, 4:32:41 PM2/1/07
to Google Web Toolkit
irony of the situation is that I am using oc4j for the first
time!!!!!!!!!!
Here is what I did: I created a blank app and packaged only the gwt
module with a clean web.xml file. still no luck!! damn, i am running
out of ideas now!!!!

rakesh

unread,
Feb 1, 2007, 6:43:54 PM2/1/07
to Google Web Toolkit
I got this from the oc4j log:

127.0.0.1 - - [01/Feb/2007:17:40:20 -0600] "POST /webapp/
org.eagle.o2e.web.TransmittalScreen/TransmittalService HTTP/1.1" 200
429

127.0.0.1 - - [01/Feb/2007:17:40:53 -0600] "POST /webapp/
org.eagle.o2e.web.TransmittalScreen/TransmittalService HTTP/1.1" 500
57


What I want to say here is:
request 1: which is a request with "String" as parameter, gets an HTTP
status code=200, which means: OK!

request 2: which is a request with Object as parameter to the same
service, gets an HTTP status code=500, which means: NOT FOUND!!!!!!!!

what's going on??????????????????????????

rakesh

unread,
Feb 2, 2007, 3:01:39 PM2/2/07
to Google Web Toolkit
I have done little progress on this. I have atleast found the
exception stack trace in the server: Any clue on what the cause might
be?


07/02/02 13:59:33 o2e: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException:
java.lang.ClassNotFoundException:
org.eagle.o2e.web.client.transferObjects.TransmittalItem
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
156)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
61)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:
70)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
270)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
167)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:
65)
at org.eagle.o2e.web.control.GlobalFilter.doFilter(GlobalFilter.java:
102)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:
663)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:
330)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:
830)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:
285)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:
126)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].util.ReleasableResourcePooledExecutor
$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException:
org.eagle.o2e.web.client.transferObjects.TransmittalItem
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].naming.ContextClassLoader.findClass(ContextClassLoader.java:
500)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].naming.ContextClassLoader.loadClass(ContextClassLoader.java:
143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
135)
... 15 more

Sandy McArthur

unread,
Feb 2, 2007, 3:11:27 PM2/2/07
to Google Web Toolkit
I'd guess you are using an Object to Database mapping tool and the RPC
servlet doesn't know how to deal with proxy classes the mapping tool
is creating behind the scenes. Does the RPC work if you manually copy
the values into a freshly created object you intend to send over RPC?

rakesh

unread,
Feb 2, 2007, 3:22:55 PM2/2/07
to Google Web Toolkit
No!
i created a simple class TestData and tried to make it work. I still
get the same exception.

I dont understand why, but this happens only with the rpc method
parameter. Not with the return type!!!

07/02/02 13:56:53 o2e: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException:
java.lang.ClassNotFoundException: org.eagle.o2e.web.client.TestData

org.eagle.o2e.web.client.TestData


at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].naming.ContextClassLoader.findClass(ContextClassLoader.java:
500)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at com.evermind[Oracle Application Server Containers for J2EE 10g
(10.1.2.0.2)].naming.ContextClassLoader.loadClass(ContextClassLoader.java:
143)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:
135)
... 15 more

rakesh

unread,
Feb 3, 2007, 12:40:39 PM2/3/07
to Google Web Toolkit
finally got this thing resolved.
The problem was with class loader. GWT classes and rpc classes would
load in different class loaders, hence the issue!!!

Any way, got it fixed.
I should thank you all who spported me during my hard time!!!
really appreciate it.

Rakesh Wagh

Dave

unread,
Feb 5, 2007, 3:55:06 PM2/5/07
to Google Web Toolkit
Can you tell me what you did to fix it? I've tried setting the
'priviledged' attribute on my context, but that didn't seem to do it.

-D

On Feb 3, 12:40 pm, "rakesh" <rake...@gmail.com> wrote:
> finally got this thing resolved.

> The problem was withclassloader. GWT classes and rpc classes would
> load in differentclassloaders, hence the issue!!!


>
> Any way, got it fixed.
> I should thank you all who spported me during my hard time!!!
> really appreciate it.
>
> Rakesh Wagh
>
> On Feb 2, 2:22 pm, "rakesh" <rake...@gmail.com> wrote:
>
> > No!

> > i created a simpleclassTestData and tried to make it work. I still


> > get the same exception.
>
> > I dont understand why, but this happens only with the rpc method

> > parameter.Notwith the return type!!!

rakesh

unread,
Feb 5, 2007, 4:54:44 PM2/5/07
to Google Web Toolkit
If you have a similar issue then make sure that all the gwt and rpc
related classes(especially value/tranfer objects) load in the same
class loader.

copy the gwt related jars to your application web-inf/lib folder. Many
times the application architect prefer to have a "common" folder for
jars(where jars are shared across applications).

Again, the key is to ensure that everything is in the same class
loader.

If nothing works, try this: Extract the gwt-jar and copy those classes
in your web-inf/classes folder. I know it sounds stupid, but it might
help you isolate/debug the real cause/issue.

best of luck

Rakesh

Reply all
Reply to author
Forward
0 new messages