Subject | Embedded database maintenance |
---|---|
Author | Alec Swan |
Post date | 2009-10-23T20:48:32Z |
I have a desktop application which uses an embedded database and is required
to stay up all the time.
I need to perform database maintenance operations, such as rebuilding
indexes, while the application is up. It is acceptable for the database to
become inaccessible for a period of time as long as the application can
re-connect to the database after the maintenance period.
I get an exception shown bellow when calling
FBMaintenanceManager.validateDatabase() from a separate Java thread inside
of my app. How can I work around this exception and is this the right way to
perform maintenance of embedded databases?
Thanks,
Alec
Target exception: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
335544727. Error writing data to the connection.
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544727. Error writing
data to the connection.
at
org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:280)
at
org.firebirdsql.management.FBMaintenanceManager.executeRepairOperation(FBMaintenanceManager.java:473)
at
org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
at org.firebirdsql.gds.GDSException: Error writing data to the connection.
at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscServiceAttach(AbstractJavaGDSImpl.java:2720)
at
org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:207)
at
org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:272)
at
org.firebirdsql.management.FBMaintenanceManager.executeRepairOperation(FBMaintenanceManager.java:473)
at
org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown bsh % Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
[Non-text portions of this message have been removed]
to stay up all the time.
I need to perform database maintenance operations, such as rebuilding
indexes, while the application is up. It is acceptable for the database to
become inaccessible for a period of time as long as the application can
re-connect to the database after the maintenance period.
I get an exception shown bellow when calling
FBMaintenanceManager.validateDatabase() from a separate Java thread inside
of my app. How can I work around this exception and is this the right way to
perform maintenance of embedded databases?
Thanks,
Alec
Target exception: org.firebirdsql.jdbc.FBSQLException: GDS Exception.
335544727. Error writing data to the connection.
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544727. Error writing
data to the connection.
at
org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:280)
at
org.firebirdsql.management.FBMaintenanceManager.executeRepairOperation(FBMaintenanceManager.java:473)
at
org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
at org.firebirdsql.gds.GDSException: Error writing data to the connection.
at
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl.iscServiceAttach(AbstractJavaGDSImpl.java:2720)
at
org.firebirdsql.management.FBServiceManager.attachServiceManager(FBServiceManager.java:207)
at
org.firebirdsql.management.FBServiceManager.executeServicesOperation(FBServiceManager.java:272)
at
org.firebirdsql.management.FBMaintenanceManager.executeRepairOperation(FBMaintenanceManager.java:473)
at
org.firebirdsql.management.FBMaintenanceManager.validateDatabase(FBMaintenanceManager.java:284)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at bsh.Reflect.invokeMethod(Unknown Source)
at bsh.Reflect.invokeObjectMethod(Unknown bsh % Source)
at bsh.Name.invokeMethod(Unknown Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
[Non-text portions of this message have been removed]