# Jaybird Frequently Asked Questions

# Jaybird

## 1. Where do I get Jaybird?

### 1.1. Maven

#### 1.1.1. Jaybird 6

Jaybird 6 requires Java 17 or higher. For older Java versions (Java and higher), use Jaybird 5.

Jaybird 6 is available on Maven Central:

groupId | `org.firebirdsql.jdbc`
artifactId | `jaybird`
version | `6.0.3`

For example:

    <dependency>
        <groupId>org.firebirdsql.jdbc</groupId>
        <artifactId>jaybird</artifactId>
        <version>6.0.3</version>
    </dependency>

If you want to use Type 2 support (native or embedded), you need to add `jaybird-native` as a dependency:

    <dependency>
        <groupId>org.firebirdsql.jdbc</groupId>
        <artifactId>jaybird-native</artifactId>
        <version>6.0.3</version>
    </dependency>

If — with Jaybird 5 or older — you added `net.java.dev.jna:jna` for native or embedded use, you can remove that explicit dependency. The `jaybird-native` dependency will automatically pull in `net.java.dev.jna:jna-jpms` (the modular variant of `jna`).

For Windows and Linux, you can add the `org.firebirdsql.jdbc:fbclient` dependency on your classpath to provide the native libraries for the `native` protocol. Be aware that this dependency does not support `embedded`.

To enable the “ChaCha64” wire encryption support for pure Java connections, you need to add `chacha64-plugin` as a dependency:

    <dependency>
        <groupId>org.firebirdsql.jdbc</groupId>
        <artifactId>chacha64-plugin</artifactId>
        <version>6.0.3</version>
    </dependency>

#### 1.1.2. Jaybird 5

Unless you need to use Java 8 or Java 11, we recommend upgrading to Jaybird 6.

Jaybird 5 is available on Maven Central:

groupId | `org.firebirdsql.jdbc`
artifactId | `jaybird`
version | `5.0.9.<java>` (where `<java>` is `java11` or `java8`)

Contrary to Jaybird 4, a Maven relocation artifact with artifact id `jaybird-XX` (with `XX` `jdk17`, `jdk18`) is no longer provided. Please make sure you use the `jaybird` artifactId.

For example, for Java 11:

    <dependency>
        <groupId>org.firebirdsql.jdbc</groupId>
        <artifactId>jaybird</artifactId>
        <version>5.0.9.java11</version>
    </dependency>

If you want to use Type 2 support (native or embedded), you need to explicitly include JNA 5.17.0 as a dependency:

    <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>5.17.0</version>
    </dependency>

#### 1.1.3. Jaybird 4

Jaybird 4 is end-of-life and will receive no further updates. We recommend upgrading to Jaybird 6.

#### 1.1.4. Jaybird 3

Jaybird 3 is end-of-life and will receive no further updates. We recommend upgrading to Jaybird 6.

#### 1.1.5. Jaybird 2.2

Jaybird 2.2 is end-of-life and will receive no further updates. We recommend upgrading to Jaybird 6.

### 1.2. Download

Jaybird can be downloaded from the Firebird website, under Downloads, JDBC Driver.

Alternatively, you can go directly to GitHub and download Jaybird from the Jaybird releases.

## 2. Where can I get the sourcecode?

All Jaybird distribution zips contain a `jaybird-<version>-sources.zip` with the sources used for that specific version. The Maven Central repository also has the `jaybird-<version>-sources.zip`, and your IDE will generally offer to download it for you if you navigate to any Jaybird class.

The full Jaybird sources are available from GitHub in the Jaybird repository, https://github.com/FirebirdSQL/jaybird. Each release is tagged in the repository.

## 3. How is Jaybird licensed?

The Jaybird JDBC driver is distributed under the GNU Lesser General Public License (LGPL). Text of the license can be obtained from http://www.gnu.org/copyleft/lesser.html.

Using Jaybird (by importing Jaybird’s public interfaces in your Java code), and extending Jaybird by subclassing or implementation of an extension interface (but not abstract or concrete class) is considered by the authors of Jaybird to be dynamic linking. Hence, our interpretation of the LGPL is that the use of the unmodified Jaybird source does not affect the license of your application code.

Even more, all extension interfaces to which an application might want to link are released under a dual LGPL/modified BSD license. The latter is basically an "AS IS" license that allows any kind of use of that source code. Jaybird should be viewed as an implementation of those interfaces and the LGPL section for dynamic linking is applicable in this case.

