jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurz Wolfgang <wolfgang.k...@gwvs.de>
Subject Jackrabbit with JNDI again :-(
Date Thu, 12 Feb 2009 16:19:36 GMT
Hello everyone,

i am trying to get Jackrabbit working with spring over JNDI and somehow i cant create the
bean. I had it working with RMI but that was just too slow.

Here is my code:

server.xml:
[CODE]  
<GlobalNamingResources>
	<Resource name="jcr/repository" auth="Container" type="javax.jcr.Repository"/>
	<ResourceParams name="jcr/repository">
		<parameter>
			<name>factory</name>
			<value>org.apache.jackrabbit.core.jndi.BindableRepositoryFactory</value>
		</parameter>
		<parameter>
			<name>configFilePath</name>
			<value>U:/jackrabbits/repository.xml</value>
		</parameter>
		<parameter>
			<name>repHomeDir</name>
			<value>U:/jackrabbits</value>
		</parameter>
	</ResourceParams>
 </GlobalNamingResources>
[/CODE]

web.xml

[CODE]    
<resource-env-ref>
	<description>Content Repository</description>
	<resource-env-ref-name>jcr/repository</resource-env-ref-name>
	<resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>		
</resource-env-ref>
[/CODE]

and Context:

[CODE]    
<!-- JNDI Document Repository for J2EE environments -->
	<bean id="test" class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="resourceRef" value="true"/>
		<property name="jndiName">
			<value>java:comp/env/jcr/repository</value>
		</property>
	</bean>
[/CODE]

i get the following error:

 Error creating bean with name 'test' defined in ServletContext resource [/WEB-INF/applicationContext-web.xml]:
Invocation of init method failed; nested exception is javax.naming.NamingException: Cannot
create resource instance


Anyone have an idea what the problem could be?

Thx a lot in advance!

Mime
View raw message