You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Julio Castillo <jc...@edgenuity.com> on 2008/03/06 19:22:16 UTC
DDLs and bootstrapping
Still struggling on bootstrap with MySQL.
I have no problems now starting the model 3 jackrabbit using the demo/derby
setup.
I just have not been able to get it working with MySQL. Below is an excerpt
of my repository.xml.
I can't specify a "different" schema (from "mysql") as a parameter, because
then it looks for the "different.ddl" which of course does not exist
anywhere in the path.
I also can't seem to use the "create" substring used for derby. How do I
specify it for MySQL? "<param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>"
Help.
Last, for some reason, the "version" portion of the repository.xml is
executed first, or for some reason, I don't get any error messages from the
"core" portion of the xml file even though it is configured similarly (maybe
it hasn't reached that part of the file).
<Workspace name="Jackrabbit Core">
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/core"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="core"/>
<param name="schemaObjectPrefix" value="Core_"/>
</PersistenceManager>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
</SearchIndex>
</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.MySqlPersistenceManager
">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/version"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="version"/>
<param name="schemaObjectPrefix" value="Version_"/>
</PersistenceManager>
</Versioning>
RE: DDLs and bootstrapping
Posted by Julio Castillo <jc...@edgenuity.com>.
Here is the answer to my question.
After several tries I did manage to have it create the schema and run it
with no problems.
The trick: The "schema" parameter, is not the database schema you want to
use, instead is the type of database you are using (e.g. mysql).
I was able to run Jackrabbit using bundle.MySqldbPersistenceManager. Seems
to be working ok.
Here is an excerpt of my repository.xml
<Workspace name="Jackrabbit Core">
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://minbar:3306/jr_core"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="Core_"/>
</PersistenceManager>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
</SearchIndex>
</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.db.SimpleDbPersistenceManager"
>
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url"
value="jdbc:mysql://localhost:3306/jr_version"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="Version_"/>
<param name="externalBLOBs" value="false"/>
</PersistenceManager>
</Versioning>
-----Original Message-----
From: Julio Castillo [mailto:jcastillo@edgenuity.com]
Sent: Thursday, March 06, 2008 10:22 AM
To: users@jackrabbit.apache.org
Subject: DDLs and bootstrapping
Still struggling on bootstrap with MySQL.
I have no problems now starting the model 3 jackrabbit using the demo/derby
setup.
I just have not been able to get it working with MySQL. Below is an excerpt
of my repository.xml.
I can't specify a "different" schema (from "mysql") as a parameter, because
then it looks for the "different.ddl" which of course does not exist
anywhere in the path.
I also can't seem to use the "create" substring used for derby. How do I
specify it for MySQL? "<param name="url"
value="jdbc:derby:${rep.home}/version/db;create=true"/>"
Help.
Last, for some reason, the "version" portion of the repository.xml is
executed first, or for some reason, I don't get any error messages from the
"core" portion of the xml file even though it is configured similarly (maybe
it hasn't reached that part of the file).
<Workspace name="Jackrabbit Core">
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${wsp.home}"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager
">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/core"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="core"/>
<param name="schemaObjectPrefix" value="Core_"/>
</PersistenceManager>
<SearchIndex
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
<param name="path" value="${wsp.home}/index"/>
</SearchIndex>
</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.MySqlPersistenceManager
">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://localhost:3306/version"/>
<param name="user" value="jackrabbit"/>
<param name="password" value="jackrabbit"/>
<param name="schema" value="version"/>
<param name="schemaObjectPrefix" value="Version_"/>
</PersistenceManager>
</Versioning>