### 3.1. Which version of the LGPL applies?

Current releases of Jaybird do not explicitly specify an LGPL version. This means that you can choose which version applies. Future versions of Jaybird may specify an explicit version, or be released under a different license.

## 4. Which Java versions are supported?

### Jaybird 6

Jaybird 6 supports Java 17, Java 21, and Java 24. Support for Java 17 and higher is limited to Java 17, Java 21, — once available — the latest LTS after Java 21, and the latest Java release.

### Jaybird 5

Jaybird 5 supports Java 8, Java 11, Java 17, Java 21, and Java 24. Support for Java 9 and higher is limited to Java 8, Java 11, Java 17, Java 21, — once available — the latest LTS version after Java 21, and the latest Java release.

Jaybird 5 is the last version to support Java 8 and Java 11, support has been dropped with Jaybird 6, raising the minimum supported version to Java 17.

| Jaybird 5 serves as a “long-term support” version for Java 8 and Java 11, with maintenance releases at least until the release of Jaybird 7. See also jdp-2022-03: Java 17 minimum version.

### Jaybird 4

Jaybird 4 supports Java 7, Java 8, Java 11, Java 17 and Java 21. Support for Java 9 and higher is limited to Java 11, Java 17 and Java 21.

Jaybird 4 is the last version to support Java 7, support was dropped with Jaybird 5. Jaybird 4.0.10 is the last release of Jaybird 4.

Jaybird 4 is end-of-life. We recommend upgrading to Jaybird 6.

### Jaybird 3

Jaybird 3 supports Java 7 and Java 8 and has basic support for Java 9 and higher using the Java 8 version of the driver. Support for Java 9 and higher is limited to Java 11 and 17, but in practice Jaybird should work on all Java 9+ versions upto Java 17[1]. Jaybird 3.0.12 is the last release of Jaybird 3.

Jaybird 3 is end-of-life. We recommend upgrading to Jaybird 6.

### Jaybird 2.2

Jaybird 2.2 supports Java 6, Java 7 and Java 8. Jaybird 2.2.15 is the last release of Jaybird 2.2.

Jaybird 2.2 is end-of-life. We recommend upgrading to Jaybird 6.

Jaybird 2.2.4 added basic support for Java 8 (JDBC 4.2), although not all JDBC 4.2 features are supported or fully implemented.

Jaybird 2.2.7 is the last version to support Java 5, support has been dropped with Jaybird 2.2.8.

Jaybird 2.2 is the last version to support Java 6, support has been dropped with Jaybird 3.

## 5. What is the Java 9 module name for Jaybird?

Jaybird 6 is modularized. The available modules are:

`org.firebirdsql.jaybird`

  main Jaybird driver (`jaybird-6.0.3.jar`)

`org.firebirdsql.jaybird.chacha64`

  ChaCha64 wire encryption implementation (`chacha64-plugin-6.0.3.jar`)

`org.firebirdsql.jna`

  native and embedded protocol implementation using JNA (`jaybird-native-6.0.3.jar`)

Jaybird 5 and older are not modularized. To ensure a stable module name, Jaybird 5 and older, since versions 2.2.14 and 3.0.3, declares the automatic module name `org.firebirdsql.jaybird`.

## 6. Which Firebird versions are supported?

### Jaybird 6

Jaybird 6 supports Firebird 3.0, Firebird 4.0, and Firebird 5.0.

| No promises on Firebird 6.0 support Firebird 6.0 is still in development, and includes changes — like schema support — that impact Jaybird. As a result — at this time — we make no promises on the support for Firebird 6.0 by Jaybird 6. We may delay support for Firebird 6.0 until Jaybird 7, or we may improve support during maintenance releases of Jaybird 6.

By default, Jaybird 6 — using the pure Java protocol — will not connect to Firebird 2.5 and older. See connection rejected by remote interface (335544421) for a workaround.

### Jaybird 5

Jaybird 5 supports Firebird 2.5, Firebird 3.0, Firebird 4.0, and Firebird 5.0.

| No promises on Firebird 6.0 support Firebird 6.0 is still in development, and includes changes — like schema support — that impact Jaybird. As a result — at this time — we make no promises on the support for Firebird 6.0 by Jaybird 5. We may delay support for Firebird 6.0 until Jaybird 7, or we may improve support during maintenance releases of Jaybird 5 and/or Jaybird 6.

Jaybird 5 is the last version to support Firebird 2.5.

