Firebird query is crashing with org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544364. request synchronization error
-
28-09-2019 - |
Question
I am using JdbcTemplate.queryForInt to insert a Row into the DB, and then get the ID back.
The Query is "INSERT INTO metadocs(NAME) values (?) RETURNING METADOCID"
. If I run the statement in Flamerobin, it works fine.
However, if I run it from Java, I get the following error:
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO metadocs(NAME) values (?) RETURNING METADOCID]; SQL state [HY000]; error code [335544364]; GDS Exception. 335544364. request synchronization error; nested exception is org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544364. request synchronization error
Caused by: org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544364. request synchronization error
Does anyone have an idea what this could be caused by?
Solution
Unlike Oracle, I'm not sure that the Jaybird JDBC driver supports the RETURNING
syntax. Alternatively, you might look at the getGeneratedKeys()
method , discussed here.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow