Introducing firebird-testcontainers-java

02 June 2019

I have just released org.firebirdsql:firebird-testcontainers-java:1.0.0, based on Testcontainers.

This library allows you to start a Firebird docker container for a JUnit 4 or 5 test or manually from your code. This can be useful for JUnit-based integration tests.

For a very simple example, add to your pom.xml:

<dependency>
    <groupId>org.firebirdsql</groupId>
    <artifactId>firebird-testcontainers-java</artifactId>
    <version>1.0.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.firebirdsql.jdbc</groupId>
    <artifactId>jaybird-jdk18</artifactId>
    <version>3.0.6</version>
    <scope>test</scope>
</dependency>

And create a test:

/**
  * Simple test demonstrating use of {@code @Rule}.
  */
public class ContainerExampleTest {

     @Rule
     public final FirebirdContainer container = new FirebirdContainer();

     @Test
     public void canConnectToContainer() throws Exception {
         try (Connection connection = DriverManager
                 .getConnection(container.getJdbcUrl(), container.getUsername(),
                     container.getPassword());
              Statement stmt = connection.createStatement();
              ResultSet rs = stmt.executeQuery("select CURRENT_USER from RDB$DATABASE")) {
             assertTrue("has row", rs.next());
             assertEquals("user name",
                 container.getUsername().toUpperCase(), rs.getString(1));
         }
     }
}

Jaybird 3.0.6 released

25 May 2019

We are happy to announce the release of Jaybird 3.0.6.

This release is largely a bugfix release, but contains additional support for Firebird 4.

Jaybird 3.0.6 contains the following fixes and changes:

  • Fixed: Exceptions during fetch of cached result sets (holdable over commit, scrollable and metadata) prevented prepared statement reuse/re-execute with error "Statement state CURSOR_OPEN only allows next states [CLOSING, PREPARED, ERROR], received EXECUTING" (JDBC-531)

  • Improvement: Added FBManager.setDefaultCharacterSet to set default database character set during database creation (JDBC-541)

  • New feature: Support for Firebird 3 case sensitive user names (JDBC-549)

  • Fixed: Savepoints did not work in connection dialect 1 as savepoint names were always quoted (JDBC-556)

  • Changed: The DatabaseMetaData statement cache introduced in Jaybird 3 was unlimited, it is now limited to 12 prepared statements; the least recently used statement will be closed and removed when a new statement is added (JDBC-557)

  • Fixed: UPDATE OR INSERT with existing RETURNING clause handled incorrectly for generated keys (JDBC-566)

  • Fixed: Exceptions during initialization of result sets would not properly close the database cursor leading to error "Current statement state (CURSOR_OPEN) does not allow call to prepare" on reuse of the statement (or errors similar to described for JDBC-531 above). (JDBC-571)

  • New feature: boolean connection property ignoreProcedureType to disable usage of metadata for stored procedure types in CallableStatement. When set to true, call escapes and EXECUTE PROCEDURE will default to use EXECUTE PROCEDURE and not switch to SELECT for selectable stored procedures. (JDBC-576)

  • New feature: connection properties timeZoneBind and sessionTimeZone for limited support for Firebird 4 TIME(STAMP) WITH TIME ZONE types, and decfloatBind for limited support for Firebird 4 DECFLOAT types. (JDBC-538)

  • Fixed: Connection property defaultIsolation/isolation did not work through DriverManager, but only on DataSource implementations. (JDBC-584)

Jaybird 3.0 supports Firebird 2.0 and higher, on Java 7, 8 and 9 and higher. Basic Java 9 and higher compatibility is provided through the Java 8 version of the driver.

See also:

Jaybird 4.0.0-beta-1 released

27 April 2019

We are happy to announce the first beta for Jaybird 4.

We’d really appreciate it if you take the time to test this version of Jaybird with your applications. Bug reports about undocumented changes in behavior are appreciated. Feedback can be sent to the Firebird-java mailing list or reported on the issue tracker http://tracker.firebirdsql.org/browse/JDBC.

Jaybird 4 is - compared to Jaybird 3 - an incremental release that builds on the foundations of Jaybird 3. The focus of this release has been on further improving JDBC support and adding support for the new data types and features of Firebird 4.

The main new features are:

  • Wire encryption support (backported to Jaybird 3.0.4)

  • Database encryption support (backported to Jaybird 3.0.4)

  • Authentication plugin improvements

  • Firebird 4 DECFLOAT support

  • Firebird 4 extended numeric precision support

  • Firebird 4 time zone support

  • JDBC RowId support

  • JDBC DatabaseMetaData.getPseudoColumns implemented

  • JDBC DatabaseMetaData.getVersionColumns implemented

  • Improved JDBC function escape support

  • New JDBC protocol prefix jdbc:firebird:

  • Generated keys support improvements

Jaybird 4.0.0-beta-1 is for testing purposes only, and not intended for production use.

See also:

Jaybird 2.2.15 released

06 April 2019

We are happy to announce the release of Jaybird 2.2.15.

Jaybird 2.2.15 is the last version of Jaybird 2.2.x, and we will not plan new changes or fixes for 2.2.x. This effectively means that Jaybird 2.2.x is End-Of-Life.

If you run into problems, we will recommend that you switch to Jaybird 3 (or 4 once it is released). Contact us on Firebird-Java for questions.

Jaybird 2.2.15 contains the following fixes and changes:

  • Fixed: Exceptions during fetch of cached result sets (holdable over commit, scrollable and metadata) prevented prepared statement reuse/re-execute with error "Attempt to reopen an open cursor" (JDBC-531)

  • Fixed: Jaybird cannot parse Firebird version numbers with revisions (JDBC-534)

  • Fixed: Incorrect parsing of Firebird version numbers (JDBC-535)

Jaybird 2.2 supports Firebird 1.0 and higher, on Java 6, 7 and 8. For Java 11 or higher, use Jaybird 3.

See also:

Jaybird 3.0.5 released

07 September 2018

We are happy to announce the release of Jaybird 3.0.5.

This release is largely a bugfix release, but contains additional support for Firebird 3.0.4 and Firebird 4.

Jaybird 3.0.5 contains the following fixes and changes:

  • Fixed: FBManager does not accept page size of 32768 (Firebird 4 and higher) (JDBC-468)

  • Fixed: Jaybird cannot parse Firebird version numbers with revisions (JDBC-534)

  • Fixed: Incorrect parsing of Firebird version numbers (JDBC-535)

  • New feature: Added support for the Srp256 authentication plugin (JDBC-536)

  • Fixed: Incorrect warning "Specified statement was not created by this connection" logged for statements that fail with an exception on prepare (JDBC-538)

  • Fixed: Remote close of event channel (eg on Firebird server stop or crash) leads to high CPU usage and excessive error logging as socket channel is not removed from selector (JDBC-542)

  • Fixed: Properties wireCrypt and dbCryptConfig not available on FBEventManager (JDBC-544)

  • Documentation: wire protocol encryption requires unlimited strength Cryptographic Jurisdiction Policy (or equivalent), this was previously not documented (JDBC-545)

Jaybird 3.0 supports Firebird 2.0 and higher, on Java 7, 8 and 9 and higher. Basic Java 9 and higher compatibility is provided through the Java 8 version of the driver.

See also:


Older posts are available in the archive.