Hi,

Florian Ried wrote:
   <!-- Global Repository -->
   <Resource name="jcr/globalRepository"
         auth="Container"
         type="javax.jcr.Repository"
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
         configFilePath="D:\repotest/repository.xml"
         repHomeDir="D:\repotest"/>

I checked through the BindableRepositoryFactory source code [1] and noticed that it doesn't instantiate the repository unless the resource type is set to "org.apache.jackrabbit.core.jndi.BindableRepository" (see line 60). Thus the instructions on the web are incorrect in proposing to use "javax.jcr.Repository".

Try changing your global configuration to:

    <Resource name="jcr/globalRepository"
          auth="Container"
          type="org.apache.jackrabbit.core.jndi.BindableRepository"

factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
          configFilePath="D:\repotest/repository.xml"
          repHomeDir="D:\repotest"/>

Is there a good reason for requiring the exact class instead of the more generic interface in the JNDI configuration? I'll submit a bug report to track this issue.

[1] http://incubator.apache.org/jackrabbit/xref/org/apache/jackrabbit/core/jndi/BindableRepositoryFactory.html#51

BR,

Jukka Zitting

Reply via email to