Releases: FirebirdSQL/jaybird
Jaybird 2.2.7
The following has been changed or fixed in Jaybird 2.2.7:
- Fixed: blob return value of executable procedure obtained through getters on CallableStatement is 8 byte blob id, instead of expected blob content (JDBC-381)
This was a regression caused by the changes of JDBC-350.
See also the full release notes
Jaybird 2.2.6
The following has been changed or fixed in Jaybird 2.2.6:
- Reverted Firebird 3 workaround for updatable result sets as bug has been fixed in Firebird (JDBC-330)
- Fixed: Processing and closing the ResultSet from callable statement and then using the getters throws NullPointerException (JDBC-350)
Using both the getters and the result set for the same callable statement is incorrect; the ability to do this might be removed in a future version of Jaybird. AResultSet
should be used for selectable procedures, while the getters should be used with executable procedures. - Fixed: FBManagedConnectionFactory.tryCompleteInLimboTransaction doesn't work with recent Firebird 3 builds (JDBC-353)
- Fixed: Jaybird can throw a
NullPointerException
when a fatal connection error has occurred (JDBC-359) - Fixed: Calling close on a JCA connection triggers exception Connection enlisted in distributed transaction (JDBC-362)
- Fixed: Potential memory-leak when using a lot of different connection strings and/or properties (JDBC-364)
- Fixed:
FBRowUpdater.buildInsertStatement
doesn't quote column names (JDBC-370) - Fixed:
EncodingFactory
doesn't handleUnsupportedCharsetException
(JDBC-371) - Fixed: Current method of quoting in
FBRowUpdater
incorrect for dialect 1 (JDBC-372)
See also the full release notes
Jaybird 2.2.5
The following has been changed or fixed in Jaybird 2.2.5:
- Fixed:
getCrossReference
broken by changes of JDBC-331 (JDBC-335) - Added: basic support for Java 8 java.time in
PreparedStatement.setObject()
andResultSet.updateObject()
(JDBC-339)
As part of this change the supported sub-second precision forjava.sql.Timestamp
has been increased from 1 millisecond to the maximum Firebird precision of 100 microseconds (or 0.1 millisecond). Withjava.sql.Timestamp
the 100 microsecond precision is only available throughgetNanos()
andsetNanos()
. - Fixed: Deadlocks and other thread safety issues with classes in
org.firebirdsql.pool
(JDBC-341)
See also the full release notes.
Jaybird 2.2.4
The following has been changed or fixed in Jaybird 2.2.4:
- Fixed: Exceptions during statement preparation leave connection and transaction open after explicit close (JDBC-311)
- Fixed batch update (or insert) with blob set through
setBinaryStream()
sets empty blob for all but the first batch entry (JDBC-312) - Fixed incomplete checks of database, transaction, statement and blob handle validity before continuing with actions. These incomplete checks could lead to unexpected exceptions (for example a
NullPointerException
iniscDatabaseInfo
) (JDBC-313) - Fixed error when setting connection charset equal to
file.encoding
java property (JDBC-314) - Fixed connection character set not correctly set when specifying the Java connection character set (
charSet
orlocalEncoding
property) (JDBC-315) - Fixed incorrect lengths and/or radix reported by
getTypeInfo
andgetColumns
metadata (JDBC-317, JDBC-318) - Initial Java 8 / JDBC 4.2 support (JDBC-319)
- Firebird 3
BOOLEAN
type support, see Support for Firebird 3 BOOLEAN type (JDBC-321) - Added fallback of loading
GDSFactoryPlugin
implementations to preventNullPointerException
in Hibernate reverse engineering wizard in NetBeans (JDBC-325) - Fixed: Jaybird should specify dialect 3 in dpb when no explicit dialect was set (JDBC-327)
- Fixed: several
DatabaseMetaData
methods defined by JDBC to only accept the actual table name also accepted aLIKE
-pattern or empty string or null. This was changed to conform to JDBC. This change can break applications that relied on the incorrect behavior (JDBC-331)
Affected methods are:getPrimaryKeys
,getBestRowIdentifier
,getImportedKeys
,getExportedKeys
andgetCrossReference
. As part of this changegetIndexInfo
now handles names in the wrong case slightly different.
Jaybird 3.0 will further modify and restrict the pattern matching and case sensitivity of metadata methods. See Future changes to Jaybird.
See also the full release notes
Jaybird 2.2.3
The following has been changed or fixed in Jaybird 2.2.3:
- Fixed incorrect synchronization in native and embedded protocol (JNI) implementation for
iscBlobInfo
andiscSeekBlob
(JDBC-300)
WARNING: Although Jaybird strives for correct synchronization, a JDBC Connection, and its dependent objects should be used from a singleThread
at a time, sharing on multiple threads concurrently is not advisable. - Fixed holdable
ResultSet
is closed on auto-commit (JDBC-304, JDBC-305) - Fixed table names missing or padded with spaces in Database view of IntelliJ IDEA (JDBC-308, IDEA-100786)
- Fixed incorrect JDBC minor version reported under Java 7; this resulted in an incorrect column name (for Java 7) in the metadata of
DatabaseMetaData.getColumns(...)
(JDBC-309) - Added
IOException
to cause ofGDSException
with error 335544721; Unable to complete network request to host "" for further investigation (JDBC-306)
See also the full release notes.
Jaybird 2.2.2
The following has been changed or fixed in Jaybird 2.2.2:
- Fixed:
FBMaintenanceManager.listLimboTransactions()
reports incorrect transaction id when the result contains multi-site transactions in limbo (JDBC-266) - Fixed: Calling
PreparedStatement.setClob(int, Clob)
with a non-FirebirdClob
(eg like Hibernate does) or callingPreparedStatement.setClob(int, Reader)
throwsFBSQLException
: You can't start before the beginning of the blob (JDBC-281) - Fixed: Connection property types not properly processed from
isc_dpb_types.properties
(JDBC-284) - Fixed: JNI implementation of parameter buffer writes incorrect integers (JDBC-285, JDBC-286)
- Changed: Throw
SQLException
when callingexecute
,executeQuery
,executeUpdate
andaddBatch
methods accepting a query string on aPreparedStatement
orCallableStatement
as required by JDBC 4.0 (JDBC-288)
NOTE: Be aware that this change can break existing code if you depended on the old, non-standard behavior! WithaddBatch(String)
the old behavior lead to a memory leak and unexpected results. - Fixed:
LIKE
escape character JDBC escape ({escape '<char>'}
) doesn't work (JDBC-290) - Added: Support for a connect timeout using connection property
connectTimeout
. This property can be specified in the JDBC URL orProperties
object or on theDataSource
. If theconnectTimeout
property is not specified, the generalDriverManager
propertyloginTimeout
is used. The value is the timeout in seconds. (JDBC-295)
For the Java wire protocol the connect timeout will detect unreachable hosts. In the JNI implementation (native protocol) the connect timeout works as the DPB itemisc_dpb_connect_timeout
which only works after connecting to the server for theop_accept
phase of the protocol. This means that - for the native protocol - the connect timeout will not detect unreachable hosts within the timeout. As that might be unexpected, anSQLWarning
is added to the connection if the property is specified with the native protocol. - As part of the connect timeout change, hostname handling (if the hostname is an IP-address) in the Java wire protocol was changed. This should not have an impact in recent Java versions, but on older Java versions (Java 5 up to update 5) this might result in a delay in connecting using an IP-address, if that address can't be reverse-resolved to a hostname. Workaround is to add an entry for that IP-address to the
/etc/hosts
or%WINDIR%\System32\Drivers\etc\hosts
file.
See also the full release notes.
Jaybird 2.2.1
The following has been changed or fixed in Jaybird 2.2.1:
- Fixed:
UnsatisfiedLinkError
inlibjaybird22(_x64).so
undefined symbol:_ZTVN10__cxxabiv117__class_type_infoE
on Linux (JDBC-259) - Added connection property
columnLabelForName
for backwards compatible behavior ofResultSetMetaData#getColumnName(int)
and compatibility with bug incom.sun.rowset.CachedRowSetImpl
(JDBC-260)
Set property to true for backwards compatible behavior (getColumnName()
returns the column label); don't set the property or set it to false for JDBC-compliant behavior (recommended). - Fixed:
setString(column, null)
on? IS (NOT) NULL
condition does not set parameter toNULL
(JDBC-264) - The
charSet
connection property now accepts all aliases of the supported Java character sets (eg instead of onlyCp1252
nowwindows-1252
is also accepted) (JDBC-267) - Fixed: values of
charSet
property are case-sensitive (JDBC-268) - Fixed: setting a parameter as
NULL
with the native protocol does not work when Firebird describes the parameter as not nullable (JDBC-271)
See also the full release notes (2.2.2).
Jaybird 2.2.0
Changes and fixes since Jaybird 2.2.0 beta 1
The following was changed or fixed after the release of Jaybird 2.2.0 beta 1:
ConcurrentModificationException
when closing connection obtained fromorg.firebirdsql.ds.FBConnectionPoolDataSource
with statements open (JDBC-250)- Memory leak when obtaining multiple connections for the same URL (JDBC-249)
- CPU spikes to 100% when using events and Firebird Server is stopped or unreachable (JDBC-232)
- Events do not work on Embedded (JDBC-247)
- Provide workaround for character set transliteration problems in database filenames and other connection properties (JDBC-253); see also Support for Firebird 2.5.
FBBackupManager
does not allow 16kb page size for restore (JDBC-255)- Log warning and add warning on
Connection
when no explicit connection character set is specified (JDBC-257)
Support for getGeneratedKeys()
Support was added for the getGeneratedKeys()
functionality for Statement and PreparedStatement
.
There are four distinct use-cases:
-
Methods accepting an
int
parameter with values ofStatement.NO_GENERATED_KEYS
andStatement.RETURN_GENERATED_KEYS
When
NO_GENERATED_KEYS
is passed, the query will be executed as a normal query.When
RETURN_GENERATED_KEYS
is passed, the driver will add all columns of the table in ordinal position order (as in the (JDBC) metadata of the table). It is advisable to retrieve the values from thegetGeneratedKeys()
result set by column name.We opted to include all columns as it is next to impossible to decide which columns are filled by a trigger or otherwise and only returning the primary key will be too limiting.
-
Methods accepting an
int[]
parameter with column indexes.The values in the
int[]
parameter are the ordinal positions of the columns as specified in the (JDBC) metadata of the table. For anull
or empty array the statement is processed as is. Invalid ordinal positions are ignored and silently dropped (be aware: the JDBC specification is not entirely clear if this is valid behavior, so this might change in the future). -
Methods accepting a
String[]
parameter with column names.The values in the
String[]
are the column names to be returned. The column names provided are processed as is and not checked for validity or the need of quoting. Providing non-existent or incorrectly (un)quoted columns will result in an exception.This method is the fastest as it does not retrieve metadata from the server.
-
Providing a query already containing a
RETURNING
clause. In this case all of the previous cases are ignored and the query is executed as is. It is possible to retrieve the result set usinggetGeneratedKeys()
.
This functionality will only be available if the ANTLR 3.4 runtime classes are on the classpath. Except for calling methods with NO_GENERATED_KEYS
, absence of the ANTLR runtime will throw FBDriverNotCapableException
.
This functionality should work for INSERT
(from Firebird 2.0), and for UPDATE
, UPDATE OR INSERT
and DELETE
(from Firebird 2.1).
Java 6 and JDBC 4.0 API support
Support was added for the following JDBC 4.0 features:
- Automatic driver loading: on Java 6 and later it is no longer necessary to use
Class.forName("org.firebirdsql.jdbc.FBDriver")
to load the driver - Implementation of
java.sql.Wrapper
interface on various JDBC classes; in general it only unwraps to the specific implementation class (and superclasses) and implemented interfaces - Support for chained exceptions (use
getNextException()
anditerator()
to view other, related exceptions) andgetCause()
to retrieve the cause (deprecating similargetInternalException()
) - Support for
getClientInfo()
andsetClientInfo()
onConnection
Java 7 and JDBC 4.1 API support
Support was added for the following JDBC 4.1 features:
- try-with-resources
- Statement
closeOnCompletion
Other methods added by JDBC 4.1 will throw FBDriverNotCapableException
(a subclass of SQLFeatureNotSupportedException
).
Jaybird on Maven
Jaybird 2.2.x is available on maven, with a separate artifact for each supported Java version.
Groupid: org.firebirdsql.jdbc, artifactid: jaybird-jdkXX (where XX is 15, 16, 17, 18).
Version: 2.2.x
When deploying to a JavaEE environment, exclude the avax.resource connector-api
dependency as this will be provided by the application server.
Native and Embedded (JNI) 64-bit Windows and Linux support
The JNI libraries for native and embedded support now also have a 64 bit version.
Support for Firebird 2.5
Added support for Firebird 2.5 Services API enhancements:
- The security database can be set
- Support for
SET/DROP AUTO ADMIN
- Mapping for new role
RDB$ADMIN
in security database - Added new Firebird 2.1 shutdown/online modes available in Firebird 2.5 via the Services API
- Support for NBackup via Services API in Firebird 2.5
- Support for Trace/Audit via Services API in Firebird 2.5
Since Firebird 2.5, Firebird supports full UTF-8 database filenames and other connection properties (Database Parameter Buffer values). Jaybird does not yet support these changes, but a workaround is available:
This workaround consists of two steps
- Ensure your Java application is executed with the system property
file.encoding=UTF-8
(either because that is the default encoding for your OS, or by explicitly specifying this property on the commandline of your application using-Dfile.encoding=UTF-8
) - Include property
utf8_filename=1
in the JDBC URL or (non-standard) properties of the datasource
This will only work if the Firebird server is version 2.5 or higher.
Improved support for OpenOffice / LibreOffice Base
The interpretation of the JDBC standard by Jaybird differs from the interpretation by OpenOffice / LibreOffice. To address some of the problems caused by these differences, Jaybird now provides a separate protocol for OpenOffice / LibreOffice.
When connecting from Base, use the protocol prefix jdbc:firebirdsql:oo:
. Be aware that this is a variant of the pure Java wire protocol and not the native or embedded protocol.
Issues addressed by this protocol:
ResultSet
s are not closed when a statements is finished (eg fully readResultSet
or when creating a new Statement inautoCommit
mode)DatabaseMetaData#getTablePrivileges(...)
reports privileges granted toPUBLIC
and to the current role (as reported byCURRENT_ROLE
) as being granted to the user (after Jaybird 2.2.0 beta 1).
Other fixes and changes
- Replaced
mini-j2ee.jar
withconnector-api-1.5.jar
: make sure to remove the oldmini-j2ee.jar
from the classpath of your application. - Dropped
jaybird-pool
jar from the distribution (all classes are include in thejaybird
jar and thejaybird-full
jar) FBResultSetMetaData#getcolumnName(int)
will now return the original column name (if available) for compliance with the JDBC specification,getColumnLabel(int)
will still return the alias (or the column name if no alias is defined). See Compatibility withcom.sun.rowset.*
for potential problems when using the reference implementation ofCachedRowSet
.FBDatabaseMetaData
has been updated to include metadata columns defined by JDBC 3.0, 4.0 and 4.1. This also changes the position ofOWNER_NAME
column in the result set ofgetTables(..)
as this column is Jaybird-specific and not defined in JDBC.FBDatabaseMetaData#getIndexInfo(..)
now also returns expression indexes. TheCOLUMN_NAME
column will contain the expression (if available).FBDatabaseMetaData#getIndexInfo(..)
now correctly limits the returned indexes to unique indexes when parameter unique is set to true.- The connection property
octetsAsBytes
can be used to identify fields withCHARACTER SET OCTETS
as being(VAR)BINARY
(in the resultsetmetadata only) - The
getTime()
,getDate()
,getTimestamp()
methods which take aCalendar
object now correctly handle conversions around Daylight Savings Time (DST) changes. Before the time was first converted to the local JVM timezone, and then to the timezone of the providedCalendar
, this could lose up to an hour in time. Now the time is converted directly to the timezone of the providedCalendar
. (JDBC-154)
See also the full release notes (2.2.2).
Jaybird 2.2.0-beta-1
Jaybird 2.1.6
Jaybird 2.1.6 released, with the following fixes:
- JDBC-97:
Blob.getBytes()
method should not allow position below 1 — not critical - JDBC-108: Problems with record result set to call primary composite — critical
- JDBC-119:
updateRow()
primary key violation issue — critical - JDBC-118: Remote PID and process name for FB 2.1 monitoring tables — not critical
Comments to JDBC-118:
The only platform independent solution turns out to be via the -D
property, therefore two new properties are implemented: org.firebirdsql.jdbc.pid
and org.firebirdsql.jdbc.processName
. If they are specified, values are passed to Firebird 2.1. Also one can use "normal" properties passed via URL or data source configuration. In this case, the property names are process_id
and process_name
.
With versions of Firebird prior to FB 2.1, using these properties will cause an exception while connecting to Firebird. A more intelligent solution will be implemented in Jaybird 2.2.