Laurent Van Basselaere created MTOMCAT-205:
----------------------------------------------

             Summary: Two executions of the plugin in the same build makes the 
JNDI context of the second execution fail
                 Key: MTOMCAT-205
                 URL: https://issues.apache.org/jira/browse/MTOMCAT-205
             Project: Apache Tomcat Maven Plugin
          Issue Type: Bug
          Components: tomcat7
    Affects Versions: 2.0
         Environment: windows 7, maven 2.2.1
            Reporter: Laurent Van Basselaere
            Assignee: Olivier Lamy (*$^¨%`£)


When starting only one instance of a tomcat7 server with the run-war-only mojo, 
it works.
If I start more than one server (necessary in our project as our integration 
tests include interaction between several deployments of the app with various 
configurations), all servers after the first one fail to deploy with a jndi 
lookup error:

{code}
javax.naming.NameNotFoundException: Name [comp/env/jms/ConnectionFactory] is 
not bound in this Context. Unable to find [comp].
        org.apache.naming.NamingContext.lookup(NamingContext.java:820)
        org.apache.naming.NamingContext.lookup(NamingContext.java:168)
        org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)
        javax.naming.InitialContext.lookup(InitialContext.java:392)
        
org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154)
        org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
        org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
        org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)
        
org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
        
org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)
        
org.springframework.jndi.JndiObjectTargetSource.afterPropertiesSet(JndiObjectTargetSource.java:97)
        
org.springframework.jndi.JndiObjectFactoryBean$JndiObjectProxyFactory.createJndiObjectProxy(JndiObjectFactoryBean.java:285)
        
org.springframework.jndi.JndiObjectFactoryBean$JndiObjectProxyFactory.access$0(JndiObjectFactoryBean.java:276)
        
org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:177)
        
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1479)
        
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
        
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
        
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
        
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
        
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
        
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
        
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
        
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:467)
        
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:483)
        
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:358)
        
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:325)
        
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
        javax.servlet.GenericServlet.init(GenericServlet.java:160)
        
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
        
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
        
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
        
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
        
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        java.lang.Thread.run(Thread.java:662)
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to