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

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

Comments

@spring-operator
Copy link
Contributor

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(CachingClientConnectionFactory.java:322)
at org.springframework.integration.ip.tcp.connection.TcpNioConnection.sendToChannel(TcpNioConnection.java:357)
at org.springframework.integration.ip.tcp.connection.TcpNioConnection.run(TcpNioConnection.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

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

@spring-operator
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
Projects
None yet
Development

No branches or pull requests

2 participants