jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Poce" <edgarp...@gmail.com>
Subject Re: Jackrabbit and Jboss (Shared Deployment Model)
Date Fri, 07 Jul 2006 14:34:00 GMT
Hi Umesh,

see the jcr-rmi docs at
http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-rmi/src/java/org/apache/jackrabbit/rmi/client/package.html?view=markup
and a client code example at
http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-commands/src/java/org/apache/jackrabbit/command/ext/ConnectToJNDIServer.java?view=markup

br,
edgar

On 7/7/06, Umesh Singh <umesh.singh@iogloballtd.com> wrote:
> Hi Edgar,
>
> Thanks for the help. After checking out the source from the svn I am
> able to build and deploy the jar in JBoss and RMI server is also running
> now. But from the client program when I try to do a lookup for the
> Repository I am getting this error:
>
> /java.lang.ClassCastException:
> org.apache.jackrabbit.rmi.server.ServerRepository_Stub
>     at
> com.io_content.contentrepository.impl.ContentRepositoryRmiTest.testJackRabbitInRMIClientServer(ContentRepositoryRmiTest.java:59)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)/
>
>
> This is code I am using in client test:
>
> *        Properties props = System.getProperties();
>         props.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
>         props.setProperty("java.naming.provider.url", "jnp://"+
> "localhost" +":1099");
>         props.setProperty("java.naming.factory.url.pkgs",
> "org.jboss.naming:org.jnp.interfaces");
>
>         Context context = new InitialContext(props);
>         Repository repository = (Repository)context.lookup("jcrServer");*
>
> I also tried using ClientRepositoryFactory but there also I get error.
>
> *ClientRepositoryFactory factory = new ClientRepositoryFactory();
> Repository repository =
> factory.getRepository("//localhost:1099/jcrServer");*
>
> /java.rmi.ConnectIOException: non-JRMP server at remote endpoint
>     at
> sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
>     at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
>     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
>     at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
>     at java.rmi.Naming.lookup(Naming.java:84)
>     at
> org.apache.jackrabbit.rmi.client.ClientRepositoryFactory.getRepository(ClientRepositoryFactory.java:85)
>     at
> com.io_content.contentrepository.impl.ContentRepositoryRmiTest.testJackRabbitInRMIClientServer(ContentRepositoryRmiTest.java:65)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>     at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)/
>
> Any idea what could be wrong here?
>
> Regards,
> Umesh
>
>
> Edgar Poce wrote:
> > hi,
> >
> > On 7/4/06, Umesh Singh <umesh.singh@iogloballtd.com> wrote:
> >> Hi Edgar,
> >>
> >> Thanks for the wiki post. I am able to setup jackrabbit according to the
> >> instructions given there but still I am not able to do the RMI bit.
> >> Still I am not able to understand how putting just a jar in deploy
> >> folder will make it accessible over rmi?
> >>
> >
> > there's a service descriptor inside the built jar that manages the
> > jcr-rmi lifecycle, it starts the jcr-rmi layer and binds it to a jndi
> > address.
> >
> >> Should it not have some JBoss MBean deployed in SAR or Or I am missing
> >> something?
> >>
> >
> > there's an MBean inside the jar. see
> > http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-rmi/src/java/org/apache/jackrabbit/rmi/server/jmx/
> >
> >
> > br,
> > edgar
> >
> >> Regards,
> >> Umesh
> >>
> >> Edgar Poce wrote:
> >> > Hi Umesh,
> >> >
> >> > On 7/3/06, Umesh Singh <umesh.singh@iogloballtd.com> wrote:
> >> >> Hi,
> >> >>
> >> >> I'm trying to deploy Jackrabbit under Jboss in a shared deployment
> >> model
> >> >>
> >> >
> >> > take a look to http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss.
> >> > see the section "Deploy Jackrabbit with JCA".
> >> >
> >> > br,
> >> > edgar
> >> >
> >> >> I tried deploying directly using RegistryHelper which works and I can
> >> >> see on JBoss console that Repository has been deployed
> >> >> but when I try to do the lookup It seems Jackrabbit tries to start
a
> >> >> new instance of the repository.  This fails because the .lock file
> >> >> exists from when I initially invoked RegistryHelper.
> >> >>
> >> >> Has anyone deployed under Jboss using model 2? Is there something
> >> wrong?
> >> >>
> >> >>
> >> >> Regards,
> >> >> Umesh
> >> >>
> >> >
> >>
> >>
> >
>
>
>

Mime
View raw message