You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Robert Staudinger <ro...@salzburgresearch.at> on 2006/04/26 17:36:30 UTC

Jackrabbit with PostgreSQL

Hello,

i've built a small standalone application that with jackrabbit. As long 
as i'm using the DerbyPersistenceManager things work fine but after 
switching over to the SimpleDb one (with PostgreSQL) my repository seems 
to be write-only (using a privileged accout that lets me modify data in 
pgAdmin just fine).

The PersistenceManager definition is lifted from the SimpleDbP.M. javadocs:

         <PersistenceManager 
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
             <param name="driver" value="org.postgresql.Driver"/>
             <param name="url" value="jdbc:postgresql:jackrabbit"/>
             <param name="schema" value="postgresql"/>
             <param name="user" value="*****"/>
             <param name="password" value="*****"/>
             <param name="schemaObjectPrefix" value="${wsp.name}_"/>
             <param name="externalBLOBs" value="false"/>
         </PersistenceManager>	

Same for the versioning P.M. The database "jackrabbit" exists too and i 
can connect to the repository just fine. Only when changing data (adding 
nodes) i get the following exception:

javax.jcr.AccessDeniedException: /: not allowed to modify item at 
org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.java:491)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1165)
at [application code]

What i'm trying to do here is attaching a child node to the root node. 
It works fine with Derby.

Thanks for any advice,
Rob

Re: Jackrabbit with PostgreSQL

Posted by Robert Staudinger <ro...@salzburgresearch.at>.
Stefan Guggisberg wrote:

[...]

> have you configured a custom LoginModule/AccessManager?
> if not you've probably specified the anonymous user id when loggin in.
> please not the exception thrown is unrelated to the choice of persistence
> manager.

That's it, thanks!
- Rob

Re: Jackrabbit with PostgreSQL

Posted by Stefan Guggisberg <st...@gmail.com>.
hi rob,

On 4/26/06, Robert Staudinger <ro...@salzburgresearch.at> wrote:
> Hello,
>
> i've built a small standalone application that with jackrabbit. As long
> as i'm using the DerbyPersistenceManager things work fine but after
> switching over to the SimpleDb one (with PostgreSQL) my repository seems
> to be write-only (using a privileged accout that lets me modify data in
> pgAdmin just fine).
>
> The PersistenceManager definition is lifted from the SimpleDbP.M. javadocs:
>
>          <PersistenceManager
> class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
>              <param name="driver" value="org.postgresql.Driver"/>
>              <param name="url" value="jdbc:postgresql:jackrabbit"/>
>              <param name="schema" value="postgresql"/>
>              <param name="user" value="*****"/>
>              <param name="password" value="*****"/>
>              <param name="schemaObjectPrefix" value="${wsp.name}_"/>
>              <param name="externalBLOBs" value="false"/>
>          </PersistenceManager>
>
> Same for the versioning P.M. The database "jackrabbit" exists too and i
> can connect to the repository just fine. Only when changing data (adding
> nodes) i get the following exception:
>
> javax.jcr.AccessDeniedException: /: not allowed to modify item at
> org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.java:491)
> at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1165)
> at [application code]
>
> What i'm trying to do here is attaching a child node to the root node.
> It works fine with Derby.

have you configured a custom LoginModule/AccessManager?
if not you've probably specified the anonymous user id when loggin in.
please not the exception thrown is unrelated to the choice of persistence
manager.

cheers
stefan

>
> Thanks for any advice,
> Rob
>