Hi,
I recently transitioned to a project where I am required to support an
application that uses a Derby DB and I get the following errors when I
try to run simple SELECT queries on a TABLE.
For example - SELECT * FROM ORDER WHERE ORDERID = 1 throws the following
exception:
java.sql.SQLException: Restore of a serializable or SQLData object of
class , attempted to read more data than was originally stored
and - SELECT * FROM ORDER WHERE ORDERID = 2 throws the following
exception:
java.sql.SQLException: Java exception: '-1:
java.lang.ArrayIndexOutOfBoundsException'.
I looked at the Derby log and there's no stack trace for the first
exception. The stack trace for the second exception is provided below.
I tried to delete the records (so I could run the table based SELECT
queries) and I was NOT able to delete the records that correspond to the
first exception... got the same exception; but was able to delete the
record that corresponds to the second exception.
I am using IBM Cloudscape Workbench to run the queries against the
table. Any insight into why the queries are failing would be valuable. I
sent a note to the derby user mailing list and was suggested to submit
to the developers list as well. The end user has important transactional
data in the DB and it will be of great help if there's a way to restore
the DB.
Thanks,
Kal
2008-01-08 17:28:27.478 GMT Thread[main,6,main] (XID = 4008637),
(SESSIONID = 0), (DATABASE = B:\SeedTrakDB), (DRDAID = null), Failed
Statement is: select * from productorder
java.lang.ArrayIndexOutOfBoundsException: -1
at
org.apache.derby.impl.store.raw.data.BasePage.getHeaderAtSlot(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.StoredPage.restorePortionLongColumn
(Unknown Source)
at
org.apache.derby.impl.store.raw.data.OverflowInputStream.fillByteHolder(
Unknown Source)
at
org.apache.derby.impl.store.raw.data.OverflowInputStream.<init>(Unknown
Source)
at
org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray(Unkn
own Source)
at
org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot(Un
known Source)
at
org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot(Unknown
Source)
at
org.apache.derby.impl.store.access.conglomerate.GenericScanController.fe
tchRows(Unknown Source)
at
org.apache.derby.impl.store.access.heap.HeapScan.fetchNextGroup(Unknown
Source)
at
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reloadArray(Unk
nown Source)
at
org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(
Unknown Source)
at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unk
nown Source)
at
org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown
Source)
at
org.eclipse.wst.rdb.internal.outputview.ResultTableModel.<init>(ResultTa
bleModel.java:91)
at
org.eclipse.wst.rdb.internal.outputview.OutputViewModel$OutputObject.add
TableModel(OutputViewModel.java:542)
at
org.eclipse.wst.rdb.internal.outputview.OutputViewModel.addResultAndPara
meters(OutputViewModel.java:204)
at
org.eclipse.wst.rdb.internal.outputview.OutputViewModel.addResult(Output
ViewModel.java:180)
at
org.eclipse.wst.rdb.internal.outputview.OutputViewAPI.showOutputContent(
OutputViewAPI.java:365)
at
org.eclipse.wst.rdb.internal.outputview.OutputViewAPI.showOutputContent(
OutputViewAPI.java:351)
at
org.eclipse.wst.rdb.server.internal.ui.query.execute.QueryOutputHelper.r
unSQLScrapbookQuery(QueryOutputHelper.java:136)
at
org.eclipse.wst.rdb.sqleditor.internal.actions.SQLRunAction.run(SQLRunAc
tion.java:231)
at
com.ibm.datatools.cloudscapeworkbench.actions.RunSQLAction.run(RunSQLAct
ion.java:20)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Ac
tionContributionItem.java:538)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContribut
ionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionCont
ributionItem.java:441)
at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at
org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at
org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:3
67)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at
com.ibm.datatools.cloudscapeworkbench.CloudscapeWorkbench.run(Cloudscape
Workbench.java:16)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActiva
tor.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
163)
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.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
---------------------------------------------------------------------------------------------------------
This e-mail message may contain privileged and/or confidential information, and
is intended to be received only by persons entitled to receive such
information. If you have received this e-mail in error, please notify the
sender immediately. Please delete it and all attachments from any servers, hard
drives or any other media. Other use of this e-mail by you is strictly
prohibited.
All e-mails and attachments sent and received are subject to monitoring,
reading and archival by Monsanto, including its subsidiaries. The recipient of
this e-mail is solely responsible for checking for the presence of "Viruses" or
other "Malware". Monsanto, along with its subsidiaries, accepts no liability
for any damage caused by any such code transmitted by or accompanying this
e-mail or any attachment.
---------------------------------------------------------------------------------------------------------