basexError
Tuesday, 15 November 2011 · 6 messages · last reply 21 Nov 2011
B
blue15 Nov 2011 14:00 #
Hello.
I am Isao. I'm japanese.
Sorry, I can't speak english.
When I use basex, SessionInfo output error log.
I sent query to BaseXServer from ClientApplication(C#) repeatedly.
-------error log-------
Potential bug? Improper use? Your feedback is welcome:
Contact: basex-talk at mailman.uni-konstanz.de
Version: BaseX 7.0.1
Java: Oracle Corporation, 1.7.0_01
OS: Linux, i386
Stack Trace:
java.lang.RuntimeException: Not expected: Data Access out of bounds [pre:7081866, indexSize:16184, access:16184 > 16183]. org.basex.util.Util.notexpected(Util.java:67)
org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:394) org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:107) org.basex.data.Data.kind(Data.java:319)
org.basex.query.item.DBNode.parent(DBNode.java:218)
org.basex.query.item.DBNode$9.next(DBNode.java:410)
org.basex.query.path.IterStep$1.next(IterStep.java:46)
org.basex.query.iter.NodeIter.next(NodeIter.java:1)
org.basex.query.path.IterPath$1.next(IterPath.java:67)
org.basex.query.iter.NodeIter.next(NodeIter.java:1)
org.basex.query.expr.For$1.next(For.java:91)
org.basex.query.expr.FLWR$1.next(FLWR.java:62)
org.basex.core.cmd.AQuery.query(AQuery.java:101)
org.basex.core.cmd.XQuery.run(XQuery.java:22)
org.basex.core.Command.run(Command.java:328)
org.basex.core.Command.exec(Command.java:309)
org.basex.core.Command.execute(Command.java:77)
org.basex.server.ClientListener.run(ClientListener.java:200)
CG
Christian Grün15 Nov 2011 14:14 #
Hi,
Quoted text · blue · 5 lines
> When I use basex, SessionInfo output error log. > I sent query to BaseXServer from ClientApplication(C#) repeatedly. > > -------error log------- > Potential bug? Improper use? Your feedback is welcome:
Usually, this problem occurs if you are using the BaseX GUI and Client/Server Architecture at the same time (see [1] for some information). As this has got quite a frequent issue, we might have to clarify this on our download page as well. We're also thinking about globally locking databases across multiple JVMs [2], but that's sometime trickier than you'd initally expect.
Hope this helps, feel free to ask for more,
Christian
[1] http://docs.basex.org/wiki/Startup#GUI.2FStandalone_vs._Client.2FServer [2] https://github.com/BaseXdb/basex/issues/168
Quoted text · blue · 30 lines
> Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 7.0.1 > Java: Oracle Corporation, 1.7.0_01 > OS: Linux, i386 > Stack Trace: > java.lang.RuntimeException: Not expected: Data Access out of bounds [pre:7081866, indexSize:16184, access:16184 > 16183]. > org.basex.util.Util.notexpected(Util.java:67) > org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:394) > org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:107) > org.basex.data.Data.kind(Data.java:319) > org.basex.query.item.DBNode.parent(DBNode.java:218) > org.basex.query.item.DBNode$9.next(DBNode.java:410) > org.basex.query.path.IterStep$1.next(IterStep.java:46) > org.basex.query.iter.NodeIter.next(NodeIter.java:1) > org.basex.query.path.IterPath$1.next(IterPath.java:67) > org.basex.query.iter.NodeIter.next(NodeIter.java:1) > org.basex.query.expr.For$1.next(For.java:91) > org.basex.query.expr.FLWR$1.next(FLWR.java:62) > org.basex.core.cmd.AQuery.query(AQuery.java:101) > org.basex.core.cmd.XQuery.run(XQuery.java:22) > org.basex.core.Command.run(Command.java:328) > org.basex.core.Command.exec(Command.java:309) > org.basex.core.Command.execute(Command.java:77) > org.basex.server.ClientListener.run(ClientListener.java:200) > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
CG
Hi Pascal,
since Version 6.7.2 or 7.0, we have added a bulk mode to BaseX, which speeds up the insertions of new documents quite a lot [1]. What you have to do:
- set the "autoflush" option to false
- perform all the insert operations
- perform an explicit "flush" command
The test code listed at [2] might show how to properly use the flag.
Hope this helps,
Christian
[1] http://docs.basex.org/wiki/Databases#Manage_Resources
[2] https://github.com/BaseXdb/basex-tests/blob/master/src/test/java/org/basex/test/performance/CollAddTest.java
Quoted text · Pascal Heus · 19 lines
On Tue, Nov 15, 2011 at 4:38 PM, Pascal Heus <pascal.heus at gmail.com> wrote: > All: > We often need to load a large number of small XML documents in a BaseX > database. These are not particularly readily serialized in files > (actually are in memory Apache XML Beans). Right now we're combining > them in one "document" and perform a single insert call. We would though > rather keep them as separate documents but this would entail calling > insert thousand of times. Any suggestion as to how this could be > performed efficiently (like fast/bulk inserts or through post processing)? > Also, is there a significant different performing inserts using direct > database access vs client/server (on localhost)? > best > Pascal > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >
PH
All:
We often need to load a large number of small XML documents in a BaseX database. These are not particularly readily serialized in files (actually are in memory Apache XML Beans). Right now we're combining them in one "document" and perform a single insert call. We would though rather keep them as separate documents but this would entail calling insert thousand of times. Any suggestion as to how this could be performed efficiently (like fast/bulk inserts or through post processing)? Also, is there a significant different performing inserts using direct database access vs client/server (on localhost)?
best
Pascal
B
Hi,
Thank you for your message.
I don't use Base GUI.
but, I use BaseXClient on LinuxServer.
I sent query to BaseXServer(Linux) from ClientApplication(Windows7).
Thank you very much for tell URLs.
Quoted text · Christian Grün · 52 lines
>Hi, > >> When I use basex, SessionInfo output error log. >> I sent query to BaseXServer from ClientApplication(C#) repeatedly. >> >> -------error log------- >> �Potential bug? Improper use? Your feedback is welcome: > >Usually, this problem occurs if you are using the BaseX GUI and >Client/Server Architecture at the same time (see [1] for some >information). As this has got quite a frequent issue, we might have to >clarify this on our download page as well. We're also thinking about >globally locking databases across multiple JVMs [2], but that's >sometime trickier than you'd initally expect. > >Hope this helps, feel free to ask for more, >Christian > >[1] http://docs.basex.org/wiki/Startup#GUI.2FStandalone_vs._Client.2FServer >[2] https://github.com/BaseXdb/basex/issues/168 > >> �Contact: basex-talk at mailman.uni-konstanz.de >> �Version: BaseX 7.0.1 >> �Java: Oracle Corporation, 1.7.0_01 >> �OS: Linux, i386 >> �Stack Trace: >> �java.lang.RuntimeException: Not expected: Data Access out of bounds [pre:7081866, indexSize:16184, access:16184 > 16183]. >> � �org.basex.util.Util.notexpected(Util.java:67) >> � �org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:394) >> � �org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:107) >> � �org.basex.data.Data.kind(Data.java:319) >> � �org.basex.query.item.DBNode.parent(DBNode.java:218) >> � �org.basex.query.item.DBNode$9.next(DBNode.java:410) >> � �org.basex.query.path.IterStep$1.next(IterStep.java:46) >> � �org.basex.query.iter.NodeIter.next(NodeIter.java:1) >> � �org.basex.query.path.IterPath$1.next(IterPath.java:67) >> � �org.basex.query.iter.NodeIter.next(NodeIter.java:1) >> � �org.basex.query.expr.For$1.next(For.java:91) >> � �org.basex.query.expr.FLWR$1.next(FLWR.java:62) >> � �org.basex.core.cmd.AQuery.query(AQuery.java:101) >> � �org.basex.core.cmd.XQuery.run(XQuery.java:22) >> � �org.basex.core.Command.run(Command.java:328) >> � �org.basex.core.Command.exec(Command.java:309) >> � �org.basex.core.Command.execute(Command.java:77) >> � �org.basex.server.ClientListener.run(ClientListener.java:200) >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >
CG
Christian Grün21 Nov 2011 12:45 #
Isao san,
thanks for your update. If the problem persists with a new database instance, you may send us some sample data or queries; maybe we'll be able to reproduce the issue.
All the best from Germany,
Christian
2011/11/20 blue <blue at blue.mi.to>:
Quoted text · blue · 71 lines
> Hi, > > Thank you for your message. > > I don't use Base GUI. > but, I use BaseXClient on LinuxServer. > I sent query to BaseXServer(Linux) from ClientApplication(Windows7). > > Thank you very much for tell URLs. > > > >>Hi, >> >>> When I use basex, SessionInfo output error log. >>> I sent query to BaseXServer from ClientApplication(C#) repeatedly. >>> >>> -------error log------- >>> Potential bug? Improper use? Your feedback is welcome: >> >>Usually, this problem occurs if you are using the BaseX GUI and >>Client/Server Architecture at the same time (see [1] for some >>information). As this has got quite a frequent issue, we might have to >>clarify this on our download page as well. We're also thinking about >>globally locking databases across multiple JVMs [2], but that's >>sometime trickier than you'd initally expect. >> >>Hope this helps, feel free to ask for more, >>Christian >> >>[1] http://docs.basex.org/wiki/Startup#GUI.2FStandalone_vs._Client.2FServer >>[2] https://github.com/BaseXdb/basex/issues/168 >> >>> Contact: basex-talk at mailman.uni-konstanz.de >>> Version: BaseX 7.0.1 >>> Java: Oracle Corporation, 1.7.0_01 >>> OS: Linux, i386 >>> Stack Trace: >>> java.lang.RuntimeException: Not expected: Data Access out of bounds [pre:7081866, indexSize:16184, access:16184 > 16183]. >>> org.basex.util.Util.notexpected(Util.java:67) >>> org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:394) >>> org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:107) >>> org.basex.data.Data.kind(Data.java:319) >>> org.basex.query.item.DBNode.parent(DBNode.java:218) >>> org.basex.query.item.DBNode$9.next(DBNode.java:410) >>> org.basex.query.path.IterStep$1.next(IterStep.java:46) >>> org.basex.query.iter.NodeIter.next(NodeIter.java:1) >>> org.basex.query.path.IterPath$1.next(IterPath.java:67) >>> org.basex.query.iter.NodeIter.next(NodeIter.java:1) >>> org.basex.query.expr.For$1.next(For.java:91) >>> org.basex.query.expr.FLWR$1.next(FLWR.java:62) >>> org.basex.core.cmd.AQuery.query(AQuery.java:101) >>> org.basex.core.cmd.XQuery.run(XQuery.java:22) >>> org.basex.core.Command.run(Command.java:328) >>> org.basex.core.Command.exec(Command.java:309) >>> org.basex.core.Command.execute(Command.java:77) >>> org.basex.server.ClientListener.run(ClientListener.java:200) >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > >
Written for BaseX 7.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery