Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D811FD41A for ; Thu, 26 Jul 2012 22:25:06 +0000 (UTC) Received: (qmail 26494 invoked by uid 500); 26 Jul 2012 22:25:06 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 26407 invoked by uid 500); 26 Jul 2012 22:25:05 -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 Delivered-To: moderator for users@jackrabbit.apache.org Received: (qmail 92141 invoked by uid 99); 26 Jul 2012 21:39:13 -0000 X-ASF-Spam-Status: No, hits=3.0 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Date: Thu, 26 Jul 2012 14:38:25 -0700 (PDT) From: director To: users@jackrabbit.apache.org Message-ID: <1343338705701-4656124.post@n4.nabble.com> Subject: problem regarding user creation in jack rabbit MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am using rmi to connect to the jackrabbit. I am using the following code to connect to the jackrabbit. repository = new URLRemoteRepository("http://localhost:8080/rmi"); Session session = repository.login(new SimpleCredentials(admin,admin.toCharArray())); Yes, I can login to the repository and get the admin session with the help of the above code. Now, I want to create jackrabbit normal users. For that I used the following code and it showed the error. UserManager um = ((JackrabbitSession)session).getUserManager(); um.createUser(user.getUserName(), user.getPassword()); The error is : Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.apache.jackrabbit.rmi.client.ClientXASession cannot be cast to org.apache.jackrabbit.api.JackrabbitSession at jack.Repconfautomatic.(Repconfautomatic.java:31) at jack.JackClientController.userCreation(JackClientController.java:50) at jack.User_Registration$1.actionPerformed(User_Registration.java:60) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6268) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6033) at java.awt.Container.processEvent(Container.java:2045) at java.awt.Component.dispatchEventImpl(Component.java:4629) at java.awt.Container.dispatchEventImpl(Container.java:2103) at java.awt.Component.dispatchEvent(Component.java:4455) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227) at java.awt.Container.dispatchEventImpl(Container.java:2089) at java.awt.Window.dispatchEventImpl(Window.java:2517) at java.awt.Component.dispatchEvent(Component.java:4455) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:649) at java.awt.EventQueue.access$000(EventQueue.java:96) at java.awt.EventQueue$1.run(EventQueue.java:608) at java.awt.EventQueue$1.run(EventQueue.java:606) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116) at java.awt.EventQueue$2.run(EventQueue.java:622) at java.awt.EventQueue$2.run(EventQueue.java:620) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105) at java.awt.EventQueue.dispatchEvent(EventQueue.java:619) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177) at java.awt.EventDispatchThread.run(EventDispatchThread.java:138) Could somebody explain me for removing this error and make my code working for adding the normal users. I am roaming around this problem since 2 days and couldn't solve it by my own. Thank you in advance!!! -- View this message in context: http://jackrabbit.510166.n4.nabble.com/problem-regarding-user-creation-in-jack-rabbit-tp4656124.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.