Results 1 to 8 of 8

Thread: Spring-integration issues version 2.0.5

  1. #1
    Join Date
    Aug 2011
    Posts
    4

    Default Spring-integration issues version 2.0.5

    Hi,
    i am using spring-integration 2.0.5 and i got below exception.
    please let me know if you need any information.


    Exception in thread "main" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.integration.config.RouterFact oryBean#0': Cannot create inner bean '(inner bean)' of type [org.springframework.integration.xml.router.XPathRo uter] while setting bean property 'targetObject'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name '(inner bean)#1': Cannot resolve reference to bean 'mapChannelResolver' while setting bean property 'channelResolver'; nested exception is org.springframework.beans.factory.CannotLoadBeanCl assException: Cannot find class [org.springframework.integration.channel.MapBasedCh annelResolver] for bean with name 'mapChannelResolver' defined in class path resource [org/springframework/integration/samples/xml/orderProcessingSample.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.integration.channel.MapBasedCh annelResolver
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveInnerBean(BeanDefinitio nValueResolver.java:281)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:125)
    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.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:197)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:172)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:158)
    at org.springframework.integration.samples.xml.BookOr derProcessingSample.main(BookOrderProcessingSample .java:55)

    Please help me out to resolve the issue.
    Thanks in advance

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    You have to check your classpath. MapBasedChannelResolver was removed prior 2.0.GA, so its been over a year now. You must have some old JAR's in your classpath.

  3. #3
    Join Date
    Aug 2011
    Posts
    4

    Default

    Thanks for replay.
    i am using pom for building the application. so i have put the version 2.0.5.RELEASE. Is there any other class witch will replace the MapBasedChannelResolver functionality in the 2.0.5 version

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    My question is why is it even looking for this class? Are you configuring it yourself? If so why?

  5. #5
    Join Date
    Aug 2011
    Posts
    4

    Default

    Thanks for Replay.
    i have downloaded the samples from Spring site version SpringIntegration-2.0.5.
    There is one xml file(File name: orderProcessingSample.xml) configuration like.

    <bean id="mapChannelResolver"
    class="org.springframework.integration.channel.Map BasedChannelResolver">
    <property name="channelMap">
    <map>
    <entry key="true" value-ref="warehouseDispatchChannel" />
    <entry key="false" value-ref="outOfStockChannel" />
    </map>
    </property>
    </bean>
    when i was trying to load the this xml i got above exception.

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Which sample you are talking about? Where have you downloaded them from? The current samples are here: https://github.com/SpringSource/spri...ration-samples. The reason why this class was removed is because its no longer needed.

  7. #7
    Join Date
    Aug 2011
    Posts
    4

    Default

    Thanks for Replay.
    i would like to execute one sample using Spring-integration with xml, for that i have download the code form below site.
    https://anonsvn.springframework.org/...on-samples/xml
    in that location please check the orderProcessingSample.xml file. you can under stand the configuration.
    I have executed the same example. i have changed only pom file with version of 2.0.5.RELEASE.

  8. #8
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Spring Integration has been moved to Git repo long time ago and is now hosted in GitHub https://github.com/SpringSource/spring-integration. You are pointing to an old 1.0 SVN branch.

    Spring Integration samples have also been partitioned away from the main distribution almost 2 years ago http://blog.springsource.com/2010/09...ation-samples/ and even that blog is outdated with regards to the location of samples as they were moved to the GitHub 2 weeks ago (i've included the link in the previous post)

    Please upgrade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •