Subject | Re: [Firebird-Java] firebird embedded under Linux problems |
---|---|
Author | Niki Ivanchev |
Post date | 2004-09-09T09:37:22Z |
Roman, thanks for the clarifications.
This is the thread stack
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() : 274,
org.firebirdsql.pool.FBConnectionPoolDataSource,
FBConnectionPoolDataSource.java
addConnection() : 426, org.firebirdsql.pool.PooledConnectionQueue,
PooledConnectionQueue.java
start() : 157, org.firebirdsql.pool.PooledConnectionQueue,
PooledConnectionQueue.java
getQueue() : 182, org.firebirdsql.pool.AbstractConnectionPool,
AbstractConnectionPool.java
getPooledConnection() : 385,
org.firebirdsql.pool.FBConnectionPoolDataSource,
FBConnectionPoolDataSource.java
getConnection() : 216, org.firebirdsql.pool.FBWrappingDataSource,
FBWrappingDataSource.java
getConnection() : 175, com.icygen.advm.db.FBConnectionManager,
FBConnectionManager.java
getConnection() : 361, com.icygen.advm.db.DAO, DAO.java
selectOpen() : 119, com.icygen.advm.db.DAO, DAO.java
load() : 67, com.icygen.advm.services.PropertyService, PropertyService.java
<init>() : 30, com.icygen.advm.services.PropertyService,
PropertyService.java
<init>() : 103, com.icygen.advm.planner.Holder, Holder.java
getInstance() : 86, com.icygen.advm.planner.Holder, Holder.java
main() : 10, com.icygen.advm.planner.PlannerFrance, PlannerFrance.java
--
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) }
rdb_id value is 0
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
public void isc_attach_database(String file_name, isc_db_handle
db_handle, DatabaseParameterBuffer databaseParameterBuffer) throws
GDSException
{
if (db_handle == null)
{
throw new GDSException(ISCConstants.isc_bad_db_handle);
}
DatabaseParameterBuffer cleanDPB =
removeInternalDPB(databaseParameterBuffer);
final byte[] dpbBytes = databaseParameterBuffer == null ? null :
((DatabaseParameterBufferImp)cleanDPB).getBytesForNativeCode();
synchronized(this)
{
native_isc_attach_database( getServerUrl(file_name),
db_handle, dpbBytes ); <- called from this line
} <-must return here
parseAttachDatabaseInfo(isc_database_info(db_handle,describe_database_info,1024),db_handle);
}
But it stops....
I read FAQ supplied with jaybird, but I found information how to disable
logging, not how to enable it.
Can this information help to track down the problem?
Roman Rokytskyy wrote:
This is the thread stack
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() : 274,
org.firebirdsql.pool.FBConnectionPoolDataSource,
FBConnectionPoolDataSource.java
addConnection() : 426, org.firebirdsql.pool.PooledConnectionQueue,
PooledConnectionQueue.java
start() : 157, org.firebirdsql.pool.PooledConnectionQueue,
PooledConnectionQueue.java
getQueue() : 182, org.firebirdsql.pool.AbstractConnectionPool,
AbstractConnectionPool.java
getPooledConnection() : 385,
org.firebirdsql.pool.FBConnectionPoolDataSource,
FBConnectionPoolDataSource.java
getConnection() : 216, org.firebirdsql.pool.FBWrappingDataSource,
FBWrappingDataSource.java
getConnection() : 175, com.icygen.advm.db.FBConnectionManager,
FBConnectionManager.java
getConnection() : 361, com.icygen.advm.db.DAO, DAO.java
selectOpen() : 119, com.icygen.advm.db.DAO, DAO.java
load() : 67, com.icygen.advm.services.PropertyService, PropertyService.java
<init>() : 30, com.icygen.advm.services.PropertyService,
PropertyService.java
<init>() : 103, com.icygen.advm.planner.Holder, Holder.java
getInstance() : 86, com.icygen.advm.planner.Holder, Holder.java
main() : 10, com.icygen.advm.planner.PlannerFrance, PlannerFrance.java
--
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) }
rdb_id value is 0
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
public void isc_attach_database(String file_name, isc_db_handle
db_handle, DatabaseParameterBuffer databaseParameterBuffer) throws
GDSException
{
if (db_handle == null)
{
throw new GDSException(ISCConstants.isc_bad_db_handle);
}
DatabaseParameterBuffer cleanDPB =
removeInternalDPB(databaseParameterBuffer);
final byte[] dpbBytes = databaseParameterBuffer == null ? null :
((DatabaseParameterBufferImp)cleanDPB).getBytesForNativeCode();
synchronized(this)
{
native_isc_attach_database( getServerUrl(file_name),
db_handle, dpbBytes ); <- called from this line
} <-must return here
parseAttachDatabaseInfo(isc_database_info(db_handle,describe_database_info,1024),db_handle);
}
But it stops....
I read FAQ supplied with jaybird, but I found information how to disable
logging, not how to enable it.
Can this information help to track down the problem?
Roman Rokytskyy wrote:
>>The problem arises when I try to get a connection from the pool. The
>>pool is configured with setMinPoolSize(1) and setMaxPoolSize(1) to
>>avoid problems with mutiple connections, as I don't know do they
>>exist.
>>
>>
>
>You can use multiple connections from the same JVM. Release notes contain
>information about this issue - it is safe to use multiple connections on
>Linux, driver provides necessary synchronization on per class-loader basis.
>So, you have to only ensure that firebirdsql-full.jar is loaded by the
>top-most classloader (e.g. system classloader).
>
>Also check the log files, you should find more information there.
>
>Roman
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>