I'm trying to configure jackrabbit's file system and persistence manager through jndi as follows (repository.xml
):
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager">
<param name="driver" value="javax.naming.InitialContext"/>
<param name="url" value="java:/jdbc/MY_DATASOURCE/default"/>
<param name="schema" value="mssql"/>
<param name="schemaObjectPrefix" value="jcr_pm_"/>
</PersistenceManager>
<FileSystem class="org.apache.jackrabbit.core.fs.db.DbFileSystem">
<param name="driver" value="javax.naming.InitialContext"/>
<param name="url" value="java:/jdbc/MY_DATASOURCE/default"/>
<param name="schema" value="mssql"/>
<param name="schemaObjectPrefix" value="jcr_fs_"/>
</FileSystem>
when I start my server I get the following exception:
16:34:09,209 INFO [STDOUT] 2013-12-03 16:34:09,205 ERROR [org.apache.jackrabbit.core.fs.db.DbFileSystem] failed to initialize file system
java.sql.SQLException: No suitable driver found for java:/jdbc/MY_DATASOURCE/default
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.apache.jackrabbit.core.fs.db.DbFileSystem.getConnection(DbFileSystem.java:187)
at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.initConnection(DatabaseFileSystem.java:956)
at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:175)
at org.apache.jackrabbit.core.config.FileSystemConfig.createFileSystem(FileSystemConfig.java:47)
at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:244)
at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:557)
at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
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)
the version of jackrabbit is 1.4
jackrabbit does not seem to like jndi configuration. I also tried with url=jdbc/MY_DATASOURCE/default
but i get the same error