jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Anescu" <mane...@totalsoft.ro>
Subject How to correctly configure JR with PostgreSQL?
Date Fri, 06 Jul 2007 14:37:21 GMT
Hello,

So, we want to configure JR to work with a Postgres DB.

I looked into the JR site, found some doc, also in the
SimpleDbPersistenceManager javadoc, I got this configuration:

The following is a fragment from a sample configuration using
PostgreSQL: 
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceMana
ger>
       <param name="driver" value="org.postgresql.Driver"/>
       <param name="url" value="jdbc:postgresql://localhost/test"/>
       <param name="schema" value="postgresql"/>
       <param name="user" value="postgres"/>
       <param name="password" value="postgres"/>
       <param name="schemaObjectPrefix" value="${wsp.name}_"/>
       <param name="externalBLOBs" value="false"/>
</PersistenceManager>

I also read the part about the repository, now I have this part (which
works, after a few failed attempts, read bellow):

    <Workspace name="${wsp.name}">
        <!--
            virtual file system of the workspace:
            class: FQN of class implementing the FileSystem interface
        -->
        <FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <!--
            persistence manager of the workspace:
            class: FQN of class implementing the PersistenceManager
interface
        -->

		<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceMana
ger">
			   <param name="driver"
value="org.postgresql.Driver"/>
			   <param name="url"
value="jdbc:postgresql://localhost:5432/scrap"/>
			   <param name="schema" value="postgresql"/>
			   <param name="user" value="user"/>
			   <param name="password" value="password"/>
			   <param name="schemaObjectPrefix"
value="${wsp.name}_"/>
			   <param name="externalBLOBs" value="false"/>
		</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">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>
    </Workspace>

Now starts the questions & problems:
1) Why do I also need a FileSystem repository? Is this the way that JR
is buit? What gets stored in the DB and what in the FS?
2) The schema mentioned in the sample and in my working version
('postgresql') does not exist. It is using the default ('public') schema
of the scrap DB.
3) If I put another schema (I tried 'repository') I get an error: schema
does not exist (I created it by hand before launching the server)
4) If I use another value for schemaObjectPrefix (I tried 'jr_'), I get
another error: SimpleDbPersistenceManager: ERROR: type "varbinary" does
not exist.
5) If I try another url value
('jdbc:postgresql://localhost:5432/scrap?repository') I get the same
error as for number 4.

Are these known bugs? Is there another way to use the DB to store the
repository? I would like to use another schema (only for JR), since the
public one is used by another application.

Any help appreciated...

Regards,
Mihai


Mime
View raw message