Data Access out of bounds error when running XQuery on a databse

Monday, 10 July 2017 · 4 messages · last reply 11 Jul 2017
CG
Christian Grünin reply to Jason Ricles, 10 Jul 2017, 22:4910 Jul 2017 20:59 #
Dear Jason, As you already indicated by yourself, version 7.9 is a bit older, so it would be interesting if you can reproduce the problem with a newer version. You could additionally try to optimize your database (using OPTIMIZE ALL or db:optimize(..., true()) ) and give us some feedback if the problem persists. Best, Christian
Quoted text · Jason Ricles · 1 line
Am 10.07.2017 8:49 nachm. schrieb "Jason Ricles" <jgr208 at alum.lehigh.edu>:
I am running BaseX 7.9 (yes I know its old but for reasons beyond the scope of this we can't just update BaseX) on RHEL 6.9. The BaseX is not running any instance as a server but as a standalone application with its libraries being used with my java application. I am able to add new files to the database, but when I run an XQuery I get the following output: *error running xquery: declare namespace tr = '[query]org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is welcome:* *Contact: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de>* *Version: BaseX 7.9* *Java: Oracle Corporation, 1.8.0_131* *OS: Windows 7, amd64* *Stack Trace: * *java.lang.RuntimeException: Data Access out of bounds:* *- pre value: 5813546* *- #used blocks: 22710* *- #total locks: 22710* *- access: 22709 (22710 > 22709]* *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$5.next(DBNode.java:353)* *at org.basex.query.value.node.DBNode$5.next(DBNode.java:345)* *at org.basex.query.path.IterStep$1.next(IterStep.java:39)* *at org.basex.query.path.IterStep$1.next(IterStep.java:31)* *at org.basex.query.path.MixedPath.iter(MixedPath.java:99)* *at org.basex.query.gflwor.GFLWOR$2.next(GFLWOR.java:78)* *at org.basex.query.MainModule$1.next(MainModule.java:98)* *at org.basex.core.cmd.AQuery.query(AQuery.java:96)* *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.core.Command.execute(Command.java:117)* *at basex_debug.Corrupt_DB_Test.queryTestResultsUUID(Corrupt_DB_Test.java:114)* *at basex_debug.Corrupt_DB_Test.checkIfAlreadyAdded(Corrupt_DB_Test.java:48)* *at basex_debug.Corrupt_DB_Test.addToDatabase(Corrupt_DB_Test.java:64)* * at basex_debug.Corrupt_DB_Test.main(Corrupt_DB_Test.java:23)* The query was running fine before so I know there is not a problem with the query, I have only read about the database getting corrupt with BaseX when ran in Server and Client mode. What may be causing this problem and what are some possible solutions?
JR
Jason Ricles10 Jul 2017 22:49 #
I am running BaseX 7.9 (yes I know its old but for reasons beyond the scope of this we can't just update BaseX) on RHEL 6.9. The BaseX is not running any instance as a server but as a standalone application with its libraries being used with my java application. I am able to add new files to the database, but when I run an XQuery I get the following output: *error running xquery: declare namespace tr = '[query]org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is welcome:* *Contact: basex-talk at mailman.uni-konstanz.de <basex-talk at mailman.uni-konstanz.de>* *Version: BaseX 7.9* *Java: Oracle Corporation, 1.8.0_131* *OS: Windows 7, amd64* *Stack Trace: * *java.lang.RuntimeException: Data Access out of bounds:* *- pre value: 5813546* *- #used blocks: 22710* *- #total locks: 22710* *- access: 22709 (22710 > 22709]* *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$5.next(DBNode.java:353)* *at org.basex.query.value.node.DBNode$5.next(DBNode.java:345)* *at org.basex.query.path.IterStep$1.next(IterStep.java:39)* *at org.basex.query.path.IterStep$1.next(IterStep.java:31)* *at org.basex.query.path.MixedPath.iter(MixedPath.java:99)* *at org.basex.query.gflwor.GFLWOR$2.next(GFLWOR.java:78)* *at org.basex.query.MainModule$1.next(MainModule.java:98)* *at org.basex.core.cmd.AQuery.query(AQuery.java:96)* *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.core.Command.execute(Command.java:117)* *at basex_debug.Corrupt_DB_Test.queryTestResultsUUID(Corrupt_DB_Test.java:114)* *at basex_debug.Corrupt_DB_Test.checkIfAlreadyAdded(Corrupt_DB_Test.java:48)* *at basex_debug.Corrupt_DB_Test.addToDatabase(Corrupt_DB_Test.java:64)* * at basex_debug.Corrupt_DB_Test.main(Corrupt_DB_Test.java:23)* The query was running fine before so I know there is not a problem with the query, I have only read about the database getting corrupt with BaseX when ran in Server and Client mode. What may be causing this problem and what are some possible solutions?
JR
Jason Riclesin reply to Christian Grün, 10 Jul 2017, 20:5910 Jul 2017 23:23 #
Tried the DB on the latest version and got the same error. Optimize all gave me this "create statistics...:undeclared namespace prefix"
Quoted text · Christian Grün · 76 lines
On Mon, Jul 10, 2017 at 2:59 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Dear Jason, > > As you already indicated by yourself, version 7.9 is a bit older, so it > would be interesting if you can reproduce the problem with a newer version. > You could additionally try to optimize your database (using OPTIMIZE ALL or > db:optimize(..., true()) ) and give us some feedback if the problem > persists. > > Best, > Christian > > > > Am 10.07.2017 8:49 nachm. schrieb "Jason Ricles" <jgr208 at alum.lehigh.edu>: > > I am running BaseX 7.9 (yes I know its old but for reasons beyond the > scope of this we can't just update BaseX) on RHEL 6.9. > > The BaseX is not running any instance as a server but as a standalone > application with its libraries being used with my java application. > > I am able to add new files to the database, but when I run an XQuery I get > the following output: > > > *error running xquery: declare namespace tr = > '[query]org.basex.core.BaseXException: Improper use? Potential bug? Your > feedback is welcome:* > *Contact: basex-talk at mailman.uni-konstanz.de > <basex-talk at mailman.uni-konstanz.de>* > *Version: BaseX 7.9* > *Java: Oracle Corporation, 1.8.0_131* > *OS: Windows 7, amd64* > *Stack Trace: * > *java.lang.RuntimeException: Data Access out of bounds:* > *- pre value: 5813546* > *- #used blocks: 22710* > *- #total locks: 22710* > *- access: 22709 (22710 > 22709]* > *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$5.next(DBNode.java:353)* > *at org.basex.query.value.node.DBNode$5.next(DBNode.java:345)* > *at org.basex.query.path.IterStep$1.next(IterStep.java:39)* > *at org.basex.query.path.IterStep$1.next(IterStep.java:31)* > *at org.basex.query.path.MixedPath.iter(MixedPath.java:99)* > *at org.basex.query.gflwor.GFLWOR$2.next(GFLWOR.java:78)* > *at org.basex.query.MainModule$1.next(MainModule.java:98)* > *at org.basex.core.cmd.AQuery.query(AQuery.java:96)* > *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.core.Command.execute(Command.java:117)* > *at > basex_debug.Corrupt_DB_Test.queryTestResultsUUID(Corrupt_DB_Test.java:114)* > *at basex_debug.Corrupt_DB_Test.ch > <http://basex_debug.Corrupt_DB_Test.ch>eckIfAlreadyAdded(Corrupt_DB_Test.java:48)* > *at basex_debug.Corrupt_DB_Test.ad > <http://basex_debug.Corrupt_DB_Test.ad>dToDatabase(Corrupt_DB_Test.java:64)* > > * at basex_debug.Corrupt_DB_Test.ma > <http://basex_debug.Corrupt_DB_Test.ma>in(Corrupt_DB_Test.java:23)* > > The query was running fine before so I know there is not a problem with > the query, I have only read about the database getting corrupt with BaseX > when ran in Server and Client mode. > > What may be causing this problem and what are some possible solutions? > > > >
CG
Christian Grün11 Jul 2017 09:48 #
Quoted text · Jason Ricles · 2 lines
> Tried the DB on the latest version and got the same error. Optimize all gave > me this "create statistics...:undeclared namespace prefix"
Could you possibly add some more infos? Did you get this error with 7.9 or the latest version? Did the command complete successfully, or did it fail? Maybe a corrupt namespace hierarchy in your database causes these errors. You could additionally try to… 1. Run the INSPECT command and see if it reports any errors. 2. Export your database (via the EXPORT command) and create a new database from the resulting directory.
Quoted text · Christian Grün · 73 lines
> On Mon, Jul 10, 2017 at 2:59 PM, Christian Grün <christian.gruen at gmail.com> > wrote: >> >> Dear Jason, >> >> As you already indicated by yourself, version 7.9 is a bit older, so it >> would be interesting if you can reproduce the problem with a newer version. >> You could additionally try to optimize your database (using OPTIMIZE ALL or >> db:optimize(..., true()) ) and give us some feedback if the problem >> persists. >> >> Best, >> Christian >> >> >> >> Am 10.07.2017 8:49 nachm. schrieb "Jason Ricles" <jgr208 at alum.lehigh.edu>: >> >> I am running BaseX 7.9 (yes I know its old but for reasons beyond the >> scope of this we can't just update BaseX) on RHEL 6.9. >> >> The BaseX is not running any instance as a server but as a standalone >> application with its libraries being used with my java application. >> >> I am able to add new files to the database, but when I run an XQuery I get >> the following output: >> >> error running xquery: declare namespace tr = >> '[query]org.basex.core.BaseXException: Improper use? Potential bug? Your >> feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 7.9 >> Java: Oracle Corporation, 1.8.0_131 >> OS: Windows 7, amd64 >> Stack Trace: >> java.lang.RuntimeException: Data Access out of bounds: >> - pre value: 5813546 >> - #used blocks: 22710 >> - #total locks: 22710 >> - access: 22709 (22710 > 22709] >> 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$5.next(DBNode.java:353) >> at org.basex.query.value.node.DBNode$5.next(DBNode.java:345) >> at org.basex.query.path.IterStep$1.next(IterStep.java:39) >> at org.basex.query.path.IterStep$1.next(IterStep.java:31) >> at org.basex.query.path.MixedPath.iter(MixedPath.java:99) >> at org.basex.query.gflwor.GFLWOR$2.next(GFLWOR.java:78) >> at org.basex.query.MainModule$1.next(MainModule.java:98) >> at org.basex.core.cmd.AQuery.query(AQuery.java:96) >> 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.core.Command.execute(Command.java:117) >> at >> basex_debug.Corrupt_DB_Test.queryTestResultsUUID(Corrupt_DB_Test.java:114) >> at >> basex_debug.Corrupt_DB_Test.checkIfAlreadyAdded(Corrupt_DB_Test.java:48) >> at basex_debug.Corrupt_DB_Test.addToDatabase(Corrupt_DB_Test.java:64) >> >> at basex_debug.Corrupt_DB_Test.main(Corrupt_DB_Test.java:23) >> >> The query was running fine before so I know there is not a problem with >> the query, I have only read about the database getting corrupt with BaseX >> when ran in Server and Client mode. >> >> What may be causing this problem and what are some possible solutions? >> >> >> >

⚡Generated with XQuery