Archived
This forum has been archived. Please start a new discussion on GitHub.
Why Is my connection to DB breacking?
Hy,
I connect from my Android App to a server and then I trye to insert data in a Oracle 10g DB.
Server console output.
After some 800 records writen the connection breacks. Every time after 800 +/- 50 entryes the connection is lost.
I use a connection pool manager. What am I doing wrong?
Connection pool manager code is here.
Please help
I connect from my Android App to a server and then I trye to insert data in a Oracle 10g DB.
Server console output.
-- 12/11/11 14:09:18:759 demo.Database.library.Server: SQLRequestContext: commit context: library.SQLRequestContext@27a36a2 Request connection for env 1 -- 12/11/11 14:09:18:884 demo.Database.library.Server: ConnectionPool: returning connection: oracle.jdbc.driver.T4CConnection@2598c6f3 3/5 remaining -- 12/11/11 14:09:18:884 demo.Database.library.Server: SQLRequestContext: create new context: library.SQLRequestContext@512d8ecd thread: Thread[Ice.ThreadPool.Server-4,5,main]: connection: oracle.jdbc.driver.T4CConnection@2598c6f3 Ok. 0 connections are available in cache MYCACHE 8 connections are active Request connection for env 2 -! 12/11/11 14:09:18:970 demo.Database.library.Server: warning: Ice.ThreadPool.Server-2: ConnectionPool: lost connection to database: java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493) at library.ConnectionPool.acquire(ConnectionPool.java:72) at library.SQLRequestContext.<init>(SQLRequestContext.java:77) at library.DispatchInterceptorI.dispatch(DispatchInterceptorI.java:21) at Ice.DispatchInterceptor.__dispatch(DispatchInterceptor.java:43) at IceInternal.Incoming.invoke(Incoming.java:159) at Ice.ConnectionI.invokeAll(ConnectionI.java:2357) at Ice.ConnectionI.dispatch(ConnectionI.java:1208) at Ice.ConnectionI.message(ConnectionI.java:1163) at IceInternal.ThreadPool.run(ThreadPool.java:302) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643) at java.lang.Thread.run(Unknown Source) -- 12/11/11 14:09:18:971 demo.Database.library.Server: ConnectionPool: establishing new database connection Ok. 0 connections are available in cache MYCACHE 8 connections are active Request connection for env 3 Ok. 0 connections are available in cache MYCACHE 8 connections are active Request connection for env 4 Ok. 0 connections are available in cache MYCACHE 8 connections are active Request connection for env 5 Ok. 0 connections are available in cache MYCACHE 8 connections are active -- 12/11/11 14:09:19:341 demo.Database.library.Server: SQLRequestContext: commit context: library.SQLRequestContext@512d8ecd -- 12/11/11 14:09:19:439 demo.Database.library.Server: ConnectionPool: returning connection: oracle.jdbc.driver.T4CConnection@5fa5e5e 2/5 remaining -- 12/11/11 14:09:19:439 demo.Database.library.Server: SQLRequestContext: create new context: library.SQLRequestContext@78497062 thread: Thread[Ice.ThreadPool.Server-2,5,main]: connection: oracle.jdbc.driver.T4CConnection@5fa5e5e Request connection for env 1 -! 12/11/11 14:09:19:524 demo.Database.library.Server: warning: Ice.ThreadPool.Server-3: ConnectionPool: lost connection to database: java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207) at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628) at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493) at library.ConnectionPool.acquire(ConnectionPool.java:72) at library.SQLRequestContext.<init>(SQLRequestContext.java:77) at library.DispatchInterceptorI.dispatch(DispatchInterceptorI.java:21) at Ice.DispatchInterceptor.__dispatch(DispatchInterceptor.java:43) at IceInternal.Incoming.invoke(Incoming.java:159) at Ice.ConnectionI.invokeAll(ConnectionI.java:2357) at Ice.ConnectionI.dispatch(ConnectionI.java:1208) at Ice.ConnectionI.message(ConnectionI.java:1163) at IceInternal.ThreadPool.run(ThreadPool.java:302) at IceInternal.ThreadPool.access$300(ThreadPool.java:12) at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643) at java.lang.Thread.run(Unknown Source) -- 12/11/11 14:09:19:524 demo.Database.library.Server: ConnectionPool: establishing new database connection Ok.
After some 800 records writen the connection breacks. Every time after 800 +/- 50 entryes the connection is lost.
I use a connection pool manager. What am I doing wrong?
Connection pool manager code is here.
http://www.rgagnon.com/javadetails/java-0545.html
Please help
0
Comments
-
From the stack trace you posted is clear that this is an SQL syntax error in the query.
java.sql.SQLSyntaxErrorException: ORA-00923: FROM keyword not found where expected
But that isn't an Ice related problem, probably your code doesn't correctly handle exceptions and the error propagates to other parts of your code.0