Subject | org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544653. cannot attach to password database |
---|---|
Author | Marthyn Mayerhofer |
Post date | 2012-08-20T12:49:45Z |
Hi,
I am trying to connect to the example "employee.fdb" database on my ubuntu
system and I'm getting following exception when running the program via my
IDE (Intellij IDEA):
Library Path: /home/rgba/git/firebird_test
Working Directory: /home/rgba/git/firebird_test
DriverManager.getConnection("jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8")
trying
driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@2fe4cbc4
]
*Driver.connect (jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8)
trying
driver[className=org.firebirdsql.jdbc.FBDriver,org.firebirdsql.jdbc.FBDriver@24a20892
]
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
SQLState(HY000) vendor code(335544653)
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544653. cannot
attach to password database
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:123)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
getConnection failed: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
335544653. cannot attach to password database
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544653. cannot
attach to password database
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:123)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.firebirdsql.gds.GDSException: cannot attach to password
database
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.native_isc_attach_database(Native
Method)
at
org.firebirdsql.gds.impl.jni.BaseGDSImpl.iscAttachDatabase(BaseGDSImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.firebirdsql.gds.impl.jni.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.invoke(GDSSynchronizationPolicy.java:119)
at $Proxy0.iscAttachDatabase(Unknown Source)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:101)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:482)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
... 9 more
I've created a github repo containing all the code & libraries which I'm
using:
https://github.com/rgba/firebird_test
the project should compile via maven:
Command:
PROMPT> mvn clean install
There is a run.sh in the root of the project which you can use to run the
program once it has been compiled, but it there is a different error
showing up when the program is run via the command line (see below), I'm
not sure why there is a difference between the execution via IDE and
command line, since the java.library.path and user.dir are the same.
Output when run via the command line:
PROMPT> ./run.sh
java -Djava.library.path=/home/rgba/git/firebird_test -classpath
/home/rgba/git/firebird_test/lib/jaybird-full-2.2.0.jar:/home/rgba/git/firebird_test/target/classes:/home/rgba/git/firebird_test/lib/log4j-1.2.16.jar:.
FBConnect
Library Path: /home/rgba/git/firebird_test
Working Directory: /home/rgba/git/firebird_test
DriverManager.getConnection("jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8")
trying
driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@7ecd2c3c
]
*Driver.connect (jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8)
trying
driver[className=org.firebirdsql.jdbc.FBDriver,org.firebirdsql.jdbc.FBDriver@4506411
]
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
java.lang.RuntimeException: Failed to initialize Jaybird native library.
This is most likely due to a failure to load the firebird client library.
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:105)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
My system specs:
OS:
Ubuntu 12.04_amd64
Java Version:
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
Thanks for your help,
Martin
[Non-text portions of this message have been removed]
I am trying to connect to the example "employee.fdb" database on my ubuntu
system and I'm getting following exception when running the program via my
IDE (Intellij IDEA):
Library Path: /home/rgba/git/firebird_test
Working Directory: /home/rgba/git/firebird_test
DriverManager.getConnection("jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8")
trying
driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@2fe4cbc4
]
*Driver.connect (jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8)
trying
driver[className=org.firebirdsql.jdbc.FBDriver,org.firebirdsql.jdbc.FBDriver@24a20892
]
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
SQLState(HY000) vendor code(335544653)
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544653. cannot
attach to password database
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:123)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
getConnection failed: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
335544653. cannot attach to password database
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544653. cannot
attach to password database
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:123)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:126)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.firebirdsql.gds.GDSException: cannot attach to password
database
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.native_isc_attach_database(Native
Method)
at
org.firebirdsql.gds.impl.jni.BaseGDSImpl.iscAttachDatabase(BaseGDSImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.firebirdsql.gds.impl.jni.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.invoke(GDSSynchronizationPolicy.java:119)
at $Proxy0.iscAttachDatabase(Unknown Source)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:101)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:482)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:69)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:120)
... 9 more
I've created a github repo containing all the code & libraries which I'm
using:
https://github.com/rgba/firebird_test
the project should compile via maven:
Command:
PROMPT> mvn clean install
There is a run.sh in the root of the project which you can use to run the
program once it has been compiled, but it there is a different error
showing up when the program is run via the command line (see below), I'm
not sure why there is a difference between the execution via IDE and
command line, since the java.library.path and user.dir are the same.
Output when run via the command line:
PROMPT> ./run.sh
java -Djava.library.path=/home/rgba/git/firebird_test -classpath
/home/rgba/git/firebird_test/lib/jaybird-full-2.2.0.jar:/home/rgba/git/firebird_test/target/classes:/home/rgba/git/firebird_test/lib/log4j-1.2.16.jar:.
FBConnect
Library Path: /home/rgba/git/firebird_test
Working Directory: /home/rgba/git/firebird_test
DriverManager.getConnection("jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8")
trying
driver[className=sun.jdbc.odbc.JdbcOdbcDriver,sun.jdbc.odbc.JdbcOdbcDriver@7ecd2c3c
]
*Driver.connect (jdbc:firebirdsql:embedded:employee.fdb?charSet=UTF-8)
trying
driver[className=org.firebirdsql.jdbc.FBDriver,org.firebirdsql.jdbc.FBDriver@4506411
]
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize
- Could not find or load the firebird client library.
at org.firebirdsql.gds.impl.jni.JniGDSImpl.nativeInitilize(Native Method)
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:92)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
java.lang.RuntimeException: Failed to initialize Jaybird native library.
This is most likely due to a failure to load the firebird client library.
at
org.firebirdsql.gds.impl.jni.JniGDSImpl.attemptToLoadAClientLibraryFromList(JniGDSImpl.java:105)
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:220)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:120)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
My system specs:
OS:
Ubuntu 12.04_amd64
Java Version:
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
Thanks for your help,
Martin
[Non-text portions of this message have been removed]