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

CachingClientConnectionFactory gives an UnsupportedOperation exception on incoming data [INT-3728] #7683

spring-operator opened this issue Jun 4, 2015 · 1 comment


Copy link

Steve Singer opened INT-3728 and commented

I often (but not always) get the following exception right after I call getConnection()

java.lang.UnsupportedOperationException: This should never be called
at org.springframework.integration.ip.tcp.connection.CachingClientConnectionFactory$2.onMessage(
at org.springframework.integration.ip.tcp.connection.TcpNioConnection.sendToChannel(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

The server I am connecting to sends data as soon as a client connects to it (the client doesn't send the first message the server does).

What I suspect is happening is that as soon as createForPool() calls targetConnectionFactory.getConnection() the server sends a message. However targetConnectionFactory isn't configured with my listener it is configured with the 'This should never be called listener'. I suspect AbstractClientConnectionFactory.initializeConnection() is too late in the process to be configuring the real listeners.

Affects: 4.1.2

Referenced from: pull request #1458

Copy link
Contributor Author

Gary Russell commented

Steve Singer 4.1.5 is now available.

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