jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmquelo <mmqu...@gmail.com>
Subject JNDI Persistence Manager on MySql DB via JBOSS 4.2.2
Date Thu, 29 Nov 2007 11:47:50 GMT

 
Hi Everybody!
 
It's making me waste all the day trying to set
"JNDIDatabasePersistenceManager" as mysql-repository persistence manager.
 
I show u the issue...
 
My Environment: JBossAS 4.2.2, MySql 5.0.45, mysql connector 5.1

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">
   <pparam name="dataSourceLocation" value="java:jdbc/MySQLDB"/>
   <pparam name="schema" value="mysql"/>
   <pparam name="schemaObjectPrefix" value="${wsp.name}_"/>
   <pparam name="externalBLOBs" value="false" />   
 </PersistenceManager>  
 
(Sorry for the double "p" in "pparam" but I had to...otherwise the post
would have been rendered uncorrectly)
 
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"??
Can I set the mysql DB as XA-datasource? Could it be a solution to this
issue?
 
Let me know.
 
Thank You again.
 
Massimiliano (Rome, IT)

-- 
View this message in context: http://www.nabble.com/JNDI-Persistence-Manager-on-MySql-DB-via-JBOSS-4.2.2-tf4896516.html#a14023752
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message