New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.sql.SQLNonTransientException: Unsupported or unexpected operation code 0 in processOperation [SQLState:08000, ISC error code:337248276] [JDBC472] #511
Comments
Commented by: @mrotteveel I can't reproduce the problem you describe. Can you provide me with the minimal DDL and Java code to reproduce this. I'd also like to know which Firebird version (full version number) you are using. |
Modified by: @mrotteveelFix Version: Jaybird 3.0.0-beta-3 [ 10806 ] Fix Version: Jaybird 3.0.0 [ 10440 ] |
Commented by: Mirko Vetrano (mirvet2002_yahoo.it) I'm using Firebird latest stable version 3.0.1.32609-0 (linux 64 bit version). Today I notice, reading an old version of the documentation, that selectable procedure "might produce strange results" if used with EXECUTE PROCEDURE (this is not my case), but a few pages after I found an example about a non-selectable procedure with a PreparedStatement and executeQuery (so similar to my case). I'm trying this solution and seems to work. |
Commented by: @mrotteveel If your stored procedure doesn't have values to return, then it shouldn't be created as a selectable (ie: it shouldn't have any SUSPEND statement in it), however the "strange results" in "however this call might produce strange results" should read "unexpected results", as in if you use execute procedure with a selectable procedure, it will only do the work up to the first suspend and then exit, and that might be something you don't expect. However it sounds like an actual bug in Jaybird (or in Firebird), as the exception indicates that Firebird is sending data not expected by Jaybird, so I would really appreciate it if you could help me identify the problem with a sample program (both database and Java), and some instructions as to how to reproduce it. Note that executing a stored procedure without any return values should produce an exception when using executeQuery, so if that works for you, then that is also a bug in Jaybird. The methods executeUpdate or execute are the right methods to execute the stored procedure based on your description. |
Commented by: Mirko Vetrano (mirvet2002_yahoo.it) Example of Stored Procedure: CREATE OR ALTER PROCEDURE EXAMPLE_PROCEDURE( /* IF (EX_BL) THEN
END END ----------------------------------------------- I don't know if this can be caused by this Exception but I also have these Warnings after the exception occurs (few minutes later): and sequently [http-nio-8080-exec-5] org.firebirdsql.logging.JulLogger.warn Rollback not completed, state was ROLLING_BACK This can be caused by the commit() fault and the subsequently automatic rollback(). |
Commented by: @mrotteveel Thanks for the additional information; I will see if I can reproduce it with this information. |
Commented by: @mrotteveel I have tried to create a functioning procedure based on your example code, but I can't trigger the exception that way. There may be some extra conditions or behavior involved that I'm just not able to trigger this way. It would be really helpful to have an executable example that demonstrates the problem repeatably. Have you tried recreating the procedure? I have heard rumors that it may be necessary to recreate your stored procedures when migrating from Firebird 2.5 and earlier to Firebird 3. The failures to commit and rollback are probably subsequent failures because of the inconsistent state of the connection stream (Jaybird isn't reading what it thinks it is reading). |
Commented by: @mrotteveel Reviewing the execute code, I found a slightly different implementation of executing stored procedures compared to Jaybird 2.2 which could explain the difference in behavior (although right now I don't understand why I can't trigger the problem). I am doing some tests now, would you be willing to try and test this with a snapshot version? |
Commented by: Mirko Vetrano (mirvet2002_yahoo.it) OK. I need a week (I hope less, but there is a lot of work now) to give you back a feedback. I cannot create a working executable cause of copyright issue with my company (I'm only an employee and cannot divulgate nothing). |
Commented by: @mrotteveel Thanks for your time on this. I have made a snapshot build you can use for testing Jaybird-3.0.0-SNAPSHOT-JDK_1.8: https://www.dropbox.com/s/3qy5m0qyoy71d62/Jaybird-3.0.0-SNAPSHOT-JDK_1.8.zip?dl=0 or if you need Java 7: If this doesn't fix the problem, I will really need to have something that can reproduce this with some consistency. |
Commented by: @mrotteveel I made some more changes based on a wild guess of what the problem could be, the above links have been updated with a new version. |
Commented by: Mirko Vetrano (mirvet2002_yahoo.it) After testing for a week, I can write that the error is not more logged on the tomcat log file. The SNAPSHOT version works very good. |
Commented by: @mrotteveel Mirko, thank you very much for testing this and confirming it now works. |
Modified by: @mrotteveelstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Mirko Vetrano (mirvet2002_yahoo.it)
When executing a preparedStatement about a stored procedure invoked like "EXECUTE PROCEDURE NAME_OF_THE_STORED(?,?)" I obtain this kind of exception:
java.sql.SQLNonTransientException: Unsupported or unexpected operation code 0 in processOperation [SQLState:08000, ISC error code:337248276]
at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$4.createSQLException(FbExceptionBuilder.java:528)
at org.firebirdsql.gds.ng.FbExceptionBuilder.toFlatSQLException(FbExceptionBuilder.java:299)
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.processOperation(AbstractWireOperations.java:208)
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readSingleResponse(AbstractWireOperations.java:166)
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readResponse(AbstractWireOperations.java:150)
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readGenericResponse(AbstractWireOperations.java:252)
at org.firebirdsql.gds.ng.wire.AbstractFbWireDatabase.readGenericResponse(AbstractFbWireDatabase.java:173)
at org.firebirdsql.gds.ng.wire.version12.V12Statement.execute(V12Statement.java:95)
at org.firebirdsql.jdbc.AbstractPreparedStatement.internalExecute(AbstractPreparedStatement.java:787)
at org.firebirdsql.jdbc.AbstractPreparedStatement.executeUpdate(AbstractPreparedStatement.java:210)
at services.DataService.executeQueryOperationDescriptor(DataService.java:9433)
at services.DataService.storedProcedure_NAME_OF_THE_STORED(DataService.java:7204)
This happens with all the stored procedures that return nothing (no return type of any kind). I've tried with executeUpdate and execute from the jaybird3.0-beta2 driver without success.
Thanks for your help about that. Have a nice day and happy new year.
Commits: 61642fa 6bcc9b5
The text was updated successfully, but these errors were encountered: