jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hsp" <piccina...@ibest.com.br>
Subject Example working with PM
Date Thu, 02 Mar 2006 14:26:37 GMT
Hi;
This is my first post in this forum, sorry if the question is too basic for you.
I have had code with the examples in the site, but only the persistence by filesystem worked,
I try to do in repository.xml the section:
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default" />
   <Workspace name="${wsp.name}">
       <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
           <param name="path" value="${wsp.home}"/>
       </FileSystem>
<!--  <PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager"
/> -->
     <PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
      <param name="driver" value="org.postgresql.Driver"/>
      <param name="url" value="jdbc:postgresql://localhost/test"/>
<!--  <param name="schema" value="postgresql"/> -->
       <param name="schema" value="public"/>
    <param name="user" value="postgres"/>
    <param name="password" value="postgres"/>
    <param name="schemaObjectPrefix" value="${wsp.name}_"/>
      <param name="externalBLOBs" value="false"/>
      </PersistenceManager>
       <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
           <param name="path" value="${wsp.home}/index"/>
       </SearchIndex>
   </Workspace>

But the code FirstHop.java doesn't work. That's the errors:

log4j:WARN No appenders could be found for logger (org.apache.jackrabbit.core.fs.local.LocalFileSystem).
log4j:WARN Please initialize the log4j system properly.
javax.jcr.RepositoryException: Cannot instantiate persistence manager org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager:
org.postgresql.Driver: org.postgresql.Driver
    at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1005)
    at org.apache.jackrabbit.core.RepositoryImpl.access$500(RepositoryImpl.java:82)
    at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1483)
    at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:498)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:243)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:479)
    at org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:131)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:225)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:258)
    at FirstHop.main(FirstHop.java:26)
Caused by: java.lang.ClassNotFoundException: org.postgresql.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.init(SimpleDbPersistenceManager.java:295)
    at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1001)
    ... 9 more
java.lang.ClassNotFoundException: org.postgresql.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager.init(SimpleDbPersistenceManager.java:295)
    at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1001)
    at org.apache.jackrabbit.core.RepositoryImpl.access$500(RepositoryImpl.java:82)
    at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1483)
    at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:498)
    at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:243)
    at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:479)
    at org.apache.jackrabbit.core.TransientRepository$1.getRepository(TransientRepository.java:131)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:225)
    at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:258)
    at FirstHop.main(FirstHop.java:26)

Could anyone help me with this? I already search the list but without sucess.
I want to build a repository with a db persistence, and the file system for the contents and
indexes.
Tks in adv.

Mime
View raw message