jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furst, Carl" <Carl.Fu...@mlb.com>
Subject Re: Changing the rmi-port when using jackrabbit.war in tomcat
Date Tue, 10 Jul 2012 20:52:42 GMT
If you are using the war, you can set that up in the web.xml in WEB-INF

There is probably another way to register the resource and assign it a
port, but for the war, you can find it there under the section that
defines the 

<!-- 
====================================================================== -->
    <!-- R E P O S I T O R Y   S T A R T U P  S E R V L E T
     -->
    <!-- 
====================================================================== -->
    <servlet>
        <servlet-name>RepositoryStartup</servlet-name>
        <description>
            Repository servlet that starts the repository and registers it
to JNDI ans RMI.
            If you already have the repository registered in this
appservers JNDI context,
            or if its accessible via RMI, you do not need to use this
servlet.
        </description>

...

</servlet>

Section. It's one of the params passed to the servlet.



HTH,
Carl Furst





On 7/10/12 10:14 AM, "Lahiru Gunathilake" <glahiru@gmail.com> wrote:

>Hi Users,
>
>I have deployed two instances of jackrabbit in same machine two tomcat
>instances. When I start the second tomcat instance I get following error.
>Obviously due to first instance is starting rmi port 1099. I tried to find
>an easy way to configure this but I couldn't.
>
>Cannot create Registry
>java.rmi.server.ExportException: Port already in use: 1099; nested
>exception is:
>java.net.BindException: Address already in use
>at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:310)
>~[na:1.6.0_23]
>at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218)
>~[na:1.6.0_23]
>at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
>~[na:1.6.0_23]
>at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129) ~[na:1.6.0_23]
>at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:190)
>~[na:1.6.0_23]
>at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
>~[na:1.6.0_23]
>at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:68)
>~[na:1.6.0_23]
>at 
>java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:222)
>~[na:1.6.0_23]
>at
>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.registerRMI(Repository
>StartupServlet.java:532)
>[RepositoryStartupServlet.class:na]
>at
>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.startup(RepositoryStar
>tupServlet.java:243)
>[RepositoryStartupServlet.class:na]
>at
>org.apache.jackrabbit.j2ee.RepositoryStartupServlet.init(RepositoryStartup
>Servlet.java:215)
>[RepositoryStartupServlet.class:na]
>at javax.servlet.GenericServlet.init(GenericServlet.java:160)
>[servlet-api.jar:3.0.FR]
>at
>org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:
>1266)
>[catalina.jar:7.0.23]
>at
>org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
>1185)
>[catalina.jar:7.0.23]
>at 
>org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
>[catalina.jar:7.0.23]
>at
>org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.jav
>a:5001)
>[catalina.jar:7.0.23]
>at
>org.apache.catalina.core.StandardContext.startInternal(StandardContext.jav
>a:5289)
>[catalina.jar:7.0.23]
>at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>[catalina.jar:7.0.23]
>at
>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java
>:866)
>[catalina.jar:7.0.23]
>at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
>[catalina.jar:7.0.23]
>at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
>[catalina.jar:7.0.23]
>at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
>[catalina.jar:7.0.23]
>at
>org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
>[catalina.jar:7.0.23]
>at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>[na:1.6.0_23]
>at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>[na:1.6.0_23]
>at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_23]
>at
>java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.
>java:886)
>[na:1.6.0_23]
>at
>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java
>:908)
>[na:1.6.0_23]
>at java.lang.Thread.run(Thread.java:662) [na:1.6.0_23]
>Caused by: java.net.BindException: Address already in use
>at java.net.PlainSocketImpl.socketBind(Native Method) ~[na:1.6.0_23]
>at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365) ~[na:1.6.0_23]
>at java.net.ServerSocket.bind(ServerSocket.java:328) ~[na:1.6.0_23]
>at java.net.ServerSocket.<init>(ServerSocket.java:194) ~[na:1.6.0_23]
>at
>org.apache.jackrabbit.j2ee.RepositoryStartupServlet$2.createServerSocket(R
>epositoryStartupServlet.java:656)
>~[RepositoryStartupServlet$2.class:na]
>at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:649)
>~[na:1.6.0_23]
>at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:299)
>~[na:1.6.0_23]
>... 28 common frames omitted
> Can someone please tell me how to configure this port and successfully
>start an rmi connection.
>
>Lahiru
>
>-- 
>System Analyst Programmer
>PTI Lab
>Indiana University






**********************************************************

MLB.com: Where Baseball is Always On


Mime
View raw message