JZ0C0: Connection is already closed

Hello,

My users are intermittently receiving the following error message which freezes smart client when trying to edit field data. Server is running 3.1.7, using sybase driver com.sybase.jdbc2.jdbc.SybDriver on the repository server.

RMI TCP Connection(140)-10.28.8.115 ERROR com.servoy.j2db.util.Debug destroyObject: java.sql.SQLException: JZ0C0: Connection is already closed.

A google search implies that it’s due to the Sybase service closing the connection, and because this exception is not received as a “StaleConnectionException”, app recovery logic may miss it.

Shouldn’t this exception be handled? I’m by no means an expert in this area, so any suggestions for eliminating this error would be much appreciated.

rmi.connection.timeout: 120
ApplicationServer.pingDelay: 30
useTwoWaySocket: enabled
useSSL: enabled

No NAT routers between client and server.

Best,

Jon S.

John,

This error indeed happens when sybase closes the connection.

You can try setting the validation type to ‘query validation’ and put in a validation query (for instance ‘select 1’)
Servoy will validate the connection with this query when a new connection from the pool is used.

Another question is why is sybase closing the connection?

Rob

Hi Rob,

Thanks for the advice. I set it to a query validation over the weekend, but this morning on checking the logs I found the same error again.

The only sybase errors I am getting in the log are “Connection termainated abnormally; client socket shut down.”

Best,

Jon

Jon,

What is the network between the servoy server and the sybase database like.

It seems that connections are being dropped after some idle time, is there perhaps a firewall that drops inactive connections?

Did the validation query help against freezing of the client?

Rob