|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
linux FB embed server connection
Dear Members ,
I tried to connect DB in embedded server of linux. But I failed to get connection and I got below exception. Is there is anyother things to be done. Is there is any document detailing set up of embedded server --> and getting connection via Jaybird in linux? If so please do send me? I have set up embedded in windows. Linux is alone pending kindly help me in this regard, Set up : * Set Jaybirds JNI library(libjaybird.so) in LB_LIBRARY_PATH. * libfbembed.so and other libfbembed.so* are under curerent working directory and set the same directory in system path. * set FIREBIRD variable to current working directory. * In firebird.conf I have set ROOTDIRECTORY to current working directory * Had firebird.conf and firebird.msg in current working directory. * had "intl\fbintl" in current working directory Code snippet I used , String driverName0 = "org.firebirdsql.jdbc.FBDriver"; String url ="jdbc:firebirdsql:embedded:db/employee.fdb"; try { Class.forName (driverName); java.sql.Driver d = java.sql.DriverManager.getDriver (url); Connection c = dataSource.getConnection("sysdba","masterkey");//java.sql.DriverManager.getConnection (url, "sysdba" , "masterkey"); c.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); c.close (); System.out.println("GOT CONNECTION : "); } catch (java.sql.SQLException e) { e.printStackTrace(); System.out.println ("sql exception: " + e.getMessage ()); } Exception I received : org.firebirdsql.jdbc.FBSQLException: Resource Exception. cannot attach to password database Reason: cannot attach to password database at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112) at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189) at java.sql.DriverManager.getConnection(DriverManager.java:512) at Dear Members , I tried to connect DB in embedded server of linux. But I failed to get connection and I got below exception. Is there is anyother things to be done. Is there is any document detailing set up of embedded server --> and getting connection via Jaybird in linux? If so please do send me? I have set up embedded in windows. Linux is alone pending kindly help me in this regard, Set up : * Set Jaybirds JNI library(libjaybird.so) in LB_LIBRARY_PATH. * libfbembed.so and other libfbembed.so* are under curerent working directory and set the same directory in system path. * set FIREBIRD variable to current working directory. * In firebird.conf I have set ROOTDIRECTORY to current working directory * Had firebird.conf and firebird.msg in current working directory. * had "intl\fbintl" in current working directory Code snippet I used , String driverName0 = "org.firebirdsql.jdbc.FBDriver"; String url ="jdbc:firebirdsql:embedded:db/employee.fdb"; try { Class.forName (driverName); java.sql.Driver d = java.sql.DriverManager.getDriver (url); Connection c = dataSource.getConnection("sysdba","masterkey");//java.sql.DriverManager.getConnection (url, "sysdba" , "masterkey"); c.setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); c.close (); System.out.println("GOT CONNECTION : "); } catch (java.sql.SQLException e) { e.printStackTrace(); System.out.println ("sql exception: " + e.getMessage ()); } Exception I received : org.firebirdsql.jdbc.FBSQLException: Resource Exception. cannot attach to password database Reason: cannot attach to password database at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:112) at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at EmbedTest.main(EmbedTest.java:33) at org.firebirdsql.gds.GDSException: cannot attach to password database at org.firebirdsql.ngds.GDS_Impl.native_isc_attach_database(Native Method) at org.firebirdsql.ngds.GDS_Impl.isc_attach_database(GDS_Impl.java:235) 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:324) at org.firebirdsql.gds.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.invoke(GDSSynchronization Policy.java:131) at $Proxy0.isc_attach_database(Unknown Source) at org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:562) at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:90) at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.ja va:388) at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.j ava:60) at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:109) at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at EmbedTest.main(EmbedTest.java:33) Thanks & regards, S.Karthick java.sql.DriverManager.getConnection(DriverManager.java:171) at EmbedTest.main(EmbedTest.java:33) at org.firebirdsql.gds.GDSException: cannot attach to password database at org.firebirdsql.ngds.GDS_Impl.native_isc_attach_database(Native Method) at org.firebirdsql.ngds.GDS_Impl.isc_attach_database(GDS_Impl.java:235) 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:324) at org.firebirdsql.gds.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.invoke(GDSSynchronization Policy.java:131) at $Proxy0.isc_attach_database(Unknown Source) at org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:562) at org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:90) at org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.ja va:388) at org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.j ava:60) at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:109) at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:189) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at EmbedTest.main(EmbedTest.java:33) Thanks & regards, S.Karthick |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > linux FB embed server connection |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|