Subject unavailable database with type2(local-mode) and java as a service
Author Carsten Schäfer
Hi,
I'm using Firebird 1.5 on WinXP Prof SP1 with Jaybird 1.5RC3.
I'm using driver in local mode and want to start my java-application as a
service.
I'm getting the following exception if i don't allow my service interaction
with desktop (but then i can't start my service as a different user):
org.firebirdsql.jdbc.FBSQLException: Resource Exception. unavailable
database
Reason: unavailable database
at
org.firebirdsql.pool.FBConnectionPoolDataSource.allocateConnection(FBConnect
ionPoolDataSource.java:185)
at
org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQue
ue.java:403)
at
org.firebirdsql.pool.PooledConnectionQueue.start(PooledConnectionQueue.java:
156)
at
org.firebirdsql.pool.AbstractConnectionPool.getQueue(AbstractConnectionPool.
java:182)
at
org.firebirdsql.pool.FBConnectionPoolDataSource.getFreeSize(FBConnectionPool
DataSource.java:328)
at
org.firebirdsql.pool.FBWrappingDataSource.getConnectionCount(FBWrappingDataS
ource.java:357)
at
com.TTC_Informatik.PAULA.server.App_Server.getConnection(App_Server.java:941
4)
at
com.TTC_Informatik.PAULA.server.App_Server.getReadConnection(App_Server.java
:7575)
at
com.TTC_Informatik.PAULA.server.App_Server.getAllDBObjekte(App_Server.java:2
638)
at
com.TTC_Informatik.PAULA.server.App_Server$7.construct(App_Server.java:7849)
at com.TTC_Informatik.PAULA.Tools.SwingWorker$2.run(SwingWorker.java:109)
at java.lang.Thread.run(Unknown Source)
at org.firebirdsql.gds.GDSException: unavailable 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:237)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.firebirdsql.gds.GDSSynchronizationPolicy$AbstractSynchronizationPolicy.i
nvoke(GDSSynchronizationPolicy.java:110)
at $Proxy0.isc_attach_database(Unknown Source)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConne
ctionFactory.java:540)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:88)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBMan
agedConnectionFactory.java:366)
at
org.firebirdsql.pool.FBConnectionPoolDataSource.allocateConnection(FBConnect
ionPoolDataSource.java:158)
at
org.firebirdsql.pool.PooledConnectionQueue.addConnection(PooledConnectionQue
ue.java:403)
at
org.firebirdsql.pool.PooledConnectionQueue.start(PooledConnectionQueue.java:
156)
at
org.firebirdsql.pool.AbstractConnectionPool.getQueue(AbstractConnectionPool.
java:182)
at
org.firebirdsql.pool.FBConnectionPoolDataSource.getFreeSize(FBConnectionPool
DataSource.java:328)
at
org.firebirdsql.pool.FBWrappingDataSource.getConnectionCount(FBWrappingDataS
ource.java:357)
at
com.TTC_Informatik.PAULA.server.App_Server.getConnection(App_Server.java:941
4)

When i use other driver types (type4/type2/embedded) i can start my service
without allowing interaction with the desktop,
only local mode gives this error.

mfg
Carsten Schäfer