Announcement Announcement Module
Collapse
No announcement yet.
java.lang.ClassNotFoundException after upgrading to 2.0.0.RC2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.ClassNotFoundException after upgrading to 2.0.0.RC2

    Hi,

    After upgrading to SI 2.0.0.RC2 I'm getting the following error:

    Code:
    Cannot create inner bean 'org.springframework.integration.xml.router.XPathSingleChannelRouter#9707d' of type [org.springframework.integration.xml.router.XPathSingleCh
    annelRouter] while setting constructor argument; nested exception is org.springframework.beans.factory.CannotLoadBeanCla
    ssException: Cannot find class [org.springframework.integration.xml.router.XPathSingleChannelRouter] for bean with name
    'org.springframework.integration.xml.router.XPathSingleChannelRouter#9707d' defined in class path resource [applicationC
    ontext-integration.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.integration.xm
    l.router.XPathSingleChannelRouter
            at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueRes
    olver.java:281) ~[spring-beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
    It looks like XPathSingleChannelRouter class is missing. I would like to mention that I use the latest release of Spring Framework which is 3.0.5.RELEASE.

    Has anyone faced similar issue?
    What's the recommended version of Spring Framework to use together with
    SI 2.0.0.RC2.

    Any help is really appreciated.

    Regards,
    Krzysztof

  • #2
    Are you sure that you have the 2.0.0.RC2 version of the spring-integration-xml JAR? Can you double-check the classpath to verify that there are no earlier versions still present?

    Thanks,
    Mark

    Comment


    • #3
      Originally posted by Mark Fisher View Post
      Are you sure that you have the 2.0.0.RC2 version of the spring-integration-xml JAR? Can you double-check the classpath to verify that there are no earlier versions still present?

      Thanks,
      Mark
      I'm using maven and here is dependency definiton:

      Code:
      <dependency>
                              <groupId>org.springframework.integration</groupId>
      			<artifactId>spring-integration-xml</artifactId>
      			<version>${springintegration.version}</version>
      </dependency>
      
      
      ...
      
      <springintegration.version>2.0.0.RC2</springintegration.version>

      I did check the org.springframework.integration.xml.router package in the spring-integration-xml-2.0.0.RC2.xml file and there is only one class defined, the XPathRouter.

      Regards,
      Krzysztof

      Comment


      • #4
        This class is gone, but are you configuring it yourself? No SI components are using it.

        Comment


        • #5
          Originally posted by oleg.zhurakousky View Post
          This class is gone, but are you configuring it yourself? No SI components are using it.
          Yes I configured it in order to get some value from XML bean base on XPath expression. I think it could be replaced by org.springframework.integration.xml.router.XPathRo uter which does same thing.
          Am I correct?

          Unfortunately one more class is missing: org.springframework.integration.channel.MapBasedCh annelResolver which I did configure by myself. Is there any class that could replace it?

          Please find the current configuration below:

          Code:
          <!-- i replaced this class -->
          <beans:bean class="org.springframework.integration.xml.router.XPathRouter">
          	<beans:constructor-arg value="/DOCUMENT/@DBLABEL" />
          	<beans:property name="channelResolver">
          <!-- need replace this one-->
          		<beans:bean class="org.springframework.integration.channel.MapBasedChannelResolver">
          			<beans:constructor-arg>
          				<beans:map>
          					<beans:entry key="A" value-ref="aDocument"/>
          					<beans:entry key="B" value-ref="bDocument"/>
          					<beans:entry key="C" value-ref="cDocument"/>
          					<beans:entry key="D" value-ref="dDocument"/>
          					<beans:entry key="E" value-ref="eDocument"/>
          				</beans:map>
          			</beans:constructor-arg>
          		</beans:bean>
          	</beans:property>
          </beans:bean>
          Thanks a lot.

          Regards,
          Krzysztof

          Comment


          • #6
            MapBasedChannelResolver was removed as well. The whole router infrastructure was greatly simplified for 2.0.
            To address your use case you can do something like this:

            Code:
            <int-xml:xpath-router id="xpathRouterWithMappingMultiChannel" input-channel="multiChannelRouterChannel">
            		<int-xml:xpath-expression expression="/root/name"/>
            		<int-xml:mapping value="A" channel="aDocument"/>	
            		<int-xml:mapping value="B" channel="bDocument"/>	
            </int-xml:xpath-router>

            Comment


            • #7
              Hi Mark / Oleg

              I might be asking something which probably could have been answered before.
              Do we have release notes or some documentation, which details out what all has been changed, covering things like these (like removal of certain classes etc)?
              I know that there are lot of changes, but if we can have a unified place to go and check such things, that will help those alot who are planning to upgrade to 2.0 GA from 1.0.x in near future.

              Comment


              • #8
                There is a new chapter in the docs called Dynamic Router Support which explains this use case in particular.
                And yes we'l be coming out with migration blog as soon as GA is out.

                Comment


                • #9
                  Thanks, that would save a lot of time!
                  Next and obvious question, when is GA coming

                  Comment


                  • #10
                    Originally posted by oleg.zhurakousky View Post
                    Code:
                    <int-xml:xpath-router id="xpathRouterWithMappingMultiChannel" input-channel="multiChannelRouterChannel">
                    		<int-xml:xpath-expression expression="/root/name"/>
                    		<int-xml:mapping value="A" channel="aDocument"/>	
                    		<int-xml:mapping value="B" channel="bDocument"/>	
                    </int-xml:xpath-router>
                    It works well. Thanks.

                    Regards,
                    Krzysztof

                    Comment


                    • #11
                      Cool! And by the way the 2.0.GA is out! http://www.springsource.org/spring-integration

                      Comment


                      • #12
                        Awesome work! Congrats...
                        let me initiate the thread internally within my company....

                        Thanks again.

                        Comment

                        Working...
                        X