jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anand <simer.anan...@gmail.com>
Subject Re: Derby
Date Tue, 08 Dec 2009 09:55:35 GMT

Hello Users, 

The derby problem was resolved. Now before stating another issue i want you
to have a look on my code below.

code:


            RepositoryImpl rp = new
RepositoryImpl(RepositoryConfig.create("repository.xml",
"/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit"));
            System.out.println("reached to repsitory 1");
            //Subject sbj = new Subject();
            //@SuppressWarnings("static-access")
            Subject sb = Subject.getSubject(AccessController.getContext());
            System.out.println("2");
            SessionImpl impl = rp.createSession(sb, "default");
            System.out.println("3");
            rp.onSessionCreated(impl);
            System.out.println("4");
            new FirstHop(impl, "simer");
        // usermanagerimpl.show();
        } catch ( RepositoryException ex) {
            Logger.getLogger(FirstHop.class.getName()).log(Level.SEVERE,
null, ex);
        } 

here you can see i was trying to create new session 

when i executed my code then stack trace followed. Repository was started .
but as soon as it reaches the createSession(sb, "default"); it starts
complaining. 
Here 'sb' is the authenticated subject and 'default' is the default
workspace.

here follows the stack trace.

compile-single:
run-single:

122023 [AWT-EventQueue-0] WARN
org.apache.jackrabbit.core.util.RepositoryLock - Existing lock file
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/.lock
detected. Repository was not shut down properly.
122075 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
Starting repository...
122271 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/repository
123585 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.nodetype.NodeTypeRegistry - no custom node type
definitions found
123673 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/version
129521 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.2.1.6 - (452058)
129533 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.2.1.6 - (452058)
134578 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
initializing workspace 'default'...
134588 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/default
135405 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.2.1.6 - (452058)
135413 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.2.1.6 - (452058)
138919 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/repository/index
140710 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.query.lucene.SearchIndex - Index initialized:
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/repository/index
Version: 3
140767 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/default/index
143801 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.query.lucene.SearchIndex - Index initialized:
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/default/index
Version: 3
143809 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
workspace 'default' initialized
143815 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
Repository started
reached to repsitory 1
2
143846 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
initializing workspace 'security'...
143854 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/security
144761 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Database: Apache Derby / 10.2.1.6 - (452058)
144768 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager
- Driver: Apache Derby Embedded JDBC Driver / 10.2.1.6 - (452058)
145554 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.fs.local.LocalFileSystem - LocalFileSystem
initialized at path
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/security/index
145620 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.query.lucene.SearchIndex - Index initialized:
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/bin/jackrabbit/workspaces/security/index
Version: 3
145629 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
workspace 'security' initialized
145978 [AWT-EventQueue-0] INFO
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager - init:
using Repository LoginModule configuration for Jackrabbit
146036 [AWT-EventQueue-0] INFO org.apache.jackrabbit.core.RepositoryImpl -
SecurityManager = class
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager
reached sim()
Dec 8, 2009 2:41:38 PM org.apache.jackrabbit.core.JLogin actionPerformed
SEVERE: null
java.lang.NullPointerException
        at
org.apache.jackrabbit.core.security.simple.SimpleSecurityManager.getUserID(SimpleSecurityManager.java:226)
        at
org.apache.jackrabbit.core.SessionImpl.retrieveUserId(SessionImpl.java:296)
        at
org.apache.jackrabbit.core.SessionImpl.<init>(SessionImpl.java:276)
        at
org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:117)
        at
org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1474)
        at
org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:972)
        at org.apache.jackrabbit.core.FirstHop.sim(FirstHop.java:69)
        at org.apache.jackrabbit.core.JLogin.actionPerformed(JLogin.java:95)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      
BUILD SUCCESSFUL (total time: 20 minutes 9 seconds)


Thanks,
simer
-- 
View this message in context: http://n4.nabble.com/Derby-tp955014p955118.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message