### Jaybird 4

Jaybird 4 supports Firebird 2.5, Firebird 3.0 and Firebird 4.0, and introduces support for Firebird 4.0 types `DECLOAT`, extended precision of `NUMERIC` and `DECIMAL`, and time zone types (`TIME WITH TIME ZONE` and `TIMESTAMP WITH TIME ZONE`).

Jaybird 4 only provides partial support for Firebird 5.0, and the generated-keys support does not work in all cases due to Firebird 5.0 now supporting multi-row `RETURNING`. Full Firebird 5.0 support is available in Jaybird 5.

### Jaybird 3

Jaybird 3 supports Firebird 2.0, Firebird 2.1, firebird 2.5, Firebird 3.0, and Firebird 4.0. Support for Firebird 4.0 is limited to the Firebird 3.0 feature set. Formally, Firebird 5.0 is not supported, though in practice the problems are similar as described for Jaybird 4.

Jaybird 3 is the last version to support Firebird 2.0 and Firebird 2.1.

### Jaybird 2.2

Jaybird 2.2 supports Firebird versions Firebird 1.0, Firebird 1.5, Firebird 2.0, Firebird 2.1, Firebird 2.5, Firebird 3.0, and Firebird 4.0. Jaybird 2.2.4 added support for new features of Firebird 3.0 (e.g. `BOOLEAN` support). Support for Firebird 4.0 is limited to the Firebird 3.0 feature set.

Jaybird 2.2 is the last version to support Firebird 1.0 and Firebird 1.5.

## 7. Can Jaybird connect to Interbase?

Jaybird does not support Interbase, and as far as we know connecting to Interbase 6.0 and later will fail due to Firebird specific changes in the implementation.

## 8. Can Jaybird be used on Android

Jaybird does not work on Android. It uses classes and Java features which are not available on Android.

Instead, we recommend building a webservice (e.g. REST-based) to mediate between your Android application and the database.

# Documentation and Support

## 9. Where to get more information on Jaybird

Apart from this FAQ, you can get additional information from:

- Jaybird JDBC Driver Java Programmer’s Manual (HTML, PDF version) (covers Jaybird 4 and higher)

- Firebird website: Downloads, Connectivity, JDBC Driver

- Firebird website: Development, JDBC Driver

- Jaybird wiki

For version specific details, consult the release notes

- Jaybird 6.0.x release notes

- Jaybird 5.0.x release notes

- Jaybird 4.0.x release notes

- Jaybird 3.0.x release notes

- Jaybird 2.2.x release notes

## 10. Where to get help

- On Stack Overflow, please tag your questions with jaybird and firebird

- The Firebird-Java group and corresponding mailing list firebird-java@googlegroups.com

  You can subscribe to the mailing list by sending an email to firebird-java+subscribe@googlegroups.com

- Looking for professional support of Jaybird? Jaybird is now part of the Tidelift subscription.

- The Firebird project home page

- Firebird-support and other Firebird mailing lists for questions not directly related to Jaybird and Java.

## 11. Contributing

There are several ways you can contribute to Jaybird or Firebird in general:

- Participate on the mailing lists

- Report bugs or submit patches on the tracker (see Reporting Bugs)

