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. ...
Heepy days,
The Cook.
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:
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
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
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
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 :((
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
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??????????????????????????
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
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
Any way, got it fixed.
I should thank you all who spported me during my hard time!!!
really appreciate it.
Rakesh Wagh
-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!!!
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