schuermann
Nov 2nd, 2005, 04:11 AM
Hi!
I'm having problems using a plain RMI client to access a remote server set up using Spring (using RmiServiceExporter). When trying to cast the object returned by java.rmi.Naming.lookup(...) to the actual "remote" interface I get a java.lang.ClassCastException. The remote object returned is of type: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub. The service exported by RmiServiceExporter does not declare any RMI-specific interfaces of exceptions - it is a POJO.
Using a Spring-based client works just fine, but I cannot restrict access to Spring-based clients only.
Chapter 16.2.1 in the Spring Reference Documentation states that it is indeed possible to access a Spring RMI object using plain RMI.
Any ideas as to what I am doing wrong?
I'm having problems using a plain RMI client to access a remote server set up using Spring (using RmiServiceExporter). When trying to cast the object returned by java.rmi.Naming.lookup(...) to the actual "remote" interface I get a java.lang.ClassCastException. The remote object returned is of type: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub. The service exported by RmiServiceExporter does not declare any RMI-specific interfaces of exceptions - it is a POJO.
Using a Spring-based client works just fine, but I cannot restrict access to Spring-based clients only.
Chapter 16.2.1 in the Spring Reference Documentation states that it is indeed possible to access a Spring RMI object using plain RMI.
Any ideas as to what I am doing wrong?