Hi Achim (cc to the list),
Thanks for the details. Could you possibly try the latest snapshot of BaseX [1] and tell us if the problem persists with that version?
Thanks, Christian
[1] http://files.basex.org/releases/latest/
On Wed, Dec 10, 2014 at 12:28 PM, Achim Baumgartner achim_baumgartner@yahoo.de wrote:
Hello Christian,
Thank you for your prompt answer. Inspect from basex tool (under command section) gives me back
Checking main table (75055 nodes):
- 0 invalid node kinds
- 0 invalid parent references
- 0 wrong parent/descendent relationships
No inconsistencies found.
What I do PoetSession is an xml doc that is replaced around 20 times before the database ends up in the described state. It works a couple of times and then it goes wrong in the query following the replace. (every step in the application changes something to it and then i use new Replace(path,content).execute(context) to update it.
Kind regards,
Achim.
Christian Grün christian.gruen@gmail.com schrieb am 11:48 Mittwoch, 10.Dezember 2014:
Hi Achim,
Thanks for your mail. It seems as if your database has possibly gone corrupt. The INSPECT command can e.g. be used to analyze the data structures of a given database [1].
If the problem persists after recreating your database, please don't hesitate to provide us with your input data (if it's confidential, feel free to drop me a personal note).
Best, Christian
[1] http://docs.basex.org/wiki/Commands#INSPECT
On Wed, Dec 10, 2014 at 11:34 AM, Achim Baumgartner achim_baumgartner@yahoo.de wrote:
Hello Dr. Grün,
I open the database 'Collection' in the basex tool and enter the following query
for $x in collection('Collection') return $x//PoetSession
and get the following error message under Query Info. If you want I can provide you with the database files.
Kind regards,
Achim.
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.9 Java: Sun Microsystems Inc., 1.6.0_21 OS: Windows XP, x86 Stack Trace: java.lang.RuntimeException: Data Access out of bounds:
- pre value: 75055
- #used blocks: 294
- #total locks: 294
- access: 293 (294 > 293] at org.basex.util.Util.notExpected(Util.java:53) at
org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:508) at org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:194) at org.basex.data.Data.kind(Data.java:284) at org.basex.query.value.node.DBNode.<init>(DBNode.java:53) at org.basex.query.value.seq.DBNodeSeq.itemAt(DBNodeSeq.java:65) at org.basex.query.value.seq.DBNodeSeq.itemAt(DBNodeSeq.java:19) at org.basex.query.value.seq.Seq$1.next(Seq.java:92) at org.basex.query.gflwor.For$1.next(For.java:71) at org.basex.query.gflwor.GFLWOR$2.next(GFLWOR.java:74) at org.basex.query.MainModule$1.next(MainModule.java:98) at org.basex.query.QueryContext.execute(QueryContext.java:580) at org.basex.query.QueryProcessor.execute(QueryProcessor.java:101) at org.basex.core.cmd.AQuery.query(AQuery.java:82) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:329) at org.basex.core.Command.execute(Command.java:94) at org.basex.gui.GUI.exec(GUI.java:417) at org.basex.gui.GUI.access$500(GUI.java:41) at org.basex.gui.GUI$8.run(GUI.java:361) Compiling:
- pre-evaluating fn:collection("Collection")
- simplifying descendant-or-self step(s)
Query: for $x in collection('Collection') return $x//PoetSession Optimized Query: for $x_0 in (db:open-pre("Collection",0), db:open-pre("Collection",766), ...) return $x_0/descendant::PoetSession Query plan:
<QueryPlan> <GFLWOR> <For> <Var name="$x" id="0"/> <DBNodeSeq size="103"> <DBNode name="Collection" pre="0"/> <DBNode name="Collection" pre="766"/> <DBNode name="Collection" pre="1242"/> <DBNode name="Collection" pre="2008"/> <DBNode name="Collection" pre="2777"/> </DBNodeSeq> </For> <IterPath> <VarRef> <Var name="$x" id="0"/> </VarRef> <IterStep axis="descendant" test="PoetSession"/> </IterPath> </GFLWOR> </QueryPlan>
basex-talk@mailman.uni-konstanz.de