Issue Details (XML | Word | Printable)

Key: JDBC-578
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Miroslav Dobrev
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JDBC Driver

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

Created: 31/Mar/19 05:37 AM   Updated: 31/Mar/19 09:33 AM
Component/s: JDBC driver, XCA/JCA layer
Affects Version/s: Jaybird 3.0.5
Fix Version/s: None

File Attachments: 1. File firebird.conf (31 kB)
2. File firebird_3-0-3.conf (32 kB)
3. Text File jabird-bug-java.log (28 kB)
4. File jaybird-bug-example.sql (144 kB)

Environment:
java 1.8
jaybird 3.0.5
Server Version: LI-V3.0.5.33091 Firebird 3.0
Server Implementation: Firebird/Linux/AMD/Intel/x64
Service Version: 2
The db is with charSet=Cp1251


 Description  « Hide
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)]


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Miroslav Dobrev added a comment - 31/Mar/19 05:38 AM
the example data and the error callstack log

Miroslav Dobrev made changes - 31/Mar/19 05:38 AM
Field Original Value New Value
Attachment jaybird-bug-example.sql [ 13331 ]
Attachment jabird-bug-java.log [ 13332 ]
Mark Rotteveel added a comment - 31/Mar/19 08:40 AM - edited
What connection properties do you use? Are you using a Srp user or Legacy_Auth user? Is WireCrypt enabled (or required)?

Mark Rotteveel made changes - 31/Mar/19 08:42 AM
Fix Version/s Jaybird 3.0.6 [ 10883 ]
Mark Rotteveel added a comment - 31/Mar/19 08:51 AM
Given Firebird 3.0.5 is not released yet, can you reproduce this with Firebird 3.0.4?

Miroslav Dobrev added a comment - 31/Mar/19 09:00 AM
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>${application.name} description</value>
    </property>
</bean>

Miroslav Dobrev made changes - 31/Mar/19 09:00 AM
Attachment firebird.conf [ 13333 ]
Mark Rotteveel added a comment - 31/Mar/19 09:07 AM - edited
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.

Mark Rotteveel added a comment - 31/Mar/19 09:10 AM
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).

Miroslav Dobrev added a comment - 31/Mar/19 09:17 AM
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?

Miroslav Dobrev made changes - 31/Mar/19 09:17 AM
Attachment firebird_3-0-3.conf [ 13334 ]
Miroslav Dobrev added a comment - 31/Mar/19 09:20 AM
These days I will try to find if any setting or the release version will make the change.

Mark Rotteveel added a comment - 31/Mar/19 09:31 AM
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.

Mark Rotteveel added a comment - 31/Mar/19 09:32 AM
I'll close this ticket as 'cannot reproduce'; I can always reopen if necessary.

Mark Rotteveel made changes - 31/Mar/19 09:32 AM
Fix Version/s Jaybird 3.0.6 [ 10883 ]
Mark Rotteveel made changes - 31/Mar/19 09:33 AM
Status Open [ 1 ] Closed [ 6 ]
Resolution Cannot Reproduce [ 5 ]