Hello again,
I just wanted to post some more detail to this. Hope this is ok, since we both 
have the same exception...
I have debugged the client part and had a look at the server source.

The Server throws an exception when it casts in the following lines
?(MarshalledInvocation) ois.readObject()?:

  | // Get the invocation from the post
  |             ServletInputStream sis = request.getInputStream();
  |             ObjectInputStream ois = new ObjectInputStream(sis);
  |             mi = (MarshalledInvocation) ois.readObject();
  |             ois.close();
  | 
This happens in the org.jboss.invocation.http.servlet.InvokerServlet as the 
exception states.

On my Client side I stepped into it at the 
org.jboss.aspects.remoting.InvokerRemoteInterceptor around line 62
try 
  |       {
  |          client.connect();
  |          org.jboss.aop.joinpoint.InvocationResponse response = 
(org.jboss.aop.joinpoint.InvocationResponse)client.invoke(invocation, null);
  |          invocation.setResponseContextInfo(response.getContextInfo());
  |          return response.getResponse();
  |       }
  | 

As far as I can tell with my humble knowledge, going through the interceptor 
chain and peeking at the values, it all seemed ok.

 The Object to pass (invocation) is of org.jboss.aop.joinpoint.Invocation 
(actually a MethodInvocation). In the MicroRemoteClientInvoker the Marshaller?s 
are set to HTTPMarshaller and HTTPUnMarshaller and it sets the payload to the 
invocationReq. After the calls of the HTTPClientInvoker it returns the 
response, which holds nonsense (the server throws the error when processing the 
request at the above mentioned line when casting).

The Result is made up of 27 chars: "’##sr#$org.jboss.invocatio". The #'s here 
replaces the control characters. Casting this results obviously leads to the 
mentioned client exception (java.lang.ClassCastException: java.lang.String).

So it seems that for some reason reading from the input stream on the server 
side results in an object which cannot be interpreted into the expected 
MarshalledInvocation. Unfortunately, I have not had time to debug the server?

Sincerely
Marc

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049654#4049654

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049654

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to