javahibernatejdbcfirebirdjaybird

Unexpected GDS Exception: 335544726. Error reading data from the connection


I have a Web app running on Apache Tomcat 6, using ZK, Hibernate and Jaybird JDBC for accessing a Firebird database. For some unknown reason, after a not yet mapped operation in the app that performs a dynamic SQL, it crashes with the following exception:

ERROR: org.springframework.transaction.TransactionSystemException: Could not roll back JPA transaction; nested exception is javax.persistence.PersistenceException: unexpected error when rollbacking javax.persistence.PersistenceException: unexpected error when rollbacking org.hibernate.TransactionException: JDBC rollback failed [SQL: 335544726, HY000] org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544726. Error reading data from the connection.

Reason: Error reading data from the connection. ...

Then, any operation performed by the user after it causes the following error:

ERROR: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not execute query org.hibernate.exception.GenericJDBCException: could not execute query [SQL: 335544721, HY000] org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544721. Unable to complete network request to host "". Reason: Unable to complete network request to host "".

And the system crashes down, like if it had lost the connection with the database.

Has anyone experienced it before?


Solution

  • After some research and tests, I've got to understand what was happening.

    The problem was happening when a user was performing a specific search in the app using a string with size greater than the target table field's size. So, when the system executed the HQL query with the string input as a parameter, the system crashed down - like when comparing a string with length 20 to a varchar(18) field.

    The solution was simple: limit the size of the input string in the search field.

    Hope this helps anyone in the future.