Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-3517

Spring 4.1 and Integration 4.0.4 results in Caused by: java.lang.NoClassDefFoundError: com/rometools/rome/io/FeedException using HttpRequestHandlingEndpointSupport

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.0.4
    • Fix Version/s: 4.0.5
    • Component/s: HTTP Support
    • Labels:
    • Environment:
      N/A

      Description

      Using Spring Integration 4.0.4 in combination with Spring Framework 4.1.x results in the following exception:

      Caused by: java.lang.NoClassDefFoundError: com/rometools/rome/io/FeedException
      	at org.springframework.integration.http.inbound.HttpRequestHandlingEndpointSupport.<init>(HttpRequestHandlingEndpointSupport.java:185) ~[spring-integration-http-4.0.4.RELEASE.jar:?]
      	at org.springframework.integration.http.inbound.HttpRequestHandlingMessagingGateway.<init>(HttpRequestHandlingMessagingGateway.java:72) ~[spring-integration-http-4.0.4.RELEASE.jar:?]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_20]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_20]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_20]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:408) ~[?:1.8.0_20]
      	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:125) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:270) ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
      	... 27 more
      

      This seems to be caused by the conditional on L184:

      if ((spring41Present && romeToolsPresent) || romePresent) {
      

      Should be:

      if ((spring41Present && romeToolsPresent) || (!spring41Present && romePresent)) {
      

      as romePresent is true causing the attempt to create an instance of AtomFeedHttpMessageConverter, but this actually requires romeToolsPresent to be true (which it isn't in my case) where spring41Present is true as the implementation in Spring 4.1 uses.

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            drewtul Andrew Tulloch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: