Subject Re: JayBird + Firebird Embedded on Win 7 x64
Author denixx.baykin

I builded sources using Ant.
Got jaybird-full-2.2.0.jar in output\lib folder.
Moved it to the project folder and added it as a external jar in Eclipse.

Ran the project and got the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jaybird22_x64 in java.library.path

After that i have added the jaybird22_x64.dll to the project folder.
Ran it and got another exception about database opening error.
Corrected the sql-code, added the database file from virtual machine WinXP x32 to the Win 7 x64 project (This database works in WinXP x32).

Corrected java-code
package test;

import java.sql.*;

public class Main {

public static void main(String[] args) throws ClassNotFoundException, SQLException {

Connection bd = DriverManager.getConnection("jdbc:firebirdsql:embedded:database.fdb");
Statement st = bd.createStatement();
//st.execute("create table if not exists 'TABLE1' ('name1' int, 'name2' text, 'name3' text);");
st.execute("delete from TABLE1; ");
st.execute("insert into TABLE1 (name1, name2, name3) values (1, 'name1', 'name2'); ");
st.execute("insert into TABLE1 (name1, name2, name3) values (2, 'name3', 'name4'); ");
st.execute("insert into TABLE1 (name1, name2, name3) values (3, 'name5', 'name6');");
ResultSet rs = st.executeQuery("select * from TABLE1");
while (
System.out.print (rs.getString(1)+" ");
System.out.print (rs.getString(2)+" ");

Ran this and got next exception:

Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.firebirdsql.gds.ClassFactory.get(
at org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getConnectionClass(
at org.firebirdsql.gds.impl.GDSFactory.getConnectionClass(
at org.firebirdsql.jca.FBManagedConnectionFactory.newConnection(
at org.firebirdsql.jca.FBManagedConnection.getConnection(
at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(
at org.firebirdsql.jdbc.FBDataSource.getConnection(
at org.firebirdsql.jdbc.FBDriver.connect(
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.Main.main(
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException
at$ Source)
at Method)
at Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more

What am I doing wrong?