Discussion:
[basex-talk] Data Access out of bounds error when running XQuery on a databse
Jason Ricles
2017-07-10 18:49:16 UTC
Permalink
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-***@mailman.uni-konstanz.de
<basex-***@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?
Christian Grün
2017-07-10 18:59:30 UTC
Permalink
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" <***@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-***@mailman.uni-konstanz.de
<basex-***@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?
Jason Ricles
2017-07-10 19:23:09 UTC
Permalink
Tried the DB on the latest version and got the same error. Optimize all
gave me this "create statistics...:undeclared namespace prefix"
Post by Christian Grün
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
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
*error running xquery: declare namespace tr =
'[query]org.basex.core.BaseXException: Improper use? Potential bug? Your
feedback is welcome:*
*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?
Christian Grün
2017-07-11 07:48:28 UTC
Permalink
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.
Post by Christian Grün
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
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
error running xquery: declare namespace tr =
'[query]org.basex.core.BaseXException: Improper use? Potential bug? Your
Version: BaseX 7.9
Java: Oracle Corporation, 1.8.0_131
OS: Windows 7, amd64
- 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?
Loading...