Hello

I got a very strange error by launching my application :

java.lang.IllegalArgumentException: Cannot convert value of type [
org.apache.jackrabbit.core.jndi.BindableRepository] to required type [
javax.jcr.Repository] for property 'repository': no matching editors or
conversion strategy found

Or I know that a BindableRepository implements javax.jcr.Repository !!

Here is my beans :

   <bean id="repository"
       class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="java:comp/env/jcr/repository" />
       <property name="resourceRef" value="true" />
   </bean>

   <bean id="sessionFactory" class="org.springmodules.jcr.JcrSessionFactory
">
       <property name="repository" ref="repository" />
       <property name="credentials">
           <bean class="javax.jcr.SimpleCredentials">
               <constructor-arg index="0" value="bogus" />
               <constructor-arg index="1" ref="password" />
           </bean>
       </property>
   </bean>

and in server.xml of tomcat I have :

   <Resource
   name="jcr/globalRepository"
   auth="Container"
   type="javax.jcr.Repository"
   factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
   configFilePath="<root>/repository.xml"
   repHomeDir="<root>/repository" />

I will try to convert (!!) the BindableRepository to
javax.jcr.Repositoryusing Spring wrappers but I think they should be a
better solution.

Any idea are welcome :)

Thanks

Nicolas

Reply via email to