Subject | Re: [Firebird-Java] firebird embedded under Linux problems |
---|---|
Author | Niki Ivanchev |
Post date | 2004-09-09T10:16:47Z |
The test case is as follows
----------------------------------------
package testembeddedproject;
import java.sql.*;
public class Main {
public Main() {
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
}
catch (ClassNotFoundException ex) {
ex.printStackTrace();
System.exit(0);
}
try {
Connection c = DriverManager.getConnection(
"jdbc:firebirdsql:embedded:advmanager.fdb", "SYSDBA",
"masterkey");
Statement st = c.createStatement ();
ResultSet rst = st.executeQuery("select TOPIC from TOPICS");
while (rst.next()) {
System.out.println(rst.getString(1));
}
rst.close();
st.close();
c.close();
}
catch (SQLException ex1) {
ex1.printStackTrace();
}
}
public static void main(String[] args) {
Main main1 = new Main();
}
}
----------------------------------------------------------------------------------------
Exactly the same problem
Stack trace is:
getRdb_id() : 89, org.firebirdsql.ngds.isc_db_handle_impl,
isc_db_handle_impl.java
native_isc_attach_database() : -1, org.firebirdsql.ngds.GDS_Impl,
GDS_Impl.java
isc_attach_database() : 240, org.firebirdsql.ngds.GDS_Impl, GDS_Impl.java
invoke0() : -1, sun.reflect.NativeMethodAccessorImpl,
NativeMethodAccessorImpl.java
invoke() : 39, sun.reflect.NativeMethodAccessorImpl,
NativeMethodAccessorImpl.java
invoke() : 25, sun.reflect.DelegatingMethodAccessorImpl,
DelegatingMethodAccessorImpl.java
invoke() : 324, java.lang.reflect.Method, Method.java
invoke() : 110,
org.firebirdsql.gds.GDSSynchronizationPolicy$AbstractSynchronizationPolicy,
GDSSynchronizationPolicy.java
isc_attach_database() : -1, $Proxy0,
createDbHandle() : 540, org.firebirdsql.jca.FBManagedConnectionFactory,
FBManagedConnectionFactory.java
<init>() : 88, org.firebirdsql.jca.FBManagedConnection,
FBManagedConnection.java
createManagedConnection() : 366,
org.firebirdsql.jca.FBManagedConnectionFactory,
FBManagedConnectionFactory.java
allocateConnection() : 60,
org.firebirdsql.jca.FBStandAloneConnectionManager,
FBStandAloneConnectionManager.java
getConnection() : 109, org.firebirdsql.jdbc.FBDataSource, FBDataSource.java
connect() : 221, org.firebirdsql.jdbc.FBDriver, FBDriver.java
getConnection() : 512, java.sql.DriverManager, DriverManager.java
getConnection() : 171, java.sql.DriverManager, DriverManager.java
<init>() : 23, testembeddedproject.Main, Main.java
main() : 40, testembeddedproject.Main, Main.java
I will post log messages once I configure log4j
It should not take long..
Roman Rokytskyy wrote:
----------------------------------------
package testembeddedproject;
import java.sql.*;
public class Main {
public Main() {
try {
Class.forName("org.firebirdsql.jdbc.FBDriver");
}
catch (ClassNotFoundException ex) {
ex.printStackTrace();
System.exit(0);
}
try {
Connection c = DriverManager.getConnection(
"jdbc:firebirdsql:embedded:advmanager.fdb", "SYSDBA",
"masterkey");
Statement st = c.createStatement ();
ResultSet rst = st.executeQuery("select TOPIC from TOPICS");
while (rst.next()) {
System.out.println(rst.getString(1));
}
rst.close();
st.close();
c.close();
}
catch (SQLException ex1) {
ex1.printStackTrace();
}
}
public static void main(String[] args) {
Main main1 = new Main();
}
}
----------------------------------------------------------------------------------------
Exactly the same problem
Stack trace is:
getRdb_id() : 89, org.firebirdsql.ngds.isc_db_handle_impl,
isc_db_handle_impl.java
native_isc_attach_database() : -1, org.firebirdsql.ngds.GDS_Impl,
GDS_Impl.java
isc_attach_database() : 240, org.firebirdsql.ngds.GDS_Impl, GDS_Impl.java
invoke0() : -1, sun.reflect.NativeMethodAccessorImpl,
NativeMethodAccessorImpl.java
invoke() : 39, sun.reflect.NativeMethodAccessorImpl,
NativeMethodAccessorImpl.java
invoke() : 25, sun.reflect.DelegatingMethodAccessorImpl,
DelegatingMethodAccessorImpl.java
invoke() : 324, java.lang.reflect.Method, Method.java
invoke() : 110,
org.firebirdsql.gds.GDSSynchronizationPolicy$AbstractSynchronizationPolicy,
GDSSynchronizationPolicy.java
isc_attach_database() : -1, $Proxy0,
createDbHandle() : 540, org.firebirdsql.jca.FBManagedConnectionFactory,
FBManagedConnectionFactory.java
<init>() : 88, org.firebirdsql.jca.FBManagedConnection,
FBManagedConnection.java
createManagedConnection() : 366,
org.firebirdsql.jca.FBManagedConnectionFactory,
FBManagedConnectionFactory.java
allocateConnection() : 60,
org.firebirdsql.jca.FBStandAloneConnectionManager,
FBStandAloneConnectionManager.java
getConnection() : 109, org.firebirdsql.jdbc.FBDataSource, FBDataSource.java
connect() : 221, org.firebirdsql.jdbc.FBDriver, FBDriver.java
getConnection() : 512, java.sql.DriverManager, DriverManager.java
getConnection() : 171, java.sql.DriverManager, DriverManager.java
<init>() : 23, testembeddedproject.Main, Main.java
main() : 40, testembeddedproject.Main, Main.java
I will post log messages once I configure log4j
It should not take long..
Roman Rokytskyy wrote:
>>In org.firebirdsql.ngds.isc_db_handle_impl debugger is stoped on the
>>line with asterisks
>>(87) public int getRdb_id() {
>>(88) checkValidity();
>>(89)*** return rdb_id;
>>(90) }
>>
>>
>
>This is completely strange - it should not hang in "return" clause...
>
>
>
>>No exceptions thrown (well there is one since first jaybird is
>>trying to load .dll and than .so file but this is irrelevant)
>>Now when I continue, application is supposed to go back to
>>org.firebirdsql.ngds.GDS_Impl method isc_attach_database
>>...
>>But it stops....
>>
>>
>
>Also strange... Are you able to test somehow whether embedded server works
>at all in your setup. You can try for example writing small application that
>uses DriverManager to obtain connections (no pools).
>
>
>
>>I read FAQ supplied with jaybird, but I found information how to
>>disable logging, not how to enable it.
>>
>>
>
>See http://jaybirdwiki.firebirdsql.org/FAQ/JayBirdLogging
>
>
>
>>Can this information help to track down the problem?
>>
>>
>
>Can you prepare a small test case, I will try it in my setup (Debian Linux,
>JayBird 1.5 release + Firebird 1.5.x embedded).
>
>Roman
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>