jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Midha" <midha.rak...@gmail.com>
Subject Problem with DbFileSystem and SimpleDbPersistenceManager
Date Wed, 27 Sep 2006 14:40:32 GMT
Hello

I am creating new repository with following to store all my data to derby
database.

I created database myDB5 and created following tables and indexes in it:
index myDB_NODE_IDX;
index myDB_PROP_IDX;
index myDB_REFS_IDX;
index myDB_BINVAL_IDX;
table myDB_NODE;
table myDB_PROP;
table myDB_REFS;
table myDB_BINVAL;

Also in my jcr-repository I have usuall jaas.config and repository.xml with
following cnfigurations
<?xml version="1.0" encoding="ISO-8859-1"?>
<Repository>
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
        </FileSystem>
    <Security appName="Jackrabbit">
        <AccessManager class="
org.apache.jackrabbit.core.security.SimpleAccessManager"/>
    </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.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
        </FileSystem>
    <PersistenceManager class="
org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
        <SearchIndex class="
org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>
    <Versioning rootPath="${rep.home}/versions">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
        </FileSystem>
    <PersistenceManager class="
org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
    </Versioning>
</Repository>

Notice all persistancemanagers are configured to SimpleDbPersistenceManager
and all filesystems to DbFileSystem

Also in my repository\workspaces\default\workspace.xml
I added
<?xml version="1.0" encoding="UTF-8"?>
<Workspace name="default">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
        </FileSystem>
    <PersistenceManager class="
org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
        <param name="driver" value="org.apache.derby.jdbc.ClientDriver"/>
        <param name="url"
value="jdbc:derby://localhost:1527/myDB5;user=usr;create=true"/>
        <param name="schemaObjectPrefix" value="myDB_"/>
        <param name="user" value="usr"/>
        <param name="password" value="usr"/>
        <param name="externalBLOBs" value="false"/>
    </PersistenceManager>
    </Workspace>

...........................................
Now I am getting the problem

javax.jcr.ItemNotFoundException:
deadbeef-cafe-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1.0}primaryType

Caused by: javax.jcr.ItemNotFoundException:
deadbeef-cafe-babe-cafe-babecafebabe/{http://www.jcp.org/jcr/1.0}primaryType
	at org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:464)
	at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
	at org.apache.jackrabbit.core.ItemImpl.restoreTransientItems(ItemImpl.java:708)
	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1208)
	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:529)
	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:244)
	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:483)
	at org.apache.cocoon.jcr.JackrabbitRepository.configure(JackrabbitRepository.java:94)


Can someone help me with this and let me know if this is allowed...can
i store everything in database.

If allowed what am I doing wrong>

thanks
Rakesh

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message