[rules-users] Choosing JackRabbit 1.3 JNDI PersistenceManager

mmquelo massi mmquelo at gmail.com
Wed Nov 28 11:14:56 EST 2007


First of All.......*Environment: Drools BRMS 4.0.3, JBossAS 4.2.2, MySql 5*

Hi Guys,

It's making me waste all the day trying to set
"JNDIDatabasePersistenceManager" as mysql-repository persistence manager.

I show u the issue...

*In MySql I've got an empty "brms-db" schema.*

*In JBoss default workspace I've got the following datasource definition in
mysql-ds.xml:*

*<datasources>
 <local-tx-datasource>

  <jndi-name>jdbc/MySQLDB</jndi-name>
  <connection-url>jdbc:mysql:///brms-db</connection-url>
  <driver-class>com.mysql.jdbc.Driver</driver-class>
  <user-name>drools</user-name>
  <password>drools</password>
  <min-pool-size>5</min-pool-size>

  <max-pool-size>20</max-pool-size>

  <idle-timeout-minutes>5</idle-timeout-minutes>

  <exception-sorter-class-name>
  com.mysql.jdbc.integration.jboss.ExtendedMysqlExceptionSorter
  </exception-sorter-class-name>

  <valid-connection-checker-class-name>
  com.mysql.jdbc.integration.jboss.MysqlValidConnectionChecker
  </valid-connection-checker-class-name>

 </local-tx-datasource>
</datasources>*

*I've got the following persistence manager set-up in
<jboss_home>\bin\repository.xml:*

* <PersistenceManager class="
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager">
  <param name="dataSourceLocation" value="java:jdbc/MySQLDB"/>
  <param name="schema" value="mysql"/>
  <param name="schemaObjectPrefix" value="${wsp.name}_"/>
  <param name="externalBLOBs" value="false" />
 </PersistenceManager>  *


*Once I start JBoss I get back the following exception:*

*2007-11-28 16:48:36,766 INFO  [STDOUT] ERROR 28-11 16:48:36,743 (
RepositoryImpl.java:initStartupWorkspaces:389)   Failed to initialize
workspace 'default'
javax.jcr.RepositoryException: Cannot instantiate persistence manager
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager:
null: null
 at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(
RepositoryImpl.java:1184)
 at org.apache.jackrabbit.core.RepositoryImpl.access$600(RepositoryImpl.java
:103)
 at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(
RepositoryImpl.java:1758)
 at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(
RepositoryImpl.java:603)
 at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(
RepositoryImpl.java:386)
 at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java
:293)
 at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java
:584)
 at org.apache.jackrabbit.core.TransientRepository$2.getRepository(
TransientRepository.java:245)*
*...*

I tried to replace "*
org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager*"
with "*org.apache.jackrabbit.core.persistence.db.SimpleDbPersistenceManager*
"
and It *DOES* Work ....so I think we can exclude it's something related to
"JackRabbit API" null references...

Have U got any idea?
What is the reason?
Did I miss any binding concernig the DataSource definition?????
Is it just impossible to bind JackRabbit to any datasources although JNDI
APIs do exist?????
Is it a matter related to the "weird JackRabbit JNDI client"??

Let me know.

Thank You again.

Massi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071128/2e7a7e01/attachment.html 


More information about the rules-users mailing list