gourmej
gourmej

Reputation: 3

Spring - Cannot deserialize result from HTTP invoker remote service

This error occurs when I'm trying to invoke a method available for me through spring's remote service.
The error is as follows:

org.springframework.remoting.RemoteAccessException: Cannot deserialize result from HTTP invoker remote service [remote service address]; 
nested exception is java.lang.ClassNotFoundException: default.CommonException
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:192)
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:157)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
at com.sun.proxy.$Proxy25.getQueryResult(Unknown Source)
at default.Main.main

What can be the problem caused by? Results from all other methods get deserialized without a problem.

EDIT: I try to get this result simply by:
Result res = remoteService.getResult(param);

Upvotes: 0

Views: 3620

Answers (1)

Marco Nembrini
Marco Nembrini

Reputation: 111

The remote service has thrown a default.CommonException, which is then serialized by spring remoting and then tried to deserialized: at this point you get the ClassNotFound.

I think you don't have default.CommonException on the classpath on the caller side, so deserializing does not work.

Upvotes: 1

Related Questions