Announcement Announcement Module
Collapse
No announcement yet.
HTTP to JMS channel configuration problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP to JMS channel configuration problem

    Hi,

    I am trying to configure a simple flow where a message will flow in the following manner :

    HTTP Inbound Gateway --> JMS channel --> Service Activator with only SpEL expression (without any 'ref')

    However, I get the following error at startup :

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'respond': Cannot resolve reference to bean 'org.springframework.integration.config.ServiceAct ivatorFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.ServiceAct ivatorFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/context/expression/BeanFactoryResolver
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:106)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1325)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1086)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 91)
    at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:288 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:563)
    at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 42)
    at org.springframework.web.servlet.FrameworkServlet.c reateWebApplicationContext(FrameworkServlet.java:4 58)
    at org.springframework.web.servlet.FrameworkServlet.i nitWebApplicationContext(FrameworkServlet.java:339 )
    at org.springframework.web.servlet.FrameworkServlet.i nitServletBean(FrameworkServlet.java:306)
    at org.springframework.web.servlet.HttpServletBean.in it(HttpServletBean.java:127)
    at javax.servlet.GenericServlet.init(GenericServlet.j ava:160)
    at org.apache.catalina.core.StandardWrapper.initServl et(StandardWrapper.java:1190)
    at org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:1103)
    at org.apache.catalina.core.StandardWrapper.load(Stan dardWrapper.java:1010)
    at org.apache.catalina.core.StandardContext.loadOnSta rtup(StandardContext.java:4935)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5262)
    at org.apache.catalina.core.StandardContext$3.call(St andardContext.java:5257)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unkn own Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.ServiceAct ivatorFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/context/expression/BeanFactoryResolver
    at org.springframework.beans.factory.support.FactoryB eanRegistrySupport.doGetObjectFromFactoryBean(Fact oryBeanRegistrySupport.java:149)
    at org.springframework.beans.factory.support.FactoryB eanRegistrySupport.getObjectFromFactoryBean(Factor yBeanRegistrySupport.java:102)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getObjectForBeanInstance(AbstractBeanF actory.java:1429)
    at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:245 )
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:322)
    ... 29 more
    Caused by: java.lang.NoClassDefFoundError: org/springframework/context/expression/BeanFactoryResolver
    at org.springframework.integration.util.AbstractExpre ssionEvaluator.setBeanFactory(AbstractExpressionEv aluator.java:64)
    at org.springframework.integration.config.ServiceActi vatorFactoryBean.createExpressionEvaluatingHandler (ServiceActivatorFactoryBean.java:57)
    at org.springframework.integration.config.AbstractSta ndardMessageHandlerFactoryBean.createHandler(Abstr actStandardMessageHandlerFactoryBean.java:75)
    at org.springframework.integration.config.AbstractSim pleMessageHandlerFactoryBean.createHandlerInternal (AbstractSimpleMessageHandlerFactoryBean.java:89)
    at org.springframework.integration.config.AbstractSim pleMessageHandlerFactoryBean.getObject(AbstractSim pleMessageHandlerFactoryBean.java:68)
    at org.springframework.integration.config.AbstractSim pleMessageHandlerFactoryBean.getObject(AbstractSim pleMessageHandlerFactoryBean.java:31)
    at org.springframework.beans.factory.support.FactoryB eanRegistrySupport.doGetObjectFromFactoryBean(Fact oryBeanRegistrySupport.java:142)
    ... 34 more
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.expression.BeanFactory Resolver
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1676)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1521)
    ... 41 more

    Any help is greatly appreciated!

  • #2
    Can you list the versions of Spring Integration and Spring Framework that you have on your classpath?

    Thanks,
    Mark

    Comment


    • #3
      Sorry for that, It's actually

      <spring.integration.version>2.0.5.RELEASE</spring.integration.version>
      <spring.version>3.0.5.RELEASE</spring.version>

      Regards,
      Sanket

      Comment


      • #4
        Just to add some more info :

        And the flow works just fine if the channel is a normal one and not a JMS backed channel. The SpEL expression works great and a message is returned back to the invoker as a HTTP response.

        Regards,
        Sanket.

        Comment


        • #5
          Can you show the SpEL expression?

          Comment


          • #6
            Hi Mark,

            This occurs even if the expression is as simple as : expression='Hey' or expression="Hey"

            Regards,
            Sanket.

            Comment

            Working...
            X