AnsweredAssumed Answered

JCR-RMI configuration in jboss

Question asked by bindiya on Dec 11, 2006
Latest reply on Dec 12, 2006 by rdanner
Hi,

I have tried creating servlet  to access alfresco using JackRabbit RMI api using webDav remote client.
Sample servlet runs on separate Jboss server on the same machine, on different ports. (that is RMI port for this server is 2099 and RMI port for alfresco is 1099)

Here is the following code.

ClientRepositoryFactory factory = new ClientRepositoryFactory();
Repository repository = null;
repository = factory.getRepository("rmi://localhost:1099/jcrServer");

I also tried below code by uncommenting and modifing web.xml in jackrabbit-server-1.1.war
 
        <init-param>
            <param-name>rmi-port</param-name>
            <param-value>0</param-value>
            <description>
                The RMI port for registering the repository in the RMI Registry.
                If equals 0, the default port is used.
            </description>
        </init-param>
        <init-param>
            <param-name>rmi-host</param-name>
            <param-value>localhost</param-value>
            <description>
                The RMI host for registering the repository in the RMI Registry.
                If equals "" or missing, the default host is used.
            </description>
        </init-param>
        <init-param>
            <param-name>rmi-uri</param-name>
            <param-value>jackrabbit.repository</param-value>
            <description>
                The RMI uri for registering the repository in the RMI Registry.
                If missing, the uri is composed using the other rmi parameters
                and will have the format: //{rmi-host}:{rmi-port}/{repository-name}
            </description>
        </init-param>


Repository repository = null;
repository = factory.getRepository("rmi://localhost:1099/jackrabbit.repository");


Both throws folloing error..

12:20:23,692 ERROR [STDERR] java.rmi.ConnectIOException: non-JRMP server at remo
te endpoint
12:20:23,770 ERROR [STDERR]     at sun.rmi.transport.tcp.TCPChannel.createConnec
tion(TCPChannel.java:217)
12:20:23,770 ERROR [STDERR]     at sun.rmi.transport.tcp.TCPChannel.newConnectio
n(TCPChannel.java:171)
12:20:23,770 ERROR [STDERR]     at sun.rmi.server.UnicastRef.newCall(UnicastRef.
java:306)
12:20:23,770 ERROR [STDERR]     at sun.rmi.registry.RegistryImpl_Stub.lookup(Unk
nown Source)
12:20:23,770 ERROR [STDERR]     at java.rmi.Naming.lookup(Naming.java:84)
12:20:23,770 ERROR [STDERR]     at org.apache.jackrabbit.rmi.client.ClientReposi
toryFactory.getRepository(ClientRepositoryFactory.java:86)
12:20:23,770 ERROR [STDERR]     at sample.servlet.HelloWorld.doGet(HelloWorld.ja
va:66)
12:20:23,770 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:697)
12:20:23,770 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpSe
rvlet.java:810)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:252)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
12:20:23,770 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilte
r.doFilter(ReplyHeaderFilter.java:96)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.internalDoFilter(ApplicationFilterChain.java:202)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterCha
in.doFilter(ApplicationFilterChain.java:173)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve
.invoke(StandardWrapperValve.java:213)
12:20:23,770 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve
.invoke(StandardContextValve.java:178)
12:20:23,770 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssocia
tionValve.invoke(SecurityAssociationValve.java:175)
12:20:23,770 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValv
e.invoke(JaccContextValve.java:74)
12:20:23,801 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.in
voke(StandardHostValve.java:126)
12:20:23,801 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.i
nvoke(ErrorReportValve.java:105)
12:20:23,801 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.
invoke(StandardEngineValve.java:107)
12:20:23,801 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.s
ervice(CoyoteAdapter.java:148)
12:20:23,801 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.proc
ess(Http11Processor.java:869)
12:20:23,801 ERROR [STDERR]     at org.apache.coyote.http11.Http11BaseProtocol$H
ttp11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
12:20:23,801 ERROR [STDERR]     at org.apache.tomcat.util.net.PoolTcpEndpoint.pr
ocessSocket(PoolTcpEndpoint.java:527)
12:20:23,801 ERROR [STDERR]     at org.apache.tomcat.util.net.MasterSlaveWorkerT
hread.run(MasterSlaveWorkerThread.java:112)
12:20:23,801 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:595)

Can you please tell me whats happening?

Thanks,
Bindiya

Outcomes