I am trying to access a Jackrabbit repository deployed on a JBoss application server via RMI.
I am getting the following exception when I try to connect to the factory using ClientRepositoryFactory.getRepository('rmi://xxx.xxx.xxx.xxx:1099/imageserver'). But if I create a web application that starts a new RMI registry on the server with a different port and register Jackrabbit in that new registry it works.
However, I need to get this working with the minimal tweaking to the default JBoss configuration. So can anybody shed some light on the causes for the problem. I have seen a lot of posts on the same topic elsewhere and we have tried all the plausible (and many un plausible) suggested solutions.
org.apache.jackrabbit.rmi.client.RemoteRuntimeException: java.rmi.ConnectIOException: non-JRMP server at remote endpoint
org.apache.jackrabbit.rmi.client.SafeClientRepository.getDescriptor(SafeClientRepository.java:81)
com.btmatthews.freelancer.webapp.servlet.TestServlet.doGet(TestServlet.java:39)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:230)
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
java.rmi.Naming.lookup(Naming.java:84)
org.apache.jackrabbit.rmi.client.ClientRepositoryFactory$1.getRemoteRepository(ClientRepositoryFactory.java:95)
org.apache.jackrabbit.rmi.client.SafeClientRepository.getDescriptor(SafeClientRepository.java:77)
com.btmatthews.freelancer.webapp.servlet.TestServlet.doGet(TestServlet.java:39)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)