tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Moseley <>
Subject jndi resource lookup failure in tomcat 5.5
Date Tue, 30 Aug 2005 02:07:04 GMT
i've been trying to get my webapp working in tomcat 5.5.9, and i'm
running into a problem using spring's JndiObjectFactoryBean to access a 
tomcat naming resource.

i'm getting a BeanCreationException with this message: Error creating
bean with name 'jcrRepository' defined in class path resource
[applicationContext-repository.xml]: Initialization of bean failed;
nested exception is javax.naming.NamingException: Cannot create resource

unfortunately the naming exception does not have a root cause, so it's
difficult to see what could be causing the problem. turning on debugging
in tomcat revealed the following, tho:

2005-08-29 18:20:52,215 DEBUG [WebappClassLoader]
loadClass(org.springframework.jndi.JndiObjectFactoryBeanBeanInfo, false)
2005-08-29 18:20:52,217 DEBUG [WebappClassLoader]   Searching local
2005-08-29 18:20:52,217 DEBUG [WebappClassLoader]
2005-08-29 18:20:52,217 DEBUG [WebappClassLoader]
2005-08-29 18:20:52,219 DEBUG [WebappClassLoader]     --> Passing on

i can't tell if this is expected or not. if you look at the full log
file, that output occurs slightly before the exception is logged. you
can see the full log at <>.

the jar that contains javax/jcr/Repository.class is in tomcat's
common/lib directory. i tried copying all the other jars from
WEB-INF/lib into common/lib as well, but that did not help at all.

any ideas what might be going on, or how i can further troubleshoot? thanks!

my tomcat context's config file contains:

   <Resource name="jcr/cosmo"

   <ResourceParams name="jcr/cosmo">

and my webapp's web.xml contains:


my spring bean is defined as such:

   <bean id="jcrRepository"
     <property name="jndiName">
     <property name="resourceRef">

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message