Reputation: 593
I am seeing the following error when using Http.outboundGateway, Can someone help where i am going wrong
@Bean
public IntegrationFlow syncProcessFlow() {
return
// dsl code to fetch a message from Queue
...
.<Event, EventType>route(event -> event.getType(), mapping -> mapping
.channelMapping(EventType.CREATE, "createFlow")
.defaultOutputChannel("nullChannel")
.resolutionRequired(false))
.get();
}
@Bean
public IntegrationFlow createFlow() {
return IntegrationFlows.from("createFlow")
.handle(Http.outboundGateway("http://google.com")
.httpMethod(HttpMethod.GET)
.expectedResponseType(String.class))
.log(LoggingHandler.Level.DEBUG, "response", m -> m.getPayload())
.log(LoggingHandler.Level.DEBUG, "response", m -> m.getHeaders())
.get();
}
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandler#0': Post-processing of merged bean definition failed; nested exception is java.la
ng.IllegalStateException: Failed to introspect Class [org.springframework.integration.http.outbound.AbstractHttpRequestExecutingMessageHandler] from ClassLoader [java.net.URLClassLoader@6e708cdf]
Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/expression/spel/support/SimpleEvaluationContext;
Upvotes: 0
Views: 2026
Reputation: 121177
The
java.lang.NoClassDefFoundError: Lorg/springframework/expression/spel/support/SimpleEvaluationContext;
means that you have upgraded to the latest Spring Integration, but you still stick with the previous Spring Framework version.
Or you need to rely on the transitive dependency from the Spring Integration, or upgrade Spring Framework as well.
All the reason of such a breaking change is here: https://spring.io/blog/2018/04/05/multiple-cve-reports-published-for-the-spring-framework
Upvotes: 2