Subject Generated keys functionality not available
Author

Hello,

The following code generate excepetion:

Connection con = DriverManager.getConnection(JDBC_URL, USER, PASSWORD);

String st[] = {"ID_CU"};

PreparedStatement stmt = con.prepareStatement("insert into cu (reg_id, price, type_cu) values (1, '1.0', 'V') returning ID_CU", st);

stmt.executeUpdate();



Allvarlig: Unable to load generated key parser. Generated keys functionality not available, most likely cause: antlr-runtime not available on classpath

java.lang.NoClassDefFoundError: org/antlr/v4/runtime/RecognitionException

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.firebirdsql.jdbc.AbstractGeneratedKeysQuery.<clinit>(AbstractGeneratedKeysQuery.java:62)

at org.firebirdsql.jdbc.FBConnection.prepareStatement(FBConnection.java:1130)


Any clue what cause it?

My goal is to return primary key of inserted column. I also tried without "returning".

Jaybird 3.0.1. Java 1.7. Windows 7


Br,
Hugo