用jndi配置长耳兔

时间:2013-12-04 16:24:38

标签: java jndi jackrabbit drools-guvnor

我正在尝试通过jndi配置jackrabbit的文件系统和持久性管理器,如下所示(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>

当我启动服务器时,我得到以下异常:

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)

长耳兔的版本是1.4 jackrabbit似乎不喜欢jndi配置。我也试过url=jdbc/MY_DATASOURCE/default,但我得到了同样的错误

0 个答案:

没有答案