Subject | Re: [Firebird-Java] Console warnings |
---|---|
Author | Mark Rotteveel |
Post date | 2018-10-18T06:25:07Z |
On 2018-10-17 19:45, Luiz Paulo lpos1972@... [Firebird-Java]
wrote:
closing a lot of connection. Consider using a connection pool library
(eg HikariCP), so you can reuse connections.
mean, it is about the warning being logged with
"org.firebirdsql.gds.ng.wire.crypt.FBSQLEncryptException: Encryption key
did not meet algorithm requirements of Symmetric/Arc4 [SQLState:28000,
ISC error code:337248282]"
This warning means that the security policy of your Java installation
disallows ARCFOUR with a 160 bits key. Generally this means that the
Java installation is applying the limited strength cryptography policy
(the default before Java 8 update 161)
Specifically this warning can be fixed in several ways:
1. Change your Java encryption policy from limited to unlimited. See
also the Jaybird 3 release notes:
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/release_notes.html#wire-encryption-support
and the Jaybird FAQ
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/faq.html#encryption-key-did-not-meet-algorithm-requirements-of-symmetricarc4-337248282
The easiest fix is to update Java to Java 8 update 161 or higher, as in
that version the default changed from limited to unlimited.
2. Specify connection property wireCrypt=DISABLED
3. Disable wire encryption in the Firebird configuration
Option 1 should be preferred, option 3 should be a last resort as it
will disable encryption entirely.
As to logging in general, Jaybird 3 switched to logging using
java.util.logging by default (previous versions used Log4J if it was
present, otherwise it didn't log). java.util.logging by defaults logs to
the console. You can either:
1. You can change this by configuring the logging (eg make it write to a
log file, ignore logging from org.firebirdsql.*, etc) see
https://docs.oracle.com/javase/8/docs/technotes/guides/logging/ (this
documentation is rather terse though, so it may be worthwhile to search
for a tutorial on this),
2. Use a logging redirection library from - for example - slf4j to
redirect logging to the logging framework you do use, or
3. You can disable logging entirely by specifying system property
org.firebirdsql.jdbc.disableLogging with value true (eg
-Dorg.firebirdsql.jdbc.disableLogging=true in your Java command line),
see also the Jaybird 3 release notes
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/release_notes.html#support-for-java.util.logging-added
4. You can also implement your own logger and specify it (see previous
link for details).
Mark
wrote:
> Hi Mark.If you have this with a swing application, it means you are creating and
>
> I use JayBird 3.0.5 in Netbeans 9.
>
> It is working fine when I use Swing, but in console I have a lot of
> warnings and messages. Pratically the console is floody with
> alerts/warnings/messages.
closing a lot of connection. Consider using a connection pool library
(eg HikariCP), so you can reuse connections.
> I know the warnings is about the encrypt plugin (fail). I am notThe list doesn't support attachment, so that everyone knows what you
> using this. There is a file attached in e-mail with the warnings. I
> KNOW THIS IS NOT A JAYBIRD'S BUG. But I need the console cleany.
>
> So I ask, is possible to disable the Jaybird's warnings?
mean, it is about the warning being logged with
"org.firebirdsql.gds.ng.wire.crypt.FBSQLEncryptException: Encryption key
did not meet algorithm requirements of Symmetric/Arc4 [SQLState:28000,
ISC error code:337248282]"
This warning means that the security policy of your Java installation
disallows ARCFOUR with a 160 bits key. Generally this means that the
Java installation is applying the limited strength cryptography policy
(the default before Java 8 update 161)
Specifically this warning can be fixed in several ways:
1. Change your Java encryption policy from limited to unlimited. See
also the Jaybird 3 release notes:
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/release_notes.html#wire-encryption-support
and the Jaybird FAQ
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/faq.html#encryption-key-did-not-meet-algorithm-requirements-of-symmetricarc4-337248282
The easiest fix is to update Java to Java 8 update 161 or higher, as in
that version the default changed from limited to unlimited.
2. Specify connection property wireCrypt=DISABLED
3. Disable wire encryption in the Firebird configuration
Option 1 should be preferred, option 3 should be a last resort as it
will disable encryption entirely.
As to logging in general, Jaybird 3 switched to logging using
java.util.logging by default (previous versions used Log4J if it was
present, otherwise it didn't log). java.util.logging by defaults logs to
the console. You can either:
1. You can change this by configuring the logging (eg make it write to a
log file, ignore logging from org.firebirdsql.*, etc) see
https://docs.oracle.com/javase/8/docs/technotes/guides/logging/ (this
documentation is rather terse though, so it may be worthwhile to search
for a tutorial on this),
2. Use a logging redirection library from - for example - slf4j to
redirect logging to the logging framework you do use, or
3. You can disable logging entirely by specifying system property
org.firebirdsql.jdbc.disableLogging with value true (eg
-Dorg.firebirdsql.jdbc.disableLogging=true in your Java command line),
see also the Jaybird 3 release notes
https://www.firebirdsql.org/file/documentation/drivers_documentation/java/3.0.x/release_notes.html#support-for-java.util.logging-added
4. You can also implement your own logger and specify it (see previous
link for details).
Mark