Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 24111 invoked from network); 14 Jan 2009 07:19:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jan 2009 07:19:10 -0000 Received: (qmail 96420 invoked by uid 500); 14 Jan 2009 07:19:09 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 96401 invoked by uid 500); 14 Jan 2009 07:19:09 -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 96388 invoked by uid 99); 14 Jan 2009 07:19:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2009 23:19:08 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [85.37.17.114] (HELO smtp-out114.alice.it) (85.37.17.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jan 2009 07:18:58 +0000 Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-out114.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Jan 2009 08:18:33 +0100 Received: from FBCMCL01B05.fbc.local ([192.168.69.86]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Jan 2009 08:18:33 +0100 Received: from nutshell ([87.7.113.153]) by FBCMCL01B05.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Jan 2009 08:18:37 +0100 Message-ID: <3C1C6266DE9343D08DBCC2E7F8851AD6@nutshell> From: "Alessandro Cosenza" To: References: <496cc2b4.246.df5.440478097@webmaildh4.aruba.it> Subject: Re: how to configure files with LoginModule impl Date: Wed, 14 Jan 2009 08:18:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-OriginalArrivalTime: 14 Jan 2009 07:18:37.0995 (UTC) FILETIME=[51C557B0:01C97618] X-Virus-Checked: Checked by ClamAV on apache.org thanks for help. but, if i use SimpleCredentials it works very well! no RMI problems! the difference is between User and SimpleCredentials. But my User class is very simple, it has only username and password attributes and a Set of Principal. the only thing i do is changing the Security elemen in repository.xml with my AccessManager and LoginModule implementations which are similar to the Simple implementations provided by Jackrabbit. it's strange! maybe the problem is in rmi stubs you said before. i don't know anything about them. you mean i should have other classes? ----- Original Message ----- From: "Alexander Klimetschek" To: Sent: Tuesday, January 13, 2009 6:25 PM Subject: Re: how to configure files with LoginModule impl > Well, this looks very much like your server-side repository is not > running (have a look at the logs for any startup errors) or the RMI > connection is not enabled. But if you implement a new login module, if > would suggest to test it locally without RMI first. For your user > class you might also have to add some rmi stubs - but I think you > should try to re-use SimpleCredentials instead of your custom User > class, unless it has some really unique features not available in > SimpleCredentials. > > Regards, > Alex > > On Tue, Jan 13, 2009 at 5:35 PM, Alessandro Cosenza > wrote: >> thanks. >> so, i change repository.xml with my AccessManager and >> LoginModule >> implementations. >> Now using this code >> >> Repository repository = >> new >> RMIRemoteRepository("//localhost:1099/jackrabbit.repository"); >> User u = new User("name","surname"); >> Session s = repository.login(u); >> >> where User is my own class for authentication and it is used >> in my >> LoginModule, >> a RepositoryException is thrown: >> Exception in thread "main" javax.jcr.RepositoryException: >> Repository access error: >> //localhost:1099/jackrabbit.repository: Connection refused >> to host: localhost; nested exception is: >> java.net.ConnectException: Connection refused: connect: >> Connection refused to host: localhost; nested exception is: >> java.net.ConnectException: Connection refused: connect >> at >> org.apache.jackrabbit.rmi.repository.RMIRemoteRepositoryFactory.getRemoteRepository(RMIRemoteRepositoryFactory.java:71) >> at >> org.apache.jackrabbit.rmi.repository.AbstractRemoteRepositoryFactory.getRepository(AbstractRemoteRepositoryFactory.java:59) >> at >> org.apache.jackrabbit.commons.repository.ProxyRepository.login(ProxyRepository.java:100) >> at >> org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:53) >> at it.itkey.repository.TestJCR.main(TestJCR.java:26) >> Caused by: java.rmi.ConnectException: Connection refused to >> host: localhost; nested exception is: >> java.net.ConnectException: Connection refused: connect >> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown >> Source) >> at >> sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown >> Source) >> at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown >> Source) >> at sun.rmi.server.UnicastRef.newCall(Unknown Source) >> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown >> Source) >> at java.rmi.Naming.lookup(Unknown Source) >> at >> org.apache.jackrabbit.rmi.repository.RMIRemoteRepositoryFactory.getRemoteRepository(RMIRemoteRepositoryFactory.java:63) >> ... 4 more >> Caused by: java.net.ConnectException: Connection refused: >> connect >> at java.net.PlainSocketImpl.socketConnect(Native Method) >> at java.net.PlainSocketImpl.doConnect(Unknown Source) >> at java.net.PlainSocketImpl.connectToAddress(Unknown >> Source) >> at java.net.PlainSocketImpl.connect(Unknown Source) >> at java.net.SocksSocketImpl.connect(Unknown Source) >> at java.net.Socket.connect(Unknown Source) >> at java.net.Socket.connect(Unknown Source) >> at java.net.Socket.(Unknown Source) >> at java.net.Socket.(Unknown Source) >> at >> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown >> Source) >> at >> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown >> Source) >> ... 11 more >> java.rmi.ConnectException: Connection refused to host: >> localhost; nested exception is: >> java.net.ConnectException: Connection refused: connect >> at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown >> Source) >> at >> sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown >> Source) >> at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown >> Source) >> at sun.rmi.server.UnicastRef.newCall(Unknown Source) >> at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown >> Source) >> at java.rmi.Naming.lookup(Unknown Source) >> at >> org.apache.jackrabbit.rmi.repository.RMIRemoteRepositoryFactory.getRemoteRepository(RMIRemoteRepositoryFactory.java:63) >> at >> org.apache.jackrabbit.rmi.repository.AbstractRemoteRepositoryFactory.getRepository(AbstractRemoteRepositoryFactory.java:59) >> at >> org.apache.jackrabbit.commons.repository.ProxyRepository.login(ProxyRepository.java:100) >> at >> org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:53) >> at it.itkey.repository.TestJCR.main(TestJCR.java:26) >> Caused by: java.net.ConnectException: Connection refused: >> connect >> at java.net.PlainSocketImpl.socketConnect(Native Method) >> at java.net.PlainSocketImpl.doConnect(Unknown Source) >> at java.net.PlainSocketImpl.connectToAddress(Unknown >> Source) >> at java.net.PlainSocketImpl.connect(Unknown Source) >> at java.net.SocksSocketImpl.connect(Unknown Source) >> at java.net.Socket.connect(Unknown Source) >> at java.net.Socket.connect(Unknown Source) >> at java.net.Socket.(Unknown Source) >> at java.net.Socket.(Unknown Source) >> at >> sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown >> Source) >> at >> sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown >> Source) >> ... 11 more >> >> help me please! >> >> >> >> ----- Original Message ----- >> Da : "Todd Seiber" >> A : users@jackrabbit.apache.org >> Oggetto : Re: how to configure files with LoginModule impl >> Data : Tue, 13 Jan 2009 10:36:10 -0500 >> >>> For Jackrabbit you need only to change repository.xml. If >>> your AccessManager and/or LogiModule implementations >>> require any configuration changes you will have to make >>> those too. >>> >>> Example: >>> >>> >>> >> class="x.y.LoginModule"> >>> >>> >>> On Tue, Jan 13, 2009 at 9:46 AM, Alessandro Cosenza < >>> alessandro.cosenza@itkey.it> wrote: >>> >>> > >>> > i have my own LoginModule and AccessManager >>> > implementations. what are properties or files i have to >>> > create? i don't know if i have to modify repository.xml, >>> > or tomcat-related files, or create other config files, >>> > please help me. >>> > >>> > ----- Original Message ----- >>> > Da : "Alessandro Cosenza" >>> > A : users@jackrabbit.apache.org >>> > Oggetto : Re: how to configure files with LoginModule >>> > impl Data : Tue, 13 Jan 2009 14:42:37 +0100 >>> > >>> > > ok but this is the only thing i have to do? >>> > > another question: which value must have the appName >>> > > attribute >>> > > of Security element in repository.xml?which value >>> > > somewhere must corresponds to? >>> > > >>> > > ----- Original Message ----- >>> > > Da : "Alexander Klimetschek" >>> > > A : users@jackrabbit.apache.org >>> > > Oggetto : Re: how to configure files with LoginModule >>> > > impl Data : Tue, 13 Jan 2009 13:20:14 +0100 >>> > > >>> > > > On Tue, Jan 13, 2009 at 11:14 AM, >>> > > > alessandro.cosenza@itkey.it >>> > > > > wrote: hi, i have my >>> > > > > own LoginModule implementation for authentication. >>> > > > > now which files i have to configure with which >>> > > > > entry? i'm using Tomcat 5.5. >>> > > > >>> > > > The LoginModule is configured in the repository.xml. >>> > > > See the website: >>> > > > >>> > > >>> > >>> > >>> >> http://jackrabbit.apache.org/jackrabbit-configuration.html#JackrabbitConfiguration-Securityconfiguration >>> > > > >>> > > > Regards, >>> > > > Alex >>> > > > >>> > > > -- >>> > > > Alexander Klimetschek >>> > > > alexander.klimetschek@day.com >>> > >>> >>> >>> >>> -- >>> Todd Seiber >>> 830 Fishing Creek Rd. >>> New Cumberland, PA 17070 >>> >>> h. 717-938-5778 >>> c. 717-497-1742 >>> e. todd.seiber@gmail.com >>> >> > > > > -- > Alexander Klimetschek > alexander.klimetschek@day.com > -------------------------------------------------------------------------------- Nessun virus nel messaggio in arrivo. Controllato da AVG - http://www.avg.com Versione: 8.0.176 / Database dei virus: 270.10.6/1891 - Data di rilascio: 13/01/2009 8.17