I have encountered one time this kind of error while deploying my Web application based on Spring-Integration. The error were:
Caused by: java.lang.IllegalStateException: one of inputChannelName or inputChannel is required
at org.springframework.util.Assert.state(Assert.java:385) [spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.integration.config.ConsumerEndpointFactoryBean.initializeEndpoint(ConsumerEndpointFactoryBean.java:225) [spring-integration-core-4.0.0.M4.jar:]
In fact, I was managing errorChannel and my Service Activator responsible of handling the error messages was declared like this :
Although my input channel is declared, I get the error.
The problem was that I put the same name for the id and ref in the service-activator. So the error is caused by that and not because the input channel is not declared. So I have rectified my code :
Caused by: java.lang.IllegalStateException: one of inputChannelName or inputChannel is required
at org.springframework.util.Assert.state(Assert.java:385) [spring-core-4.0.3.RELEASE.jar:4.0.3.RELEASE]
at org.springframework.integration.config.ConsumerEndpointFactoryBean.initializeEndpoint(ConsumerEndpointFactoryBean.java:225) [spring-integration-core-4.0.0.M4.jar:]
In fact, I was managing errorChannel and my Service Activator responsible of handling the error messages was declared like this :
1 2 3 4 5 6 7 8 | <int:channel id="errorChannel"/> <int:service-activator id="errorHandler" input-channel="errorChannel" method="handleError" output-channel="nullChannel" ref="errorHandler"/> |
Although my input channel is declared, I get the error.
The problem was that I put the same name for the id and ref in the service-activator. So the error is caused by that and not because the input channel is not declared. So I have rectified my code :
1 2 3 4 5 6 7 8 | <int:channel id="errorChannel"/> <int:service-activator id="errorService" input-channel="errorChannel" method="handleError" output-channel="nullChannel" ref="errorHandler"/> |
This comment has been removed by a blog administrator.
ReplyDelete