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

JDBC encoding / charSet [JDBC510] #546

Closed
firebird-automations opened this issue Sep 26, 2017 · 2 comments
Closed

JDBC encoding / charSet [JDBC510] #546

firebird-automations opened this issue Sep 26, 2017 · 2 comments

Comments

@firebird-automations
Copy link

Submitted by: Dragos Pruteanu (dprutean)

I have problems connecting through JDBC to Firebird database.
In the latest version I tried
jdbc:firebirdsql://192.168.216.131:3050/C:/samplesFirebird/EMPLOYEES.FDB?encoding=UTF8
jdbc:firebirdsql://192.168.216.131:3050/C:/samplesFirebird/EMPLOYEES.FDB?encoding=NONE
jdbc:firebirdsql://192.168.216.131:3050/C:/samplesFirebird/EMPLOYEES.FDB?charSet=NONE
jdbc:firebirdsql://192.168.216.131:3050/C:/samplesFirebird/EMPLOYEES.FDB?charSet=UTF8
and none of them works. I used this from inside a database tool called DbSchema ( you can try it yourself the trial from http://www.dbschema.com ).

It is bad that you added a mandatory parameter charSet to the URL. This breaks the compatibility with previous versions.
The charSet or encoding should be optional, if none is provided the driver should still work.

The errors are 'Incompatible wire encryption levels .... ' or 'No valid encoding definition...'

Thank you,
Dragos Pruteanu

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

The requirement to specify a connection character set was dropped with Jaybird 3.0.2, so if your main complaint is about that, then you are not using Jaybird 3.0.2, but an earlier version (3.0.0 or 3.0.1).

As to the "No valid encoding definition" error, the `charSet` property expects a Java character set name, and NONE is not a Java character set name, but a Firebird character set. Use property encoding instead if you want to specify NONE (see also https://www.firebirdsql.org/file/documentation/drivers_documentation/java/faq.html#how-can-i-specify-the-connection-character-set) .

As to the "Incompatible wire encryption levels" error, Firebird 3 by default requires wire protocol encryption, which Jaybird 3 doesn't support (it will be available in Jaybird 4). You need to configure Firebird (in firebird.conf) by setting WireCrypt to Enabled as documented:
- https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.2/release_notes.html#notes-on-firebird-3-support
- https://github.com/FirebirdSQL/jaybird/wiki/Jaybird-and-Firebird-3

PS This is really a support question, and the tracker is intended for bug reports only. In the future could you post these types of questions to the Firebird-Java mailinglist instead . And if you do post a bug report, then please make sure you post all relevant reproduction information (steps to reproduce or a sample program, full exception stacktraces and logs).

@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