Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 77986 invoked from network); 7 Jul 2006 14:34:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2006 14:34:36 -0000 Received: (qmail 27334 invoked by uid 500); 7 Jul 2006 14:34:35 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 27307 invoked by uid 500); 7 Jul 2006 14:34:35 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 27297 invoked by uid 99); 7 Jul 2006 14:34:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 07:34:34 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of edgarpoce@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Jul 2006 07:34:28 -0700 Received: by ug-out-1314.google.com with SMTP id a2so3107135ugf for ; Fri, 07 Jul 2006 07:34:00 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QfmcFcs8z+Vy+K+BvybGieE7fE/zQjvnehzRTKZnbUtZHL4A8Cfw4ty1Ob/16kEfrELfpZ7JpDkMdi9wyyQk49KePpfhIAOGrvZr1uWgxVda4wy5KGTMUU6Q7dxFPVc6e/1zQ9X/opO77B4ZK+aCAVzwsIMv2YJcgFcAV2cHNn4= Received: by 10.66.243.2 with SMTP id q2mr2090030ugh; Fri, 07 Jul 2006 07:34:00 -0700 (PDT) Received: by 10.67.30.15 with HTTP; Fri, 7 Jul 2006 07:34:00 -0700 (PDT) Message-ID: <8a83c96b0607070734m244b3d70ibd0162ea5b775b90@mail.gmail.com> Date: Fri, 7 Jul 2006 11:34:00 -0300 From: "Edgar Poce" To: users@jackrabbit.apache.org Subject: Re: Jackrabbit and Jboss (Shared Deployment Model) In-Reply-To: <44AE3F76.4080909@iogloballtd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <44A94366.5070406@iogloballtd.com> <8a83c96b0607040717m6dcc92c2j74be5c2467b49379@mail.gmail.com> <44AA9844.5050108@iogloballtd.com> <8a83c96b0607040945t1015648ak948ff5b5d803b3c7@mail.gmail.com> <44AE3F76.4080909@iogloballtd.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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 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 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 > >> >> > >> > > >> > >> > > > > >