Hi,

The documentation describes how to add a *new* repository. If you just want to change the existing one, just go change the config/ default-repository-config.xml file. And remove the previous Jackrabbit database in server/default/data/NXRuntime/repos/default.

Florent

On 25 Jul 2007, at 15:44, Bosser, Frederic wrote:

Hi

I would like to change the 5.1.0.SNAPSHOT (2007/07/17) installation to use a PostgreSQL database as repository. I followed the HOWTO as described in chapter 20.4.1. "Configure Nuxeo Core storage" in the Nuxeo book, but I can't get it to work. I read in another email that this "How to " doen't work with Nuxeo 5.1.0.M3, but with the snapshot of the 2007/07/17? Here's what I did: * I'm using PostgreSQL-8.2.4 on the same machine which is running nuxeo. I have copied the .jar file in $JBOSS_HOME/server/default/lib * I have the postgresql-8.2-505.jdbc3.jar file installed in $JBOSS_HOME/server/ default/lib * I created a user "postgres" owning database "nuxeo" in the PostgreSQL RDBMS. The PostgreSQL default schema is "public"* I created file $JBOSS_HOME/server/default/deploy/nuxeo.ear/config/ MyRepo-repository-config.xml with the following content:
<?xml version="1.0"?>

<component name="org.nuxeo.project.sample.repository.MyRepo">

<extension target="org.nuxeo.ecm.core.repository.RepositoryService" point="repository">

<repository name="MyRepo" factory="org.nuxeo.ecm.core.repository.jcr.JCRRepositoryFactory" securityManager="org.nuxeo.ecm.core.repository.jcr.JCRSecurityManager" forceReloadTypes="false">

<Repository>

<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">

<param name="path" value="${rep.home}/repository"/>

</FileSystem>

<Security appName="Jackrabbit">

<AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">

</AccessManager>

<LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">

<param name="anonymousId" value="anonymous"/>

</LoginModule>

</Security>

<!-- Workspaces configuration. Nuxeo only uses the default workspace. -->

<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>

<Workspace name="${wsp.name}">

<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">

<param name="path" value="${wsp.home}"/>

</FileSystem>

<PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager" >

<param name="driver" value="org.postgresql.Driver"/>

<param name="url" value="jdbc:postgresql://localhost/nuxeo"/>

<param name="user" value="postgres"/>

<param name="password" value="password"/>

<param name="schema" value="postgresql"/>

<param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/>

<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 configuration. -->

<Versioning rootPath="${rep.home}/version">

<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">

<param name="path" value="${rep.home}/version"/>

</FileSystem>

<PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager" >

<param name="driver" value="org.postgresql.Driver"/>

<param name="url" value="jdbc:postgresql://localhost/nuxeo"/>

<param name="user" value="postgres"/>

<param name="password" value="password"/>

<param name="schema" value="postgresql"/>

<param name="schemaObjectPrefix" value="jcr_ver_"/>

<param name="externalBLOBs" value="false"/>

</PersistenceManager>

</Versioning>

<!-- Index for repository-wide information, mainly versions. -->

<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">

<param name="path" value="${rep.home}/repository/index"/>

</SearchIndex>

</Repository>

</repository>

</extension>

</component>




I created file $JBOSS_HOME/server/default/deploy/nuxeo.ear/config/ MyPlatform-Layout-config.xml with the following content:
<?xml version="1.0"?>

<component name="MyPlatformLayout">

<require>org.nuxeo.ecm.platform.api.DefaultPlatform</require>

<extension target="org.nuxeo.ecm.platform.util.LocationManagerService" point="location">

<locationManagerPlugin>

<!-- This disable the default (demo) repository -->

<locationEnabled>false</locationEnabled>

<locationName>demo</locationName>

</locationManagerPlugin>

<locationManagerPlugin>

<!-- This enable your new repository -->

<locationEnabled>true</locationEnabled>

<locationName>MyRepo</locationName>

<!-- Use the name of your repository -->

</locationManagerPlugin>

</extension>

<extension target="org.nuxeo.ecm.core.api.repository.RepositoryManager" point="repositories">

<documentation>The default repository</documentation>

<repository name="MyRepo" label="My Repository"/>

</extension>

<extension target="org.nuxeo.runtime.api.ServiceManagement" point="services">

<service class="org.nuxeo.ecm.core.api.CoreSession" name="MyRepo" group="core">

<locator>%DocumentManagerBean</locator>

</service>

</extension>

</component>


* I started JBOSS and got the following errors and exceptions:

[....]

15:31:21,658 ERROR [URLDeploymentScanner] Incomplete Deployment listing:



--- MBeans waiting for other MBeans ---

ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=NXRepository/MyRepo

  State: FAILED

Reason: org.jboss.deployment.DeploymentException: Could not create ConnectionF

actory for adapter: jboss.jca:service=TxCM,name=NXRepository/MyRepo

  I Depend On:

    jboss.jca:service=TxCM,name=NXRepository/MyRepo



--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---

ObjectName: jboss.jca:service=ConnectionFactoryBinding,name=NXRepository/MyRepo

  State: FAILED

Reason: org.jboss.deployment.DeploymentException: Could not create ConnectionF

actory for adapter: jboss.jca:service=TxCM,name=NXRepository/MyRepo

  I Depend On:

    jboss.jca:service=TxCM,name=NXRepository/MyRepo



* When I run Nuxeo and I connect, 2 available repostories are shown on the page:

- My Repo

- Default


*Then when I click on "My Repo", I get the error:

org.nuxeo.ecm.core.api.ClientException: No such repository 'Failed to lookup repository: MyRepo


Any idea? Did I make a mistake?Is that example in the Nuxeo book wrong?

Is there an example using PostgreSQL as repository (not in the Nuxeo book)?


Thanks


Frederic

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

--
Florent Guillaume, Director of R&D, Nuxeo
Open Source Enterprise Content Management (ECM)
http://www.nuxeo.com   http://www.nuxeo.org   +33 1 40 33 79 87



_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm

Reply via email to