AnsweredAssumed Answered

JDBC Multithreading - [Orb.Channel] The channel is not registered on server.

Question asked by ErikN on Jan 3, 2016
Latest reply on Jan 13, 2016 by gregor

I am using JDBC to retrieve values using the PI SQL DAS module. My Java implementation is using JNDI connection pooling with Apache Tomcat and Spring JDBC framework. There was a thread with this error here, but there was no concrete resolution to the problem, and I'm not sure my problem is the same.

 

The problem is that on the first try, my method creates n amount of threads, they query the database, and no issues occur. If I immediately run the method again, same thing - no issues. Note I am not restarting the application between tries.

 

The issue occurs when I wait for a few minutes before running the application again - so I assume there is a timeout issue somewhere, or threads are being abandoned. That is when I am getting SQL exceptions, specifically the [Orb.Channel] The channel is not registered on server.;

 

And the catch is, when I run this method using a single threaded version it works perfectly fine. So I believe the actual URL/user/pass/driver setup is ok. I am new to multithreading so I think there is a flaw somewhere in my implementation.

 

 

I looked at the PISQLDAS logs on the PI server and the only logs that are created are:

 

1/3/2016 1:41:09.52701 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:12.94801 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:12.94501 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:12.94101 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:12.841 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:12.811 PM, , Information, Successfully connected to server ....etc.

1/3/2016 1:40:09.55801 PM, , Information, Successfully connected to server ....etc.

 

So you can see my threads successfully making connections, but there are no error messages about connection timeouts or drops.

 

 

I asked a question on Stackoverflow here where I described my JNDI/Spring configuration and Java classes if that helps. Thank you for any help you can provide.

Outcomes