Subject Data corruption in database causing JDBC driver failure
Author Kenneth Foo
Hi

I'm getting such errors and I'm not sure whether it's database corruption or
what.
I did a database backup and restore and I'm still getting the same error.
Any alternative solutions?

Thanks!

Regards
Kenneth

-----------------------------------
2004-05-21 10:46:03,633 DEBUG [Thread-12] (POP3Monitor.java:180) - 0 mails
in mailbox
2004-05-21 10:46:13,179 ERROR [http8080-Processor22] (FBTempDB.java:311) -
List failed
org.firebirdsql.jdbc.FBSQLException: Resource Exception. internal gds
software consistency check (can't continue after bugcheck)
Reason: internal gds software consistency check (can't continue after
bugcheck)
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:818)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:85)
at
org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:34)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:682)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:232)
at com.nic.sql.ConnectionEx.prepareStatement(ConnectionEx.java:214)
at com.nic.tools.tmpdb.FBTempDB.list(FBTempDB.java:295)
at com.nic.connect.ContextImpl.listTempObject(ContextImpl.java:1370)
at
org.apache.jsp.pnl_005fcomposemsg_jsp._jspService(pnl_005fcomposemsg_jsp.java:413)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:506)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:443)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
at
org.apache.jsp.do_005fcomposemsg_jsp._jspService(do_005fcomposemsg_jsp.java:389)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
at
org.firebirdsql.gds.GDSException: internal gds software consistency check
(can't continue after bugcheck)
at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1758)
at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1711)
at org.firebirdsql.jgds.GDS_Impl.isc_start_transaction(GDS_Impl.java:546)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getCurrentIscTrHandle(FBManagedConnectionFactory.java:485)
at
org.firebirdsql.jca.FBManagedConnection.findIscTrHandle(FBManagedConnection.java:1094)
at
org.firebirdsql.jca.FBManagedConnection.internalStart(FBManagedConnection.java:655)
at
org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:107)
at org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:94)
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:814)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:85)
at
org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:34)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:682)
at
org.firebirdsql.jdbc.AbstractConnection.prepareStatement(AbstractConnection.java:232)
at com.nic.sql.ConnectionEx.prepareStatement(ConnectionEx.java:214)
at com.nic.tools.tmpdb.FBTempDB.list(FBTempDB.java:295)
at com.nic.connect.ContextImpl.listTempObject(ContextImpl.java:1370)
at
org.apache.jsp.pnl_005fcomposemsg_jsp._jspService(pnl_005fcomposemsg_jsp.java:413)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:742)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:506)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:443)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:712)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:682)
at
org.apache.jsp.do_005fcomposemsg_jsp._jspService(do_005fcomposemsg_jsp.java:389)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)


-----------------------------------
Ultimately, after occuring several times, I get this error instead, whereby
the database can't even be opened at all.

org.firebirdsql.jdbc.FBSQLException: Resource Exception. I/O error during
"CreateFile (open)" operation for file "E:/NCS/data/db/ncs.gdb"
Error while trying to open file
null
Reason: I/O error during "CreateFile (open)" operation for file
"E:/NCS/data/db/ncs.gdb"
Error while trying to open file
null
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:106)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:218)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at com.nic.sql.ConnectionPool.createConnection(ConnectionPool.java:40)
at com.nic.sql.ConnectionPool.getConnection(ConnectionPool.java:260)
at com.nic.tools.tmpdb.FBTempDB.run(FBTempDB.java:143)
at
org.firebirdsql.gds.GDSException: I/O error during "CreateFile (open)"
operation for file "E:/NCS/data/db/ncs.gdb"
Error while trying to open file
null
at org.firebirdsql.jgds.GDS_Impl.readStatusVector(GDS_Impl.java:1758)
at org.firebirdsql.jgds.GDS_Impl.receiveResponse(GDS_Impl.java:1711)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:296)
at org.firebirdsql.jgds.GDS_Impl.isc_attach_database(GDS_Impl.java:258)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createDbHandle(FBManagedConnectionFactory.java:540)
at
org.firebirdsql.jca.FBManagedConnection.<init>(FBManagedConnection.java:88)
at
org.firebirdsql.jca.FBManagedConnectionFactory.createManagedConnection(FBManagedConnectionFactory.java:366)
at
org.firebirdsql.jca.FBStandAloneConnectionManager.allocateConnection(FBStandAloneConnectionManager.java:60)
at org.firebirdsql.jdbc.FBDataSource.getConnection(FBDataSource.java:103)
at org.firebirdsql.jdbc.FBDriver.connect(FBDriver.java:218)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at com.nic.sql.ConnectionPool.createConnection(ConnectionPool.java:40)
at com.nic.sql.ConnectionPool.getConnection(ConnectionPool.java:260)
at com.nic.tools.tmpdb.FBTempDB.run(FBTempDB.java:143)
2004-05-21 10:46:45,288 ERROR [Thread-3] (MessageDB.java:1614) - Interaction
update failure org.firebirdsql.jdbc.FBSQLException: Resource Exception.
Local transaction active: can't begin another
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:818)
at
org.firebirdsql.jdbc.AbstractStatement.executeQuery(AbstractStatement.java:153)
at
com.nic.connect.db.MessageDB.processInteractionUpdates(MessageDB.java:1589)
at com.nic.connect.db.MessageDB.run(MessageDB.java:3112)
at org.firebirdsql.jca.FBResourceTransactionException: Local transaction
active: can't begin another
at
org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:99)
at org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:94)
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:814)
at
org.firebirdsql.jdbc.AbstractStatement.executeQuery(AbstractStatement.java:153)
at
com.nic.connect.db.MessageDB.processInteractionUpdates(MessageDB.java:1589)
at com.nic.connect.db.MessageDB.run(MessageDB.java:3112)

2004-05-21 10:46:45,413 ERROR [Thread-3] (MessageDB.java:3115) - [MessageDB]
Interaction update processing failed!org.firebirdsql.jdbc.FBSQLException:
Resource Exception. Local transaction active: can't begin another
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:818)
at
org.firebirdsql.jdbc.AbstractStatement.executeQuery(AbstractStatement.java:153)
at
com.nic.connect.db.MessageDB.processInteractionUpdates(MessageDB.java:1589)
at com.nic.connect.db.MessageDB.run(MessageDB.java:3112)
at org.firebirdsql.jca.FBResourceTransactionException: Local transaction
active: can't begin another
at
org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:99)
at org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:94)
at
org.firebirdsql.jdbc.AbstractConnection.ensureInTransaction(AbstractConnection.java:814)
at
org.firebirdsql.jdbc.AbstractStatement.executeQuery(AbstractStatement.java:153)
at
com.nic.connect.db.MessageDB.processInteractionUpdates(MessageDB.java:1589)
at com.nic.connect.db.MessageDB.run(MessageDB.java:3112)