Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
evan cheung
how to configure jackrabbit with mysql
April 21, 2009 1:58 PM
Answer

evan cheung

Rank: Junior Member

Posts: 81

Join Date: April 17, 2008

Recent Posts

Hi all,

I am trying to configure jackrabbit to use with mysql but got the following error message:

javax.jcr.RepositoryException: Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager: Could not load class org.apache.derby.jdbc.EmbeddedDriver: org.apache.derby.jdbc.EmbeddedDriver: Could not load class org.apache.derby.jdbc.EmbeddedDriver: org.apache.derby.jdbc.EmbeddedDriver: org.apache.derby.jdbc.EmbeddedDriver

I am using portal version 5.01 and my here's my repository.xml. Please tell me what's wrong and why I am getting this error.

<?xml version="1.0"?>

<Repository>
<!--<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository" />
</FileSystem>
-->
<!--
Database File System (Cluster Configuration)

This is sample configuration for mysql persistence that can be used for
clustering Jackrabbit. For other databases, change the connection,
credentials, and schema settings.
-->

<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost" />
<param name="user" value="root" />
<param name="password" value="*****" />
<param name="schema" value="lportal"/>
<param name="schemaObjectPrefix" value="J_R_FS_"/>
</FileSystem>

<Security appName="Jackrabbit">
<AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager" />
<LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
<param name="anonymousId" value="anonymous" />
</LoginModule>
</Security>
<Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="liferay" />
<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.persistence.bundle.BundleFsPersistenceManager" />
-->
<!--
Database File System and Persistence (Cluster Configuration)

This is sample configuration for mysql persistence that can be used for
clustering Jackrabbit. For other databases, change the connection,
credentials, and schema settings.
-->

<PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver" />
<param name="url" value="jdbc:mysql://localhost" />
<param name="user" value="root" />
<param name="password" value="*****" />
<param name="schema" value="lportal" />
<param name="schemaObjectPrefix" value="J_PM_${wsp.name}_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost" />
<param name="user" value="root" />
<param name="password" value="mnhs323" />
<param name="schema" value="lportal"/>
<param name="schemaObjectPrefix" value="J_FS_${wsp.name}_"/>
</FileSystem>
</Workspace>
<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.persistence.bundle.BundleFsPersistenceManager" />
-->
<!--
Database File System and Persistence (Cluster Configuration)

This is sample configuration for mysql persistence that can be used for
clustering Jackrabbit. For other databases, change the connection,
credentials, and schema settings.
-->

<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost" />
<param name="user" value="root" />
<param name="password" value="*****" />
<param name="schema" value="lportal"/>
<param name="schemaObjectPrefix" value="J_V_FS_"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver" />
<param name="url" value="jdbc:mysql://localhost" />
<param name="user" value="root" />
<param name="password" value="*******" />
<param name="schema" value="lportal" />
<param name="schemaObjectPrefix" value="J_V_PM_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>
</Versioning>

<!--
Cluster Configuration

This is sample configuration for mysql persistence that can be used for
clustering Jackrabbit. For other databases, change the connection,
credentials, and schema settings.
-->

<!--<Cluster id="node_1" syncDelay="5">
<Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
<param name="revision" value="${rep.home}/revision"/>
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost/jcr"/>
<param name="user" value=""/>
<param name="password" value=""/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="J_C_"/>
</Journal>
</Cluster>-->
</Repository>

thanks,
Evan
Amos Fong
RE: how to configure jackrabbit with mysql
April 21, 2009 3:07 PM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1912

Join Date: October 7, 2008

Recent Posts

Hey Evan,

Does workspaces.xml look correct?

Maybe try this:

Rename jackrabbit dir to jackrabbit.bak, then restart, and a new jackrabbit dir will be created. Then modify that repository.xml file.


from wiki:http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Hooking+up+Jackrabbit+to+use+a+database+rather+than+the+file+system
evan cheung
RE: how to configure jackrabbit with mysql
April 21, 2009 6:36 PM
Answer

evan cheung

Rank: Junior Member

Posts: 81

Join Date: April 17, 2008

Recent Posts

Hi,

I tried all that...but still doesn't work. It seems like it couldn't find the driver class:

Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager: Could not load class org.apache.derby.jdbc.EmbeddedDriver: org.apache.derby.jdbc.EmbeddedDriver

thanks,
Evan
Amos Fong
RE: how to configure jackrabbit with mysql
April 24, 2009 10:20 AM
Answer

Amos Fong

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1912

Join Date: October 7, 2008

Recent Posts

Strange, why is it trying to load a derby driver when you're specifying mysql? Are you sure it's loading the correct repository.xml?

WHen you delete the jackrabbit folder, does it recreate itself when you restart liferay?
Brian Scott Schupbach
RE: how to configure jackrabbit with mysql
June 2, 2009 12:17 PM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

did you ever get your repository.xml correct?

I'm having a similar issue and would really be grateful to view your finished repository.xml

Thanks,

Brian