- Create pull requests on GitHub (https://github.com/FirebirdSQL/jaybird)

- Become a developer (for Jaybird contact us on firebird-java, for Firebird in general, use the Firebird-devel mailing list)

- Donate to the Firebird Foundation (see https://firebirdsql.org/en/donate/)

- Become a paying Associate, Partner or sponsor of the Firebird Foundation (see https://firebirdsql.org/en/firebird-foundation/)

## 12. Reporting Bugs

The developers follow the firebird-java Google Group. Join the list and post information about suspected bugs. List members may be able to help out to determine if it is an actual bug, provide a workaround and get you going again, whereas bug fixes might take a while.

You can report bugs in the Jaybird bug tracker, https://github.com/FirebirdSQL/jaybird/issues.

When reporting bugs, please provide a minimal, but complete reproduction, including databases and sourcecode to reproduce the problem. Patches to fix bugs are also appreciated. Make sure the patch is against a recent master version of the code. You can also fork the Jaybird repository and create pull requests.

# Connecting to Firebird

## 13. JDBC URLs (`java.sql.DriverManager`)

### 13.1. Pure Java (default)

Default URL format:

    jdbc:firebirdsql://host[:port]/<database>

This will connect to the database using the Type 4 JDBC driver using the Java implementation of the Firebird wire-protocol. This is best suited for client-server applications with dedicated database server. Port can be omitted (default value is `3050`), host name must be present.

The `<host>` part is either the hostname, the IPv4 address, or the IPv6 address in brackets (eg `[::1]`). Use of IPv6 address literals is only supported in Jaybird 3 or newer with Firebird 3 or newer.

The `<database>` part should be replaced with the database alias or the path to the database. In general, it is advisable to use database aliases instead of the path of the database file as it hides implementation details like file locations and OS type.

On Linux the root `/` should be included in the path. A database located on `/opt/firebird/db.fdb` should use (note the double slash after port!):

    jdbc:firebirdsql://host:port//opt/firebird/db.fdb

Deprecated, but still supported legacy URL format:

    jdbc:firebirdsql:host[/port]:<database>

The legacy URL format does not support IPv6 address literals.

Jaybird 4 and higher also support:

    jdbc:firebird://host[:port]/<database>
    jdbc:firebird:host[/port]:<database>

### 13.2. OpenOffice/LibreOffice (Pure Java)

Jaybird 5 and earlier can be used together with OpenOffice and LibreOffice Base. To address some compatibility issues (and differences in interpretation of JDBC specifications) a separate sub-protocol is used:

    jdbc:firebirdsql:oo://host[:port]/<database>

Jaybird 4 and higher also support:

    jdbc:firebird:oo://host[:port]/<database>

| This URL format is deprecated with Jaybird 5 and was removed in Jaybird 6. As a replacement, use the “Firebird External” option in LibreOffice Base. See also jdp-2022-04: Deprecate OOREMOTE (OpenOffice/LibreOffice driver) for removal.

### 13.3. Native (using Firebird client library)

Default URL format:

    jdbc:firebirdsql:native://host[:port]/<database>

Legacy URL format:

    jdbc:firebirdsql:native:host[/port]:<database>

Type 2 driver, will connect to the database using client library (`fbclient.dll` on Windows, and `libfbclient.so` on Linux). Requires correct installation of the client library and — for Jaybird 2.2 or earlier — the Jaybird native library, or — for Jaybird 3 and higher — the JNA jar file.

    jdbc:firebirdsql:local:<database>

Type 2 driver in local mode. Uses client library as in previous case, however will not use socket communication, but rather access database directly. Requires correct installation of the client library and — for Jaybird 2.2 or earlier —  the Jaybird native library, or — for Jaybird 3 and higher — the JNA jar file.

Jaybird 4 and higher also support:

    jdbc:firebird:native://host[:port]/<database>
    jdbc:firebird:native:host[/port]:<database>
    jdbc:firebird:local:<database>

| As of Jaybird 5, the separate “LOCAL” protocol implementation has been removed. The JDBC URL sub-protocol `jdbc:firebirdsql:local` and `jdbc:firebird:local` are still supported but are now simply aliases for “`native`”.

### 13.4. Embedded Server

    jdbc:firebirdsql:embedded:<database>

Similar to the Firebird client library, however `fbembed.dll` on Windows and `libfbembed.so` on Linux are used, falling back to `fbclient.dll`/`libfbclient.so` under the assumption it provides Embedded functionality. Requires correctly installed and configured Firebird embedded library and — for Jaybird 2.2 or earlier — the Jaybird native library, or — for Jaybird 3 and higher — the JNA jar file.

Jaybird 4 and higher also support:

    jdbc:firebird:embedded:<database>

## 14. Character sets

### 14.1. How can I specify the connection character set?

Jaybird provides two connection properties to specify the connection character set:

- `charSet` with a Java character set name (alias: `localEncoding`)

  The Java character set name must map to an equivalent Firebird character set.

- `encoding` with a Firebird character set name (alias: `lc_ctype`)

  The Firebird character set name — except `NONE`— must map to an equivalent Java character set.

For most applications, use only one of these two properties.

For special situations it is possible to specify both `charSet` and `encoding` to convert/reinterpret a character set into another character set, this is usually only necessary to fix data problems.

To phrase differently:

- `encoding=<firebird charset>`: use connection encoding `<firebird charset>` and interpret in the equivalent Java character set

- `charSet=<java charset>`: use Firebird equivalent of `<java charset>` as connection encoding and interpret in `<java charset>`

- `encoding=<firebird charset>&charSet=<java charset>`: use connection encoding `<firebird charset>`, but interpret in `<java charset>`

The handling of Firebird character set `NONE` is slightly different, see below.

### 14.2. How does character set `NONE` work?

The Firebird character set `NONE` is a special case, it essentially means “no character set”. You can store anything in it, but conversions to or from this character set are not defined.

Using character set `NONE` can result in incorrect character set handling when the database is used from different locales.

When used as a connection character set, Jaybird handles `NONE` as follows:

#### 14.2.1. Jaybird 3 and higher

- `encoding=NONE` means connection encoding `NONE` and interpret columns with character set `NONE` using the default JVM encoding, and interpret columns with an explicit character set in their equivalent Java character set

- `encoding=NONE&charSet=ISO-8859-1` the same, but instead of the JVM default, use `ISO-8859-1`

#### 14.2.2. Jaybird 2.2 and earlier

- `encoding=NONE` means use connection encoding `NONE` and interpret everything using the default JVM encoding

- `encoding=NONE&charSet=ISO-8859-1` the same, but instead of the JVM default, use `ISO-8859-1`

### 14.3. What happens if no connection character set is specified?

When no character set has been specified explicitly, Jaybird 2.2 and earlier, and Jaybird 3.0.2 and higher default to connection character set `NONE`. See How does character set `NONE` work? for details on character set `NONE`.

Jaybird 3.0.0 and 3.0.1, however, will reject the connection, see How can I solve the error "Connection rejected: No connection character set specified".

In Jaybird 3 it is possible to override the default connection character set by specifying system property `org.firebirdsql.jdbc.defaultConnectionEncoding` with a valid Firebird character set name.

Jaybird 3.0.2 introduces the system property `org.firebirdsql.jdbc.requireConnectionEncoding`, which — when set to `true`— will reject connections without a character set (which was the default behavior in Jaybird 3.0.0 and 3.0.1).

### 14.4. How can I solve the error "Connection rejected: No connection character set specified"

If no character set has been set, Jaybird 3 and higher may reject the connection with an `SQLNonTransientConnectionException` with message "Connection rejected: No connection character set specified (property lc_ctype, encoding, charSet or localEncoding). Please specify a connection character set (e.g. property charSet=utf-8) or consult the Jaybird documentation for more information."

In Jaybird 3.0.0 and 3.0.1 this error will be thrown if the character set has not been set explicitly. In Jaybird 3.0.2 and higher this error will only be thrown if system property `org.firebirdsql.jdbc.requireConnectionEncoding` has been set to `true`.

To address this error, you can set the default connection character set using one of the following options:

- Use connection property `encoding` (alias: `lc_ctype`) with a Firebird character set name.

  Use `encoding=NONE` for the default behavior (with some caveats, see How does character set `NONE` work?).

- Use connection property `charSet` (alias: `localEncoding`) with a Java character set name.

- Use a combination of `encoding` and `charSet`, if you want to reinterpret a Firebird character set in a Java character set other than the default mapping.

- By providing a default Firebird character set with system property `org.firebirdsql.jdbc.defaultConnectionEncoding`. Jaybird will apply the specified character set as the default when no character set is specified in the connection properties.

  This property only supports Firebird character set names.

  Use `-Dorg.firebirdsql.jdbc.defaultConnectionEncoding=NONE` to revert to the default behavior (with some caveats, see How does character set `NONE` work?). With Jaybird 3.0.2 or higher, it is better to just not set system property `org.firebirdsql.jdbc.requireConnectionEncoding` if you want to apply `NONE`.

## 15. How can I enable the Windows "TCP Loopback Fast Path" introduced in Firebird 3.0.2?

| Microsoft has deprecated the `SIO_LOOPBACK_FAST_PATH` and recommends not to use it. Support was removed in Firebird 5.0.

Firebird 3.0.2 adds support for “TCP Loopback Fast Path” (`SIO_LOOPBACK_FAST_PATH` socket option); support was removed in Firebird 5.0. This is available in Windows 8 / Windows Server 2012 and higher. This feature enables performance optimizations when connecting through localhost (127.0.0.1 / ::1). It requires support on both client and server side.

Java support for "TCP Loopback Fast Path" was introduced in Java 8 update 60, it can be enabled by specifying the system property `jdk.net.useFastTcpLoopback` with value `true` (e.g. specify `-Djdk.net.useFastTcpLoopback=true` in your Java commandline).

Unfortunately, Java only has an 'all-or-nothing' support for the “TCP Loopback Fast Path”, so Jaybird cannot enable this for you: you must specify this property on JVM startup. On the other hand, this has the benefit that this works for all Jaybird versions, as long as you use Java 8 update 60 or higher (and Firebird 3.0.2 or higher, but before 5.0.0).

## 16. Common connection errors

### 16.1. Your user name and password are not defined. Ask your database administrator to set up a Firebird login. (335544472)

This error means that the user does not exist, or that the specified password is not correct.

The following are common causes authentication can fail with the same error even if the username and password are correct.

#### 16.1.1. Cause: authentication plugin mismatch

When connecting to Firebird 3.0 and higher, this error can also mean that the user does exist (with that password), but not for the authentication plugins tried for this connection. The list of authentication plugins tried is the conjunction of the plugins offered by the client (connection property `authPlugins`) and the `AuthServer` setting in firebird.conf.

For example, Jaybird 2.2.x and earlier only support legacy authentication, if you try to log in as a user created with the Srp user manager, you will get the same error.

Similarly, Jaybird 4 and higher — by default — only connect using the Srp256 and Srp authentication plugins, which means only users created with the Srp user manager can be authenticated, and users created with Legacy_UserManager cannot be authenticated. The recommended solution is to create the user for the Srp user manager (e.g. see Firebird 5.0 `CREATE USER`, specifically the `USING PLUGIN …​` clause). Alternatively, you can set connection property `authPlugins` to `Srp256,Srp,Legacy_Auth` to also try legacy authentication, see also Authentication plugins in the Jaybird manual.

You can check — as `SYSDBA`, or with `RDB$ADMIN` in the security database — what user manager(s) were used to create a user in the `SEC$USERS` virtual table.

#### 16.1.2. Cause: case-sensitive username

With Firebird 3.0 and higher, this error can also be the result of using a case-sensitive username (i.e. the username was quoted, e.g. `CREATE USER "lowercaseuser" …​`).

To login, you must surround the username with quotes so it’s handled case-sensitive. In a Java string literal, that means using `"\"lowercaseuser\""` instead of `"lowercaseuser"`.

### 16.2. Incompatible wire encryption levels requested on client and server (335545064)

With Jaybird 3.0.0 - 3.0.3 connecting to Firebird 3.0 or higher, this usually means that the setting `WireCrypt` is set to its (default) value of `Required`.

Upgrade to Jaybird 3.0.4 or higher, or relax this setting (in `firebird.conf`) to `WireCrypt = Enabled`.

See also Jaybird Wiki — Jaybird and Firebird 3.

With Jaybird 3.0.4 or higher, or Jaybird 4, this error means that you have requested a connection with a mismatch in encryption settings. For example, you specified connection property `wireCrypt=required` while Firebird is set to `WireCrypt = Disabled` (or vice versa).

### 16.3. connection rejected by remote interface (335544421)

In general this error means that Jaybird requested a connection with properties not supported by Firebird. It can have other causes than described below.

#### 16.3.1. Cause: username or password is null

With Jaybird 3 and Jaybird 4 connecting to Firebird 3.0 or higher, leaving username or password null will lead to Jaybird not trying any authentication plugin, and as a result Firebird will reject the connection.

With Firebird 2.5 and earlier, or Jaybird 2.2 or earlier, or Jaybird 5 or higher, this situation will yield error “Your user name and password are not defined. Ask your database administrator to set up a Firebird login.”

#### 16.3.2. Cause: wirecrypt required

With Jaybird 2.2.x connecting to Firebird 3.0 or higher, this usually means that the setting `WireCrypt` is set to its (default) value of `Required`.

Relax this setting (in `firebird.conf`) to `WireCrypt = Enabled`.

See also Jaybird Wiki — Jaybird and Firebird 3.

Make sure you check the other settings mentioned in that article, otherwise you’ll get another error (Error occurred during login, please check server firebird.log for details (335545106)).

#### 16.3.3. Cause: unsupported protocol version

Since Jaybird 6, protocol versions of unsupported Firebird versions are no longer tried by default with pure Java connections. Connecting to unsupported Firebird versions with the pure Java protocol can result in this error.

There are two options to address this:

1. Specify connection property `enableProtocol` with a list of unsupported protocol versions to try in addition to the supported protocol versions, or `"*"` to try all available protocol versions (e.g. `enableProtocol=12` to try protocol 12 (Firebird 2.5) or `enableProtocol=*` to try all unsupported protocols).

2. Use a native connection instead of a pure Java connection.

Be aware that Jaybird is not guaranteed to function correctly on unsupported Firebird versions.

### 16.4. Error occurred during login, please check server firebird.log for details (335545106)

If the logging contains something like

    SERVER	Sat Oct 28 10:07:26 2017
    	Authentication error
    	No matching plugins on server

With Jaybird 2.2 connecting to Firebird 3.0 or higher, this means that the setting `AuthServer` does not include the `Legacy_Auth` plugin. Enable `Legacy_Auth` (in `firebird.conf`) by adding this value to the property `AuthServer`, for example: `AuthServer = Srp, Legacy_Auth`. You also need to make sure your user is created with the legacy user manager, see Jaybird Wiki — Jaybird and Firebird 3 for details.

With Jaybird 4 and higher, this can also mean that none of the default authentication plugins, or those specified using connection property `authPlugins`, are listed in the `AuthServer` setting. Either revise the Firebird configuration, or explicitly configure connection property `authPlugins` with authentication plugins that are configured in Firebird.

### 16.5. Encryption key did not meet algorithm requirements of Symmetric/Arc4 (337248282)

If the exception cause is java.security.InvalidKeyException: Illegal key size or default parameters, this means that your Java installation applies a security policy that does not allow ARCFOUR with a 160 bit encryption key.

If `wireCrypt=ENABLED` (the default), this is just logged as a warning. The connection will succeed, but it does mean that the connection will not be encrypted. If `wireCrypt=REQUIRED`, this is thrown as an exception, and the connection will fail.

This could indicate that your Java version applies the limited strength Cryptographic Jurisdiction Policy (this was the default in Java 8 Update 152 and earlier), or has been explicitly configured to apply the limited policy, or has a custom security policy to restrict the cryptographic key size.

Solutions and workarounds:

- Apply the unlimited Cryptographic Jurisdiction Policy, see this Stack Overflow answer

- Relax your custom security policy to allow 160 bit keys for ARCFOUR

- Disable wire encryption for Firebird by setting `WireCrypt = Disabled` in `firebird.conf`

- Set `wireCrypt=DISABLED` in the connection properties

Be aware that the first two options may have legal implications depending on the local law in your country regarding cryptography.

# JDBC Support

## 17. How much of JDBC is supported by Jaybird?

WARNING The information in this section is not 100% up-to-date

Jaybird 4 follows the JDBC 4.3 specification with some features and methods not implemented as they are not supported by Firebird.

Implemented features:

- Most useful JDBC functionality (“useful” in the opinion of the developers).

- XA transactions with true two phase commit when used via `javax.sql.XADataSource` implementation `org.firebirdsql.ds.FBXADataSource`.

- `ObjectFactory` implementation `org.firebirdsql.ds.DataSourceFactory` for use in environments with JNDI but no `TransactionManager`.

- `DataSource` implementation `org.firebirdsql.ds.FBSimpleDataSource` (no pooling).

- `ConnectionPoolDataSource` implementation `org.firebirdsql.ds.FBConnectionPoolDataSource` (please be aware, contrary to suggested by the naming, this does not provide connection pooling, this is intended as a factory of connections for use by a connection pool, e.g. as provided by a Java EE/Jakarta EE application server)

- Complete access to all Firebird database parameter block and transaction parameter block settings.

- JMX mbean for database management (so far just database create and drop).

## 18. What parts of JDBC are NOT supported by Jaybird?

WARNING The information in this section is outdated

The following optional features are NOT supported:

The following optional features and the methods that support it are not implemented:

- Ref and Array types.

  - `java.sql.PreparedStatement`

    - `setRef(int i, Ref x)`

    - `setArray(int i, Array x)`

  - `java.sql.ResultSet`

    - `getArray(int i)`

    - `getArray(String columnName)`

    - `getRef(int i)`

    - `getRef(String columnName)`

- User Defined Types/Type Maps.

  - `java.sql.ResultSet`

    - `getObject(int i, java.util.Map map)`

    - `getObject(String columnName, java.util.Map map)`

  - `java.sql.Connection`

    - `getTypeMap()`

    - `setTypeMap(java.util.Map map)`

Excluding the unsupported features, the following methods are not yet implemented:

- `java.sql.Blob`

  - `position(byte pattern[], long start)`

  - `position(Blob pattern, long start)`

  - `getBinaryStream(long pos, long length)`

  - `truncate(long len)`

- `java.sql.Clob`

  - `length()`

  - `truncate(long len)`

  - `position(String searchstr, long start)`

  - `position(Clob searchstr, long start)`

  - `getCharacterStream(long pos, long length)`

The following methods are implemented, but do not work as expected:

- `java.sql.Statement`

  - `get/setMaxFieldSize` does nothing

  - `get/setQueryTimeout` supported since Jaybird 4 with Firebird 4.0 and higher

- `java.sql.PreparedStatement`

  - `setObject(index,object,type)` This method is implemented but behaves as `setObject(index,object)`

  - `setObject(index,object,type,scaleOrLength)` This method is implemented but behaves as `setObject(index,object)`, except if `object` is a `Reader` or `InputStream`, then it is directed to the `setBinaryStream` or `setCharacterStream` method accepting a length.

- `java.sql.CallableStatement`

  - `getBigDecimal(index,scale)` This method is implemented but behaves as `getBigDecimal(index)`. The method is deprecated, and we suggest using `getBigDecimal(index)` and adjust the scale of the returned `BigDecimal` using `BigDecimal.setScale(newScale,roundingMode)`

- `java.sql.ResultSetMetaData`

  - `isReadOnly(i)` always returns false

  - `isWritable(i)` always returns true

  - `isDefinitivelyWritable(i)` always returns true

- `java.sql.ResultSet`

  - `getBigDecimal(index,scale)` This method is implemented but behaves as `getBigDecimal(index)`. The method is deprecated, and we suggest using `getBigDecimal(index)` and adjust the scale of the returned `BigDecimal` using `BigDecimal.setScale(newScale,roundingMode)`

# Features

## 19. Does Jaybird support connection pooling?

Jaybird itself no longer provides connection pooling. Earlier versions had a `DataSource` implementation with connection pooling, but this implementation had severe bugs. This implementation (and all other classes in `org.firebirdsql.pool`) was deprecated in Jaybird 2.2 and dropped in Jaybird 3.

Jaybird provides a basic `DataSource`, an `XADataSource`, and a `ConnectionPoolDataSource` implementation. Contrary to its name, the latter does not provide a connection pool, but is intended to be used by a connection pool (as implemented in an application server) to create connections for a connection pool.

If your application is built on a Java EE/Jakarta EE application server, we suggest you use the connection pooling provided by the application server using the `javax.sql.ConnectionPoolDataSource` implementation `org.firebirdsql.ds.FBConnectionPoolDataSource`, or using the `javax.sql.XADataSource` implementation `org.firebirdsql.ds.FBXADataSource`.

If you develop standalone applications, or you use an application server without connection pooling, we suggest you use third-party libraries like:

- HikariCP

- c3p0

- Apache DBCP

# Compatibility notes

## 20. Wildfly

The minimal `module.xml` to use Jaybird 3 under Wildfly is:

    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.0" name="org.firebirdsql">
      <resources>
        <resource-root path="jaybird-3.0.x.jar"/>
      </resources>
      <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.resource.api"/>
      </dependencies>
    </module>

With Jaybird 3.0.4 and higher for Java 7 (but not Java 8!) in Wildfly (or JBoss), you will need to add the module `javax.xml.bind.api` to your module:

    <?xml version="1.0" encoding="UTF-8"?>
    <module xmlns="urn:jboss:module:1.0" name="org.firebirdsql">
      <resources>
        <resource-root path="jaybird-3.0.x.jar"/>
      </resources>
      <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        <module name="javax.resource.api"/>
        <module name="javax.xml.bind.api"/> <!-- Add this -->
      </dependencies>
    </module>

Alternatively, use Jaybird for Java 8 (or higher).

## Appendix A: License Notice

The contents of this Documentation are subject to the Public Documentation License Version 1.0 (the “License”); you may only use this Documentation if you comply with the terms of this License. A copy of the License is available at https://firebirdsql.org/en/public-documentation-license/.

The Original Documentation is “Jaybird Frequently Asked Questions”. The Initial Writer of the Original Documentation is Mark Rotteveel, Copyright © 2013-2025. All Rights Reserved. (Initial Writer contact(s): mark (at) lawinegevaar (dot) nl).

Contributor(s): Rick Fincher.
Portions created by Rick Fincher are Copyright © 2002-2004. All Rights Reserved. (Contributor contact(s): unknown).

The exact file history is recorded in our Git repository; see https://github.com/FirebirdSQL/jaybird

1. versions after Java 17 have not been tested