simple-jnid / spring2 exceptions

4 views
Skip to first unread message

ben

unread,
Jun 4, 2007, 4:43:20 AM6/4/07
to osjava
First off, thanks for simple-jndi. It's great for testing.

It works just fine, but there are a load of exceptions showing up in
my logfile, like this:

10:36:02 DEBUG org.springframework.jndi.JndiTemplate: Could not close
JNDI InitialContext
javax.naming.ContextNotEmptyException
at
org.osjava.sj.jndi.AbstractContext.destroySubcontext(AbstractContext.java:
539)
at org.osjava.sj.jndi.AbstractContext.close(AbstractContext.java:697)
at javax.naming.InitialContext.close(InitialContext.java:490)
at org.osjava.sj.jndi.DelegatingContext.close(DelegatingContext.java:
164)
at javax.naming.InitialContext.close(InitialContext.java:490)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:
89)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:
121)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:
146)
at
org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:
93)
at
org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:
105)
at
org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:
197)
at
org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:
184)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:
1202)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:
1172)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
428)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
160)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
284)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
352)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:
91)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:
75)
at com.throwaway.TestJndi.main(TestJndi.java:24)

I'm using Spring2.0.5's jee namespace to define an application context
like this:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">

<jee:jndi-lookup id="dataSource" jndi-name="jdbc/ds" resource-
ref="true" />

</beans>

If you want, I can send you a little maven2 unit test that reproduces
the problem.

Regards

Henri Yandell

unread,
Jun 4, 2007, 10:47:02 AM6/4/07
to osj...@googlegroups.com
A test case would be really time saver if it's not too much work for you :)

Thanks,

Hen

ben

unread,
Jun 5, 2007, 4:00:19 AM6/5/07
to osjava
I uploaded in the "files" section. there's a little project that
demonstrates just what I'm talking about.

It's a simple maven2 project. I think you used maven1? Steps involved
are: install maven2. Go to the project directory. On the command line
issue "mvn test" command, and look at the output.

Again, this doesn't appear to stop anything from working at all. The
tests run just fine, as expected.

Regards.

On Jun 4, 4:47 pm, "Henri Yandell" <flame...@gmail.com> wrote:
> A test case would be really time saver if it's not too much work for you :)
>
> Thanks,
>
> Hen
>

Henri Yandell

unread,
Jun 27, 2007, 1:39:36 AM6/27/07
to osjava
Sorry for the lack of reply.

Will look into your upload soon. Now that I've got the OSJava JIRA
back up and happy I can try and focus on things again.

Hen

Reply all
Reply to author
Forward
0 new messages