jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Byrne <step...@lincware.com>
Subject Error starting bundled repository 2nd time
Date Tue, 15 May 2012 14:33:52 GMT
I am trying to bundle Jackrabbit but always get an exception loading the 
root node ID on the 2nd start. Is there something wrong with my approach?

java code:

home = new File( 'jackrabbit' )
home.mkdirs()
rc = RepositoryConfig.create( new FileInputStream( 'repository.xml' ), 
home.getAbsolutePath() )
repo = RepositoryImpl.create( rc )
repo.shutdown()
rc = RepositoryConfig.create( new FileInputStream( 'repository.xml' ), 
home.getAbsolutePath() )
repo = RepositoryImpl.create( rc )
repo.shutdown()

repository.xml:

<?xml version="1.0"?>
<!DOCTYPE Repository
   PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN"
   "http://jackrabbit.apache.org/dtd/repository-2.0.dtd">
<Repository>
   <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
     <param name="driver" value="org.postgresql.Driver" />
     <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
     <param name="schema" value="postgresql" />
     <param name="schemaObjectPrefix" value="fs_" />
     <param name="schemaCheckEnabled" value="true" />
   </FileSystem>
   <DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
     <param name="driver" value="org.postgresql.Driver" />
     <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
     <param name="databaseType" value="postgresql" />
     <param name="schemaObjectPrefix" value="ds_" />
     <param name="schemaCheckEnabled" value="true" />
   </DataStore>
   <Security appName="Jackrabbit">
     <SecurityManager 
class="org.apache.jackrabbit.core.security.simple.SimpleSecurityManager" 
workspaceName="security" />
     <AccessManager 
class="org.apache.jackrabbit.core.security.simple.SimpleAccessManager" />
     <LoginModule 
class="org.apache.jackrabbit.core.security.simple.SimpleLoginModule">
        <param name="anonymousId" value="anonymous"/>
        <param name="adminId" value="admin"/>
     </LoginModule>
   </Security>
   <Workspaces rootPath="${rep.home}/workspaces" 
defaultWorkspace="default"/>
   <Workspace name="${wsp.name}">
     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
       <param name="driver" value="org.postgresql.Driver" />
       <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
       <param name="schema" value="postgresql" />
       <param name="schemaObjectPrefix" value="fs__${wsp.name}_" />
       <param name="schemaCheckEnabled" value="true" />
     </FileSystem>
     <PersistenceManager class= 
"org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager" >
       <param name="driver" value="org.postgresql.Driver" />
       <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
       <param name="databaseType" value="postgresql" />
       <param name="schemaObjectPrefix" value="pm__${wsp.name}_" />
       <param name="schemaCheckEnabled" value="true" />
     </PersistenceManager>
     <SearchIndex 
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
       <param name="path" value="${wsp.home}/index"/>
       <param name="supportHighlighting" value="true"/>
     </SearchIndex>
   </Workspace>
   <Versioning rootPath="${rep.home}/version">
     <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
       <param name="driver" value="org.postgresql.Driver" />
       <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
       <param name="schema" value="postgresql" />
       <param name="schemaObjectPrefix" value="version_fs_" />
       <param name="schemaCheckEnabled" value="true" />
     </FileSystem>
     <PersistenceManager class= 
"org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager">
       <param name="driver" value="org.postgresql.Driver" />
       <param name="url" value="jdbc:postgresql://lw3sb2/ldjr" />
     <param name="user" value="ldjr" /><param name="password" 
value="test" />
       <param name="databaseType" value="postgresql" />
       <param name="schemaObjectPrefix" value="version_pm_" />
       <param name="schemaCheckEnabled" value="true" />
     </PersistenceManager>
   </Versioning>
   <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
     <param name="path" value="${rep.home}/repository/index"/>
     <param name="supportHighlighting" value="true"/>
   </SearchIndex>
</Repository>

And the error, from the second RepositoryImpl.create(rc) call:

java.lang.IllegalArgumentException: 
3616665626162652d636166652d626162652d636166652d626162656361666562616265
         at org.apache.jackrabbit.core.id.NodeId.<init>(NodeId.java:129)
         at org.apache.jackrabbit.core.id.NodeId.valueOf(NodeId.java:52)
         at 
org.apache.jackrabbit.core.RepositoryImpl.loadRootNodeId(RepositoryImpl.java:552)
         at 
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:265)
         at 
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:589)
         at 
org.apache.jackrabbit.core.RepositoryImpl$create.call(Unknown Source)
         at test.run(test.groovy:17)


-- 
Stephen Byrne
stephen@lincware.com

Mime
View raw message