This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sybase issue

Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having Sybase as my backend.
When I am inserting to table with a image column which basically stores a large string and the string to be inserted is of length 0,then it thron this exception,
java.sql.SQLException: JZ0C0: Connection is already closed.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(
at com.sybase.jdbc2.jdbc.SybConnection.checkConnection(SybConnection.jav
at com.sybase.jdbc2.jdbc.SybStatement.checkDead(
at com.sybase.jdbc2.jdbc.SybPreparedStatement.setString(SybPreparedState
I run my code on Oracle and MS SQL and it works fine in similar conditions.
But for Sybase only I get this exception.
So I dont think there is connection being closed by my code anywhere.
The Sybase help at this link
Description: The application has already called Connection.close() on this connection object; it cannot be used any more.
Action: Fix the code so that connection object references are nulled out whenever a connection is closed.
Has anybody else faced such a problem and what was done to ensure nothing of this sort happened.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic