Hello,
I am having difficulty in access a spring managed RMI service running on a remote server from a plain RMI client running on my local machine.
I have no problems with the export and service binding as you can see from the following logs
[main] (RmiServiceExporter.java:322) INFO org.springframework.remoting.rmi.RmiServiceExporte r - Looking for RMI registry at port '1199'
4562 [main] (RmiBasedExporter.java:59) DEBUG org.springframework.remoting.rmi.RmiServiceExporte r - RMI service [com.mi.webmark.ftp.dpac.service.impl.DataConsolida tionServiceImpl@3a1834] is an RMI invoker
4594 [main] (RmiServiceExporter.java:236) INFO org.springframework.remoting.rmi.RmiServiceExporte r - Binding RMI service 'ConsolidationService' to registry at port '1199'
But when my plain RMI client running on my local machine tries to access the RMI service running on the server, I am getting the following expection after I appended classpath with spring-remoting.jar
java.lang.ClassCastException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
Now my question is : why am I getting org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
when I am expecting my service interface?
API documention for org.springframework.remoting.rmi.RmiServiceExporte r
says the following
<quote>
RMI exporter that exposes the specified service as RMI object with the specified name. Such services can be accessed via plain RMI or via RmiProxyFactoryBean. Also supports exposing any non-RMI service via RMI invokers, to be accessed via RmiClientInterceptor/RmiProxyFactoryBean's automatic detection of such invokers
</quote>
Am I missing something or Do I need a spring managed client app to access the spring managed RMI service?
Quick response will be appreciated.


Reply With Quote