Skip to content
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

Unsupported or unexpected operation code 761887348 in processOperation [SQLState:08000, ISC error code:337248276] [JDBC578] #609

Closed
firebird-automations opened this issue Mar 31, 2019 · 16 comments

Comments

@firebird-automations
Copy link

Submitted by: Miroslav Dobrev (mirodobrev)

Attachments:
jaybird-bug-example.sql
jabird-bug-java.log
firebird.conf
firebird_3-0-3.conf

1. I have clear example with one table with several fields and 381 records with no cyrillic chars (I will send you a script if you want it):

CREATE TABLE EXAMPLE_TABLE (
ID INTEGER,
NUMBER VARCHAR(40),
EVENT_DATE DATE,
ID_SUPPLIER INTEGER,
SUPPLIER_NAME VARCHAR(100),
QTY NUMERIC(18,4),
EMPLOYEE_NAME VARCHAR(100),
ID_EMPLOYEE INTEGER,
INDEX_ID INTEGER,
NOTE VARCHAR(255),
INFECTION VARCHAR(255),
INDEX_VALUE_F VARCHAR(20));

2. I have java code:
Connection c = dbm.getConnection().getConnection();
try {
PreparedStatement pse = c.prepareStatement("SELECT * from EXAMPLE_TABLE");
try {
ResultSet result = pse.executeQuery();
while(result.next());
} finally {
pse.close();
}

3. I have warning an error on pse.close() ((I will send you a full errors callstack log if you want it))

31-Mar-2019 08:25:10.774 WARNING [tomcat-http--95] org.firebirdsql.logging.JulLogger.warn Rollback not completed, state was ROLLING_BACK
java.lang.RuntimeException: Rollback not completed
at org.firebirdsql.gds.ng.wire.version10.V10Transaction.rollback(V10Transaction.java:114)
at org.firebirdsql.jca.FBManagedConnection.internalCommit(FBManagedConnection.java:644)
at org.firebirdsql.jca.FBLocalTransaction.internalCommit(FBLocalTransaction.java:193)
at org.firebirdsql.jca.FBLocalTransaction.commit(FBLocalTransaction.java:167)
at org.firebirdsql.jdbc.InternalTransactionCoordinator$AutoCommitCoordinator.statementCompleted(InternalTransactionCoordinator.java:373)
at org.firebirdsql.jdbc.InternalTransactionCoordinator.statementCompleted(InternalTransactionCoordinator.java:134)
at org.firebirdsql.jdbc.FBStatement.notifyStatementCompleted(FBStatement.java:259)
at org.firebirdsql.jdbc.AbstractPreparedStatement.notifyStatementCompleted(AbstractPreparedStatement.java:168)
at org.firebirdsql.jdbc.FBStatement.notifyStatementCompleted(FBStatement.java:254)
at org.firebirdsql.jdbc.FBStatement.completeStatement(FBStatement.java:211)
at org.firebirdsql.jdbc.AbstractPreparedStatement.completeStatement(AbstractPreparedStatement.java:159)
at org.firebirdsql.jdbc.FBStatement.completeStatement(FBStatement.java:202)
at org.firebirdsql.jdbc.InternalTransactionCoordinator$AutoCommitCoordinator.statementClosed(InternalTransactionCoordinator.java:355)
at org.firebirdsql.jdbc.InternalTransactionCoordinator.statementClosed(InternalTransactionCoordinator.java:123)
at org.firebirdsql.jdbc.FBStatement.close(FBStatement.java:604)
at org.firebirdsql.jdbc.FBStatement.close(FBStatement.java:577)
at org.firebirdsql.ds.StatementHandler.handleClose(StatementHandler.java:142)
at org.firebirdsql.ds.StatementHandler.invoke(StatementHandler.java:101)
at com.sun.proxy.$Proxy460.close(Unknown Source)
at eu.entegra.next.reports.UserReportControlCards.getAllLaboratoryCards(UserReportControlCards.java:135)

\.\.\. 53 common frames omitted

Caused by: java.sql.SQLNonTransientConnectionException: Unsupported or unexpected operation code 761887348 in processOperation [SQLState:08000, ISC error code:337248276]
at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$4.createSQLException(FbExceptionBuilder.java:578) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.FbExceptionBuilder.toFlatSQLException(FbExceptionBuilder.java:302) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.processOperation(AbstractWireOperations.java:211) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readSingleResponse(AbstractWireOperations.java:169) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.AbstractWireOperations.readResponse(AbstractWireOperations.java:153) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.AbstractFbWireDatabase.readResponse(AbstractFbWireDatabase.java:183) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.version10.V10Transaction.finishTransaction(V10Transaction.java:132) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.gds.ng.wire.version10.V10Transaction.commit(V10Transaction.java:85) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
at org.firebirdsql.jca.FBManagedConnection.internalCommit(FBManagedConnection.java:640) ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]

