FirebirdSQL / jaybird

JDBC driver for Firebird
https://firebirdsql.org/en/jdbc-driver/
GNU Lesser General Public License v2.1
94 stars 23 forks source link

Upgrade ANTLR in Jaybird 4, or backport new parser of Jaybird 5 into Jaybird 4 #718

Closed mrotteveel closed 2 years ago

mrotteveel commented 2 years ago

Jaybird 4 (and Jaybird 3) use ANTLR 4.7 for the generated keys facility. Unfortunately, ANTLR 4.10 introduced an incompatible change, changing the ATN version, which for example causes problems when trying to use Hibernate 6 in combination with Jaybird 4.

This results in an error:

java.io.InvalidClassException: org.antlr.v4.runtime.atn.ATN; Could not deserialize ATN with version 3 (expected 4).

We either need to upgrade to ANTLR 4.10 or higher (latest is 4.11.1), or backport #680 to Jaybird 4. Backporting is probably preferable as it avoids issues with people relying on earlier ANTLR versions for other things, but might introduce minor backwards incompatibilities with generated keys detection.

mrotteveel commented 2 years ago

Decide to remove dependency on ANTLR and backport #680.