Subject Re: JDBC disconnects by itself
Author pp0475
--- In Firebird-Java@yahoogroups.com, "Roman Rokytskyy"
<rrokytskyy@a...> wrote:

> May I ask, why you do not close connections in your application?

Good question! :) Yeah I'll close connection after my patch job is
complete, it is: all textfiles has been processed and data is inserted
and committed to database - But I just can't go through even one file,
'cause this issue. But I really don't close the connection during the
job at any time.

>
> > Attached SQLException:
>
> > Object closed.org.firebirdsql.pool.ObjectCloseTraceException: Object
> > closed. at
> > org.firebirdsql.pool.PooledConnectionHandler.handleConnectionClose(P
> > ooledConnectionHandler.java:390) at
> > org.firebirdsql.pool.PooledConnectionHandler.deallocate(PooledConnec
> > tionHandler.java:181) at
> > org.firebirdsql.pool.PingablePooledConnection.internalClose(Pingable
> > PooledConnection.java:256) at
> > org.firebirdsql.pool.PingablePooledConnection.deallocate(PingablePoo
> > ledConnection.java:270) at
> > org.firebirdsql.pool.PooledConnectionQueue.shutdown(PooledConnection
> > Queue.java:179)
>
> What's after these lines? It seems that you have shut the pool down,
but you
> continue using connections from it.
>
> Roman

Yes, the pool seems to be down and I continue using it 'cause I
haven't closed that myself. What I do in my app is:

1. Create the connection
2. SELECT and INSERT -statements works succesfully short time
3. After some SELECT and INSERT operations attached exception occurs.
These inserts are called within a loop, where app reads the textfile
line by line, parses contents of the line and tries then to add the
data to db.
4. After each file data will be committed or rolled back.
5. I don't have any threads.

By the way, I have an other application which only queries from the
database (SELECT) - there's no connection problems, so I have a
feeling, that this problem exist only when I inserts rows to tables
with very high intensity, could there be any issues in these situations?

Complete StackTrace:

org.firebirdsql.jdbc.FBSQLException: Connection
org.firebirdsql.pool.PooledConnectionHandler@8997d1 was closed. See
the attached exception to find the place where it was closed
at
org.firebirdsql.pool.PooledConnectionHandler.invoke(PooledConnectionHandler.java:212)
at $Proxy0.createStatement(Unknown Source)
at DataSource.DataSource.SendSelectStatement(DataSource.java:63)
at myclass.Parser.Read_O_Record(Parser.java:450)
at myclass.Parser.ReadFile(Parser.java:166)
at myclass.Parser.<init>(Parser.java:81)
at myclass.Parser.main(Parser.java:135)
org.firebirdsql.pool.ObjectCloseTraceException: Object closed.
at
org.firebirdsql.pool.PooledConnectionHandler.handleConnectionClose(PooledConnectionHandler.java:390)
at
org.firebirdsql.pool.PooledConnectionHandler.deallocate(PooledConnectionHandler.java:181)
at
org.firebirdsql.pool.PingablePooledConnection.internalClose(PingablePooledConnection.java:256)
at
org.firebirdsql.pool.PingablePooledConnection.deallocate(PingablePooledConnection.java:270)
at
org.firebirdsql.pool.PooledConnectionQueue.shutdown(PooledConnectionQueue.java:179)
at
org.firebirdsql.pool.AbstractConnectionPool.shutdown(AbstractConnectionPool.java:147)
at
org.firebirdsql.pool.FBWrappingDataSource.finalize(FBWrappingDataSource.java:184)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)