Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 17th, 2004, 08:31 AM
karthick.srini karthick.srini is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Chennai , India
Posts: 9 karthick.srini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > linux FB embed server connection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway