Hi,
I have changed the repository.xml to NOT use JNDI and its working now.
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver"
value="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"/>
<param name="url"
value="jdbc:mysql://localhost:3306/drools" />
<param name="user" value="root" />
<param name="password" value="" />
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="J_V_FS_"/>
</FileSystem>
<PersistenceManager
class="org.apache.jackrabbit.core.state.db.SimpleDbPersistenceManager">
<param name="driver"
value="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"/>
<param name="url"
value="jdbc:mysql://localhost:3306/drools" />
<param name="user" value="root" />
<param name="password" value="" />
<param name="schema" value="mysql" />
<param name="schemaObjectPrefix" value="J_V_PM_" />
<param name="externalBLOBs" value="false" />
</PersistenceManager>
Could someone give me an example of a configuration using JNDI ?
Thanks a lot!
-----Original Message-----
From: andre.fonseca(a)mail.com
To: rules-users(a)lists.jboss.org
Sent: Mon, Apr 26, 2010 2:09 pm
Subject: [rules-users] Guvnor - Persist data in MySQL
Hi all,
I am trying to configure Guvnor to persist data in MySQL, I am running mysql 5.1-45
(windows 7) under Tomcat 6
The steps that I did:
1) Create empty database "drools" in Mysql
2) Configure Tomcat data source
<Resource name="jdbc/drools" type="javax.sql.DataSource"
username="root" password=""
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/drools" maxActive="8"
maxIdle="4" />
3) Edit generated repository.xml
<!--
<FileSystem
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/repository"/>
</FileSystem>
-->
<!-- tested with both param values -->
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver"
value="javax.naming.InitialContext"/>
<!--<param name="url"
value="java:comp/env/jdbc/drools"/>-->
<param name="url" value="jdbc/drools"/>
</FileSystem>
<DataStore class="org.apache.jackrabbit.core.data.db.DbDataStore">
<param name="driver"
value="javax.naming.InitialContext"/>
<!--<param name="url"
value="java:comp/env/jdbc/drools"/>-->
<param name="url" value="jdbc/drools"/>
<param name="databaseType" value="mysql"/>
</DataStore>
<!-- same lines added for workspace and versioning -->
<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/drools" />
<param name="schema" value="drools" />
<param name="user" value="root" />
<param name="password" value="" />
<param name="schemaObjectPrefix"
value="${wsp.name}_"/>
<param name="externalBLOBs" value="false" />
</PersistenceManager>
I used the links below to try those steps
1.2.2.2. Configuring Guvnor to use an external RDBMS
http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-guvnor/ht...
http://wiki.apache.org/jackrabbit/UsingJNDIDataSource
Unfortunately I am getting the exception below
Caused by: org.drools.repository.RulesRepositoryException: javax.jcr.RepositoryException:
Invalid repository configuration: repository.xml: Configuration element FileSystem not
found in Versioning.: Configuration element FileSystem not found in Versioning.
at
org.drools.guvnor.server.repository.BRMSRepositoryConfiguration.newSession(BRMSRepositoryConfiguration.java:116)
at
org.drools.guvnor.server.repository.BRMSRepositoryConfiguration.create(BRMSRepositoryConfiguration.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
---------
Caused by: javax.jcr.RepositoryException: Invalid repository configuration:
repository.xml: Configuration element FileSystem not found in Versioning.: Configuration
element FileSystem not found in Versioning.
at
org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:250)
at
org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
at
org.drools.guvnor.server.repository.BRMSRepositoryConfiguration.newSession(BRMSRepositoryConfiguration.java:112)
... 62 more
Could you please assist?
Thanks in Advance
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users