@firebird-automations
Copy link
Author

Commented by: Miroslav Dobrev (mirodobrev)

the example data and the error callstack log

@firebird-automations
Copy link
Author

Modified by: Miroslav Dobrev (mirodobrev)

Attachment: jaybird-bug-example.sql [ 13331 ]

Attachment: jabird-bug-java.log [ 13332 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

What connection properties do you use? Are you using a Srp user or Legacy_Auth user? Is WireCrypt enabled (or required)?

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Given Firebird 3.0.5 is not released yet, can you reproduce this with Firebird 3.0.4?

@firebird-automations
Copy link
Author

Commented by: Miroslav Dobrev (mirodobrev)

The fb server settings (I will attach whole server firebird.conf):
AuthServer = Srp, Legacy_Auth
UserManager = Srp
WireCompression = true
WireCrypt = Enabled

No explicit settings for them in the client, so default values should be in use.
<bean id="dataSource" class="org.firebirdsql.ds.FBConnectionPoolDataSource">
<property name="type">
<value>PURE_JAVA</value>
</property>
<property name="charSet">
<value>cp1251</value>
</property>
<property name="connectTimeout">
<value>10000</value>
</property>
<property name="serverName">
<value>${db.firebird.connection.servername}</value>
</property>
<property name="portNumber">
<value>${db.firebird.connection.port}</value>
</property>
<property name="databaseName">
<value>${db.firebird.connection.databasename}</value>
</property>
<property name="loginTimeout">
<value>10</value>
</property>
<property name="description">
<value>${http://application.name} description</value>
</property>
</bean>

@firebird-automations
Copy link
Author

Modified by: Miroslav Dobrev (mirodobrev)

Attachment: firebird.conf [ 13333 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Probably not related to the error, but you shouldn't be using FBConnectionPoolDataSource here. It is not a connection pool nor a proper data source (see https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/docs/org/firebirdsql/ds/FBConnectionPoolDataSource.html and https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/release_notes.html#datasource-and-connection-pooling).

FBConnectionPoolDataSource is intended as a data source for a connection pool as provided by JavaEE servers. If you want a connection pool, use a third-party library like HikariCP or Apache DBCP.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I can't reproduce the problem using:

public static void main\(String\[\] args\) throws Exception \{
    try \(Connection connection = DriverManager\.getConnection\(
            "jdbc:firebirdsql://localhost/d:/data/db/fb3/jdbc578\.fdb",
            "sysdba", "masterkey"\);
         PreparedStatement pstmt = connection\.prepareStatement\("SELECT \* from EXAMPLE\_TABLE"\)\) \{
        ResultSet rs = pstmt\.executeQuery\(\);
        while \(rs\.next\(\)\) \{
            // do nothing
        \}
    \}
\}

Not on 3.0.4 nor on the latest 3.0.5.33115 snapshot (windows 64 bit).

@firebird-automations
Copy link
Author

Commented by: Miroslav Dobrev (mirodobrev)

I tried with 3.0.3 for windows and it is OK. I cannot simulate the problem. I will attach the firebird conf for 3.0.3 firebird server.
Do you want to test with 3.0.4. anymore?

@firebird-automations
Copy link
Author

Modified by: Miroslav Dobrev (mirodobrev)

Attachment: firebird_3-0-3.conf [ 13334 ]

@firebird-automations
Copy link
Author

Commented by: Miroslav Dobrev (mirodobrev)

These days I will try to find if any setting or the release version will make the change.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I have tested on 3.0.4 and 3.0.5.33115 and both work ok for me. I suggest that you try with 3.0.5.33115 (or at least, the latest snapshot). This sounds like it was probably a bug in one of the earlier 3.0.5 snapshots.

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

I'll close this ticket as 'cannot reproduce'; I can always reopen if necessary.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ] =>

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Closed [ 6 ]

resolution: Cannot Reproduce [ 5 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants