Announcement Announcement Module
Collapse
No announcement yet.
Some SI adapters/services failing causes entire app to hang. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Some SI adapters/services failing causes entire app to hang.

    Hi guys,

    <file:outbound-channel-adapter channel="exceptionReportChannelOut" id="filesOut" directory="file:${report.output}"/>


    report.output path is in a prop file.

    I've come across an issue whereby, for instance, if the above path is not found, the rest of the app doesnt start up correctly. The remaining adapters just get ignored. Is there a way to tell spring to ignore just the failed adapter but go ahead and continue starting up the rest of the adapters?

  • #2
    Can you describe what you mean by "the rest of the app doesnt start up correctly".

    What you should be seeing is a fatal exception upon attempting to start the Spring context, right?

    Comment


    • #3
      Hi Mark, Thanx for the reply, here is the stack

      When this happens the context loading stops and it appears as thought the remaining context is skipped.


      [5/20/10 0:03:58:810 SAST] 0000002c ContextLoader E org.springframework.web.context.ContextLoader initWebApplicationContext Context initialization failed
      org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'filesOut': Cannot resolve reference to bean 'org.springframework.integration.file.config.FileW ritingMessageHandlerFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.file.config.FileW ritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Destination directory [/udd001/app/eximbills/ee_batch/stage] does not exist.
      at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:275)
      at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:104)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1245)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1010)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:472)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
      at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultL istableBeanFactory.getBeansOfType(DefaultListableB eanFactory.java:308)
      at org.springframework.context.support.AbstractApplic ationContext.getBeansOfType(AbstractApplicationCon text.java:947)
      at org.springframework.context.support.AbstractApplic ationContext.registerListeners(AbstractApplication Context.java:701)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:377)
      at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
      at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
      at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServ letContextCreated(WebApp.java:653)
      at com.ibm.ws.webcontainer.webapp.WebApp.commonInitia lizationFinish(WebApp.java:365)
      at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize (WebApp.java:293)
      at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebAp plication(WebGroup.java:93)
      at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplic ation(VirtualHost.java:162)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(W ebContainer.java:671)
      at com.ibm.ws.wswebcontainer.WebContainer.addWebAppli cation(WebContainer.java:624)
      at com.ibm.ws.webcontainer.component.WebContainerImpl .install(WebContainerImpl.java:335)
      at com.ibm.ws.webcontainer.component.WebContainerImpl .start(WebContainerImpl.java:551)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.st art(ApplicationMgrImpl.java:1274)
      at com.ibm.ws.runtime.component.DeployedApplicationIm pl.fireDeployedObjectStart(DeployedApplicationImpl .java:1138)
      at com.ibm.ws.runtime.component.DeployedModuleImpl.st art(DeployedModuleImpl.java:569)
      at com.ibm.ws.runtime.component.DeployedApplicationIm pl.start(DeployedApplicationImpl.java:817)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artApplication(ApplicationMgrImpl.java:921)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl$1. run(ApplicationMgrImpl.java:1461)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAs( ContextManagerImpl.java:4149)
      at com.ibm.ws.security.auth.ContextManagerImpl.runAsS ystem(ContextManagerImpl.java:4246)
      at com.ibm.ws.security.core.SecurityContext.runAsSyst em(SecurityContext.java:245)
      at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artApplication(ApplicationMgrImpl.java:1466)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java :36)
      at sun.reflect.GeneratedMethodAccessor776.invoke(Unkn own Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java :239)
      at javax.management.modelmbean.RequiredModelMBean.inv okeMethod(RequiredModelMBean.java:1071)
      at javax.management.modelmbean.RequiredModelMBean.inv oke(RequiredModelMBean.java:953)
      at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke (DynamicMetaDataImpl.java:213)
      at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDa taImpl.java:220)
      at com.sun.jmx.interceptor.DefaultMBeanServerIntercep tor.invoke(DefaultMBeanServerInterceptor.java:815)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxM BeanServer.java:784)
      at com.ibm.ws.management.AdminServiceImpl$1.run(Admin ServiceImpl.java:1137)
      at com.ibm.ws.security.util.AccessController.doPrivil eged(AccessController.java:118)
      at com.ibm.ws.management.AdminServiceImpl.invoke(Admi nServiceImpl.java:1030)
      at com.ibm.ws.management.connector.AdminServiceDelega tor.invoke(AdminServiceDelegator.java:139)
      at sun.reflect.GeneratedMethodAccessor12906.invoke(Un known Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.ibm.ws.management.connector.soap.SOAPConnector .invoke(SOAPConnector.java:361)
      at com.ibm.ws.management.connector.soap.SOAPConnector .service(SOAPConnector.java:215)
      at com.ibm.ws.management.connector.soap.SOAPConnectio n.handleRequest(SOAPConnection.java:55)
      at com.ibm.ws.http.HttpConnection.readAndHandleReques t(HttpConnection.java:680)
      at com.ibm.ws.http.HttpConnection.run(HttpConnection. java:484)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1497)
      Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.file.config.FileW ritingMessageHandlerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Destination directory [/udd001/app/eximbills/ee_batch/stage] does not exist.
      at org.springframework.beans.factory.support.FactoryB eanRegistrySupport$1.run(FactoryBeanRegistrySuppor t.java:127)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.FactoryB eanRegistrySupport.doGetObjectFromFactoryBean(Fact oryBeanRegistrySupport.java:116)
      at org.springframework.beans.factory.support.FactoryB eanRegistrySupport.getObjectFromFactoryBean(Factor yBeanRegistrySupport.java:91)
      at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectForBeanInstance(AbstractBeanF actory.java:1288)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:275 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:269)
      ... 66 more
      Caused by: java.lang.IllegalArgumentException: Destination directory [/udd001/app/eximbills/ee_batch/stage] does not exist.
      at org.springframework.util.Assert.isTrue(Assert.java :65)
      at org.springframework.integration.file.FileWritingMe ssageHandler.afterPropertiesSet(FileWritingMessage Handler.java:144)
      at org.springframework.integration.file.config.FileWr itingMessageHandlerFactoryBean.initHandler(FileWri tingMessageHandlerFactoryBean.java:171)
      at org.springframework.integration.file.config.FileWr itingMessageHandlerFactoryBean.getObject(FileWriti ngMessageHandlerFactoryBean.java:122)
      at org.springframework.beans.factory.support.FactoryB eanRegistrySupport$1.run(FactoryBeanRegistrySuppor t.java:121)
      ... 74 more

      Comment


      • #4
        Okay, thanks. That is what I was expecting actually.

        I don't think we would want to simply ignore errors like this and continue to start the rest of the system. It seems like that would create a lot more confusion, as in "why is my file adapter not working?!".

        In general, a fail-fast system with clear error messages seems better than a half-broken system that runs anyways, but maybe I'm misunderstanding your suggestion?

        Thanks,
        Mark

        Comment


        • #5
          no, i think you have a more valid point...agreed.
          what I will do, is extract/seperate the processes that may fail like this due to external environment issues and have them load up as a seperate app...sounds like a plan to me

          Thanx again for the assistance...

          Comment

          Working...
          X