Hi, On Thu, Apr 9, 2009 at 9:05 AM, Christoph Thodte <[email protected]> wrote: > I got the following error when I try to login and want to get a session > object. I use the spring interface for RMI-Communication documented here > http://static.springframework.org/spring/docs/2.5.x/reference/remoting.html#remoting-rmi. > The object is correct wired and ist represented as a proxy. When I invoke > the login-method I get an ClassCastException like this > > Can somebody help me and tell me what's wrong? > > CHWERWIEGEND: Servlet.service() for servlet SpdContent threw exception > java.lang.ClassCastException: > org.apache.jackrabbit.rmi.server.ServerXASession_Stub cannot be cast to > javax.jcr.Session
You're trying to access a RemoteRepository reference as a Repository. This won't work, you need to use a ClientRepositoryFactory to adapt the remote reference to a local Repository instance before accessing it through normal JCR interfaces. BR, Jukka Zitting
