Announcement Announcement Module
Collapse
No announcement yet.
Unable to Redeploy SI application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unable to Redeploy SI application

    For some reason I'm unable to redeploy my SI application back onto my Tomcat 7 server.

    I'm using the maven tomcat plugin to run the deploy. Also have tried stop the application via the tomcat console.

    My guess at this point is that the Listener Container is not stopping correctly.

    My current setup looks like this.

    Code:
    <jee:jndi-lookup id="jmsConnectionFactory" jndi-name="jms/ConnectionFactory" />
    
    <bean id="userCredentialsConnectionFactoryAdapter" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
           <property name="targetConnectionFactory"><ref bean="jmsConnectionFactory"/></property>
    	   <property name="username" value="test" />
    	   <property name="password" value="pass" />
    	</bean>
    
    
    	  <bean id="messageListenerContainer"
    	      class="org.springframework.jms.listener.DefaultMessageListenerContainer" 
    	      p:connectionFactory-ref="userCredentialsConnectionFactoryAdapter"
    	      p:destination-ref="orderEvent"
    	      p:concurrentConsumers="1"
    	      p:maxConcurrentConsumers="1"
    	      p:receiveTimeout="5000"
    	      p:idleTaskExecutionLimit="10"
    	      p:idleConsumerLimit="5" />
    With debug turned on this is the last section of my log file.

    21:10:38.442 INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
    21:10:38.442 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'jmsIn' of type [class org.springframework.integration.jms.JmsMessageDriv enEndpoint] to stop
    21:10:38.466 INFO o.s.i.j.ChannelPublishingJmsMessageListener$Gatewa yDelegate - stopped org.springframework.integration.jms.ChannelPublish ingJmsMessageListener$GatewayDelegate@64a6a3fd
    21:10:38.466 INFO o.s.i.j.JmsMessageDrivenEndpoint - stopped jmsIn
    21:10:38.466 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'jmsIn' completed its stop procedure
    21:10:38.467 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'jmsInLab' of type [class org.springframework.integration.jms.JmsMessageDriv enEndpoint] to stop
    21:10:38.469 INFO o.s.i.j.ChannelPublishingJmsMessageListener$Gatewa yDelegate - stopped org.springframework.integration.jms.ChannelPublish ingJmsMessageListener$GatewayDelegate@37684875
    21:10:38.470 INFO o.s.i.j.JmsMessageDrivenEndpoint - stopped jmsInLab
    21:10:38.470 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'jmsInLab' completed its stop procedure
    21:10:38.470 INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 0
    21:10:38.470 INFO o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase -2147483648
    21:10:38.470 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'MessageHandler' of type [class org.springframework.integration.config.ConsumerEnd pointFactoryBean] to stop
    21:10:38.470 INFO o.s.i.e.EventDrivenConsumer - Removing {service-activator:MessageHandler} as a subscriber to the 'inbound' channel
    21:10:38.470 INFO o.s.i.c.DirectChannel - Channel 'inbound' has 0 subscriber(s).
    21:10:38.470 INFO o.s.i.e.EventDrivenConsumer - stopped MessageHandler
    21:10:38.470 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'MessageHandler' completed its stop procedure
    21:10:38.470 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'error' of type [class org.springframework.integration.config.ConsumerEnd pointFactoryBean] to stop
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - Removing {jms:outbound-channel-adapter:error} as a subscriber to the 'outbound' channel
    21:10:38.471 INFO o.s.i.c.DirectChannel - Channel 'outbound' has 0 subscriber(s).
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - stopped error
    21:10:38.471 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'error' completed its stop procedure
    21:10:38.471 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'MessageHandlerLab' of type [class org.springframework.integration.config.ConsumerEnd pointFactoryBean] to stop
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - Removing {service-activator:MessageHandlerLab} as a subscriber to the 'inboundLab' channel
    21:10:38.471 INFO o.s.i.c.DirectChannel - Channel 'inboundLab' has 0 subscriber(s).
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - stopped MessageHandlerLab
    21:10:38.471 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'MessageHandlerLab' completed its stop procedure
    21:10:38.471 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean 'errorLab' of type [class org.springframework.integration.config.ConsumerEnd pointFactoryBean] to stop
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - Removing {jms:outbound-channel-adapter:errorLab} as a subscriber to the 'outboundLab' channel
    21:10:38.471 INFO o.s.i.c.DirectChannel - Channel 'outboundLab' has 0 subscriber(s).
    21:10:38.471 INFO o.s.i.e.EventDrivenConsumer - stopped errorLab
    21:10:38.471 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean 'errorLab' completed its stop procedure
    21:10:38.472 DEBUG o.s.c.s.DefaultLifecycleProcessor - Asking bean '_org.springframework.integration.errorLogger' of type [class org.springframework.integration.endpoint.EventDriv enConsumer] to stop
    21:10:38.472 INFO o.s.i.e.EventDrivenConsumer - Removing {logging-channel-adapter:_org.springframework.integration.errorLogg er} as a subscriber to the 'errorChannel' channel
    21:10:38.472 INFO o.s.i.c.PublishSubscribeChannel - Channel 'errorChannel' has 0 subscriber(s).
    21:10:38.472 INFO o.s.i.e.EventDrivenConsumer - stopped _org.springframework.integration.errorLogger
    21:10:38.472 DEBUG o.s.c.s.DefaultLifecycleProcessor - Bean '_org.springframework.integration.errorLogger' completed its stop procedure
    21:10:38.472 INFO o.s.b.f.s.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@7f5ce238: defining beans [messageHandler,org.springframework.context.annotat ion.internalConfigurationAnnotationProcessor,org.s pringframework.context.annotation.internalAutowire dAnnotationProcessor,org.springframework.context.a nnotation.internalRequiredAnnotationProcessor,org. springframework.context.annotation.internalCommonA nnotationProcessor,jmsConnectionFactory,jmsConnect ionFactoryLab,orderEvent,orderError,cusReqSQ,userC redentialsConnectionFactoryAdapter,userCredentials ConnectionFactoryAdapterLab,messageListenerContain er,messageListenerContainerLab,amqpTemplate,rabbit ConnFactory,channelInitializer,$autoCreateChannelC andidates,org.springframework.integration.internal DefaultConfiguringBeanFactoryPostProcessor,org.spr ingframework.integration.jms.ChannelPublishingJmsM essageListener#0,jmsIn,inbound,org.springframework .integration.config.ServiceActivatorFactoryBean#0, MessageHandler,outbound,org.springframework.integr ation.jms.JmsSendingMessageHandler#0,error,org.spr ingframework.integration.jms.ChannelPublishingJmsM essageListener#1,jmsInLab,inboundLab,org.springfra mework.integration.config.ServiceActivatorFactoryB ean#1,MessageHandlerLab,outboundLab,org.springfram ework.integration.jms.JmsSendingMessageHandler#1,e rrorLab,org.springframework.context.annotation.Con figurationClassPostProcessor.importAwareProcessor, nullChannel,errorChannel,_org.springframework.inte gration.errorLogger,taskScheduler,org.springframew ork.integration.config.IdGeneratorConfigurer#0]; root of factory hierarchy
    21:10:38.473 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'taskScheduler'
    21:10:38.473 INFO o.s.s.c.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
    21:10:38.473 DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#3': [taskScheduler]
    21:10:38.474 DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#2': [_org.springframework.integration.errorLogger]
    21:10:38.475 DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)#1': [org.springframework.integration.jms.JmsSendingMess ageHandler#1]
    21:10:38.476 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'jmsInLab'
    21:10:38.476 DEBUG o.s.j.l.DefaultMessageListenerContainer - Shutting down JMS listener container
    21:10:38.476 DEBUG o.s.j.l.DefaultMessageListenerContainer - Waiting for shutdown of message listener invokers
    21:10:38.476 DEBUG o.s.j.l.DefaultMessageListenerContainer - Lowered scheduled invoker count: 0
    21:10:38.601 DEBUG o.s.b.f.s.DefaultListableBeanFactory - Retrieved dependent beans for bean '(inner bean)': [org.springframework.integration.jms.JmsSendingMess ageHandler#0]
    21:10:38.601 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'jmsIn'
    21:10:38.601 DEBUG o.s.j.l.DefaultMessageListenerContainer - Shutting down JMS listener container
    21:10:38.601 DEBUG o.s.j.l.DefaultMessageListenerContainer - Waiting for shutdown of message listener invokers
    21:10:38.602 DEBUG o.s.j.l.DefaultMessageListenerContainer - Lowered scheduled invoker count: 0
    21:10:38.610 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'rabbitConnFactory'
    21:10:38.611 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'messageListenerContainerLab'
    21:10:38.611 DEBUG o.s.j.l.DefaultMessageListenerContainer - Shutting down JMS listener container
    21:10:38.611 DEBUG o.s.j.l.DefaultMessageListenerContainer - Waiting for shutdown of message listener invokers
    21:10:38.611 DEBUG o.s.b.f.s.DisposableBeanAdapter - Invoking destroy() on bean with name 'messageListenerContainer'
    21:10:38.611 DEBUG o.s.j.l.DefaultMessageListenerContainer - Shutting down JMS listener container
    21:10:38.611 DEBUG o.s.j.l.DefaultMessageListenerContainer - Waiting for shutdown of message listener invokers

  • #2
    Best guess is something is holding up one or more of the listener threads outside of the container (upstack from the listener). You need to take a thread dump (with jstack or VisualVM or similar) and account for all the threads. You are only configured for a single thread, so it shouldn't be hard to find.

    Also, when debugging these kinds of issues, it's much easier if you include the thread name (%t) in the log; there seem to be multiple threads trying to stop the container.

    Comment

    Working...
    X