Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring 4.1 and Integration 4.0.4 results in Caused by: java.lang.NoClassDefFoundError: com/rometools/rome/io/FeedException using HttpRequestHandlingEndpointSupport [INT-3517] #7482

spring-operator opened this issue Sep 10, 2014 · 3 comments


Copy link

Andrew Tulloch opened INT-3517* and commented

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>( ~[spring-integration-http-4.0.4.RELEASE.jar:?]
	at org.springframework.integration.http.inbound.HttpRequestHandlingMessagingGateway.<init>( ~[spring-integration-http-4.0.4.RELEASE.jar:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_20]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance( ~[?:1.8.0_20]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance( ~[?:1.8.0_20]
	at java.lang.reflect.Constructor.newInstance( ~[?:1.8.0_20]
	at org.springframework.beans.BeanUtils.instantiateClass( ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
	at ~[spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
	at ~[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.

Affects: 4.0.4

Referenced from: pull request #1275

Copy link
Contributor Author

Artem Bilan commented

OK. Thank you for pointing that out.
We definitely must fix it as you suggest, but I'm really not sure that it is so critical.

If you aren't just interested in AtomFeedHttpMessageConverter you can remove rome-fetcher jar from your classpath.
From other side, if you need it and you use Spring 4.1 the message from that exception exactly says what is wrong.

Something similar we get when want to use <object-to-json-transformer>, but don't have Jackson in the classpath.

Copy link
Contributor Author

Gary Russell commented


Copy link
Contributor Author

Andrew Tulloch commented

You're right, the dependency tree looks like this:
[INFO] +- org.springframework.integration:spring-integration-http:jar:4.0.4.RELEASE:compile
[INFO] | +- org.springframework:spring-webmvc:jar:4.1.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:4.1.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-expression:jar:4.1.0.RELEASE:compile
[INFO] | | - org.springframework:spring-web:jar:4.1.0.RELEASE:compile
[INFO] | -

so I can exclude rome-fetcher from spring-integration-http.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants