jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsp_ <piccina...@ibest.com.br>
Subject Re: Problem with DbFileSystem and SimpleDbPersistenceManager
Date Thu, 28 Sep 2006 20:18:49 GMT

I think have misunderstanding this post.
I am in trouble with persistence (see my last post) and when saw this
message, I thougth that it would be an alternative to configuration.
I understood that in my repository.xml, the datasources would (should?!)
have one dbshema per each (workspace, repository, versioning e
persistences). So I have configured my repository.xml like this:
<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
       <param name="dataSourceLocation"
value="java:jdbc/EscribaRepositorioDS"/>
	   <param name="driver" value="org.postgresql.Driver"/>
       <param name="schema" value="postgresql"/> 
	   <param name="schemaObjectPrefix" value="rep_"/>
	</FileSystem>
    <Security appName="Jackrabbit">
        <AccessManager
class="gov.pr.celepar.escriba.server.seguranca.Seguranca">
        </AccessManager>

        <LoginModule
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
        </LoginModule>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"
/>
    <Workspace name="${wsp.name}">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
	       <param name="dataSourceLocation"
value="java:jdbc/EscribaWorkspaceDS"/>
		   <param name="driver" value="org.postgresql.Driver"/>
	       <param name="schema" value="postgresql"/> 
		   <param name="schemaObjectPrefix" value="${wsp.name}_"/>
		</FileSystem>
		<PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
	       <param name="dataSourceLocation"
value="java:jdbc/EscribaPersistenciaWorkspaceDS"/>
		   <param name="driver" value="org.postgresql.Driver"/>
	       <param name="schema" value="postgresql"/> 
		   <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"/>
            <param name="useCompoundFile" value="true"/>
            <param name="minMergeDocs" value="100"/>
            <param name="volatileIdleTime" value="3"/>
            <param name="maxMergeDocs" value="100000"/>
            <param name="mergeFactor" value="10"/>
            <param name="bufferSize" value="10"/>
            <param name="cacheSize" value="1000"/>
            <param name="forceConsistencyCheck" value="false"/>
            <param name="autoRepair" value="true"/>
            <param name="analyzer"
value="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
            <param name="queryClass"
value="org.apache.jackrabbit.core.query.QueryImpl"/>
            <param name="idleTime" value="-1"/>
            <param name="respectDocumentOrder" value="false"/>
            <param name="textFilterClasses"
value="org.apache.jackrabbit.core.query.MsExcelTextFilter,org.apache.jackrabbit.core.query.MsPowerPointTextFilter,org.apache.jackrabbit.core.query.MsWordTextFilter,org.apache.jackrabbit.core.query.PdfTextFilter,org.apache.jackrabbit.core.query.HTMLTextFilter,org.apache.jackrabbit.core.query.XMLTextFilter,org.apache.jackrabbit.core.query.RTFTextFilter,org.apache.jackrabbit.core.query.OpenOfficeTextFilter"
/>
        </SearchIndex>
        
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
	       <param name="dataSourceLocation"
value="java:jdbc/EscribaVersionamentoDS"/>
		   <param name="driver" value="org.postgresql.Driver"/>
	       <param name="schema" value="postgresql"/> 
		   <param name="schemaObjectPrefix" value="version_"/>
		</FileSystem>
        <PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
	       <param name="dataSourceLocation"
value="java:jdbc/EscribaPersistenciaVersionamentoDS"/>
		   <param name="driver" value="org.postgresql.Driver"/>
	       <param name="schema" value="postgresql"/> 
		   <param name="schemaObjectPrefix" value="version_"/>
		   <param name="externalBLOBs" value="false"/>
		</PersistenceManager>
    </Versioning>
    <SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
    </SearchIndex>
</Repository> 

As you could see, I put distinct values in the datasource location. But the
repository doesn't find a table rep_fsentry.
So I changed the repository.xml to the same value in all datasource location
and the repository gets back in inicialization (creating the tables in the
schema).
Is it the way you intend to do, or this way will never works and I
misunderstood the messages?

Again, I am in trouble with persistence in postgresql, as I posted in
another thread in this forum, and any alternative to mount a diferent
dbpersistence is valid. Please, analise my repository.xml and let me know
about my issues.

Thanks.
Helio



Rakesh Midha-2 wrote:
> 
> Thanks Stefan
> 
> You are right, my mistake.
> 
> thanks
> Rakesh
> 
> On 9/28/06, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
>>
>> hi rakesh,
>> the problem is that all your persistence managers and file systems
>> are using the same schemaObjectPrefix (i.e. "myDB_").
>>
>> every db persistence manager and every db file system should
>> use distinct values for schemaObjectPrefix.
>>
>> cheers
>> stefan
>>
>>
>> On 9/27/06, Rakesh Midha <midha.rakesh@gmail.com> wrote:
>> > 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.xmlwith
>> > 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
>> >
>> >
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-DbFileSystem-and-SimpleDbPersistenceManager-tf2345144.html#a6553929
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message