jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richa <richasharma...@gmail.com>
Subject Cannot instantiate persistence manager
Date Fri, 26 Mar 2010 09:50:06 GMT

hello users,
iam working on the jackrabbit 1.5.6 on tomcat sever and linux operating
system iam able to do the authentication part to sum extend as my repositoy
is running properly and iam able to login through the repository and wedav
by*testUser and *testPassword* only(iam following the jaas documentation)
but i hav done my coding part on net beans..now weneva i try to complie and
run my code ..i enter the admin page by entering the root id and root
password then when i login as a new user  
say *Richa*  i get the below error although i am able to login by testUser
and testPassword only wen i click on the link
http://localhost:8080/jackrabbit-webapp-1.5.6/repository/default/ that mean
iam getting the authentication part then why do iam getting error in
netbeans
PLS HAV A LOOK
log4j:WARN No appenders could be found for logger
(org.apache.jackrabbit.core.util.RepositoryLock).
log4j:WARN Please initialize the log4j system properly.
reached to repsitory 1
2
reached sim()
Mar 26, 2010 11:44:32 AM 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:76)
        at org.apache.jackrabbit.core.JLogin.actionPerformed(JLogin.java:91)
        at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
my code is
 public void sim() {
        try {
               System.out.println("reached to repsitory a");
            RepositoryImpl rp = new
RepositoryImpl(RepositoryConfig.create("repository.xml",
"/home/ksk/ric/testing/apache-tomcat-6.0.24/bin/jackrabbit/"));
            System.out.println("reached to repsitory 1");
            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");
            UserManagerImpl usmg = new UserManagerImpl(impl, "richa");
            usmg.show();
         
and my repository.xml file is

<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD
Jackrabbit 1
.5//EN"
                           
"http://jackrabbit.apache.org/dtd/repository-1.5.dtd
">
<!-- Example Repository Configuration File
     Used by
     - org.apache.jackrabbit.core.config.RepositoryConfigTest.java
     -
-->
<Repository>
    <!--
        virtual file system where the repository stores global state
        (e.g. registered namespaces, custom node types, etc.)
    -->
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        
    </FileSystem>

    <!--
        security configuration
    -->
    <Security appName="Jackrabbit">
 <!--
            security manager:
            class: FQN of class implementing the JackrabbitSecurityManager
interface
        -->
        <SecurityManager
class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager"
workspaceName="security">
            <!--
            workspace access:
            class: FQN of class implementing the WorkspaceAccessManager
interface
            -->
            <!-- <WorkspaceAccessManager class="..."/> -->
            <!--  -->
        </SecurityManager>

        <!--
            access manager:
            class: FQN of class implementing the AccessManager interface
        -->
        <AccessManager class="auth.SimpleAccessManager">
            <!--  -->
        </AccessManager>
 <LoginModule class="sample.module.SampleLoginModule">
           <!--
              anonymous user name ('anonymous' is the default value)

           

              administrator user id (default value if param is missing is
'admin')

             -->
        </LoginModule>
    </Security>

    <!--
        location of workspaces root directory and name of default workspace
    -->
    <Workspaces rootPath="${rep.home}/workspaces"
defaultWorkspace="default"/>
    <!--
        workspace configuration template:
        used to create the initial workspace if there's no workspace yet
    -->
    <Workspace name="${wsp.name}">
  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
        -->
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle
.DerbyPersistenceManager">
          
          
        </PersistenceManager>
        <!--
            Search index and the file system it uses.
            class: FQN of class implementing the QueryHandler interface
        -->
        <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex"
>
            
  
            
            
        </SearchIndex>
    </Workspace>

    <!--
        Configures the versioning
    -->
    <Versioning rootPath="${rep.home}/version">
        <!--
            Configures the filesystem to use for versioning for the
respective
            persistence manager
        -->
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            
 </FileSystem>

        <!--
            Configures the persistence manager to be used for persisting
version state.
            Please note that the current versioning implementation is based
on
            a 'normal' persistence manager, but this could change in future
            implementations.
        -->
        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager">
          
          
        </PersistenceManager>
    </Versioning>

    <!--
        Search index for content that is shared repository wide
        (/jcr:system tree, contains mainly versions)
    -->
    <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        
  
        
        
    </SearchIndex>
</Repository>

now pls can any one help me with the error
whr iam wrong??
thanx in advance
regards
Richa Sharma

-- 
View this message in context: http://n4.nabble.com/Cannot-instantiate-persistence-manager-tp1691917p1691917.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message