近期一项目要用到桌面数据库,access太不安全,本来想用sybase,可惜sybase的人报价说不限用户的ASA版本要500W,真是强盗,无奈上网查了下,很多人说firebird不错,于是就决定用这个了。先在sourceforge下载了firebird并安装了,又下载了FbMaestro。我用FbMaestro建了一个embedded类型的数据库,地址为D:\Project\test.fdb,在数据库里创建了表并加入了部分数据。但是在Java程序中怎么都连接不上这个数据库。请各位大侠指点下。一下是我的数据库链接程序和报错代码:driverName = "org.firebirdsql.jdbc.FBDriver";
URLName = "jdbc:firebirdsql:embedded:E:/Project/test.fdb";
user = "sysdba";
password = "masterkey";Failed to initilize Jaybird native library. This is most likley due to a failure to load the firebird client library.
java.lang.RuntimeException: Failed to initilize Jaybird native library. This is most likley due to a failure to load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:100)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:31)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:21)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getGDS(EmbeddedGDSFactoryPlugin.java:40)
at org.firebirdsql.gds.impl.GDSFactory.getGDSForType(GDSFactory.java:219)
at org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:117)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:125)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ConnPool.ConnObject.getConn(ConnObject.java:83)
at ConnPool.ConnectionPool.addOneConnToPoll(ConnectionPool.java:178)
at ConnPool.ConnectionPool.initPoll(ConnectionPool.java:222)
at ConnPool.ConnectionPool.<clinit>(ConnectionPool.java:51)
at ConnPool.DatabaseAccess.<init>(DatabaseAccess.java:24)
at main.Main.main(Main.java:23)
URLName = "jdbc:firebirdsql:embedded:E:/Project/test.fdb";
user = "sysdba";
password = "masterkey";Failed to initilize Jaybird native library. This is most likley due to a failure to load the firebird client library.
java.lang.RuntimeException: Failed to initilize Jaybird native library. This is most likley due to a failure to load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:100)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:31)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSImpl.<init>(EmbeddedGDSImpl.java:21)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getGDS(EmbeddedGDSFactoryPlugin.java:40)
at org.firebirdsql.gds.impl.GDSFactory.getGDSForType(GDSFactory.java:219)
at org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:117)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:125)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at ConnPool.ConnObject.getConn(ConnObject.java:83)
at ConnPool.ConnectionPool.addOneConnToPoll(ConnectionPool.java:178)
at ConnPool.ConnectionPool.initPoll(ConnectionPool.java:222)
at ConnPool.ConnectionPool.<clinit>(ConnectionPool.java:51)
at ConnPool.DatabaseAccess.<init>(DatabaseAccess.java:24)
at main.Main.main(Main.java:23)
libfbclientlibrary的jar包?
http://www.firebird.net.cn/forum_list.asp?forum_id=9
URLName = "jdbc:firebirdsql:127.0.0.1:E:/Project/test.fdb?sql_dialect=1";