exception

Thursday, 2 April 2015 · 2 messages · last reply 7 Apr 2015
ET
Ertan Tike2 Apr 2015 15:26 #
Hi, I'm trying to optimize all previously existing databases created with older versions of basex. I have tried couple of different scenarios but all failed with an error message. How can I fix this error ? I have executed the following query
for $d in db:list()
return  db:optimize($d, true(), map { 'autooptimize' : true(), 'updindex' :
true() } )
but on some databases i get following error: Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 8.1 Stack Trace:
java.lang.ArrayIndexOutOfBoundsException
at org.basex.io.random.TableDiskAccess.fpre(TableDiskAccess.java:503)
at org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:455)
at org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:148)
at org.basex.data.Data.kind(Data.java:307)
at org.basex.query.value.node.DBNode.<init>(DBNode.java:53)
at org.basex.core.cmd.OptimizeAll$DBParser.parse(OptimizeAll.java:201)
at org.basex.build.Builder.parse(Builder.java:75)
at org.basex.build.DiskBuilder.build(DiskBuilder.java:87)
at org.basex.core.cmd.OptimizeAll.optimizeAll(OptimizeAll.java:130)
at org.basex.query.up.primitives.db.DBOptimize.apply(DBOptimize.java:102)
at org.basex.query.up.DataUpdates.apply(DataUpdates.java:175)
at org.basex.query.up.ContextModifier.apply(ContextModifier.java:126)
at org.basex.query.up.Updates.apply(Updates.java:134)
at org.basex.query.QueryContext.iter(QueryContext.java:364)
at org.basex.query.QueryContext.execute(QueryContext.java:605)
at org.basex.query.QueryProcessor.execute(QueryProcessor.java:98)
at org.basex.core.cmd.AQuery.query(AQuery.java:83)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:379)
at org.basex.core.Command.execute(Command.java:95)
at org.basex.gui.GUI.exec(GUI.java:467)
at org.basex.gui.GUI.access$400(GUI.java:41)
at org.basex.gui.GUI$7.run(GUI.java:410)
Thank you
-- Ertan TİKE <http://www.6kare.com>
CG
Christian Grün7 Apr 2015 11:45 #
Hi Ertan,
Quoted text · Ertan Tike · 3 lines
> I'm trying to optimize all previously existing databases created with older > versions of basex. I have tried couple of different scenarios but all failed > with an error message. How can I fix this error ?
My guess would be that the existing databases are already buggy. Some questions that might shed more light on this: 1. does the INSPECT command on the original databases return any errors? 2. does the optimize call succeed without the two options? 3. does optimize succeed with false() as second argument? 4. can you successfully call optimize on the single databases that trigger the error? Just to mention: it makes no sense to activate both autooptimize and updindex; but I think/hope this shouldn't cause the error messages. Best, Christian
Quoted text · Ertan Tike · 43 lines
> > I have executed the following query > > for $d in db:list() > return db:optimize($d, true(), map { 'autooptimize' : true(), 'updindex' : > true() } ) > > but on some databases i get following error: > > Error: > Improper use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 8.1 > Stack Trace: > java.lang.ArrayIndexOutOfBoundsException > at org.basex.io.random.TableDiskAccess.fpre(TableDiskAccess.java:503) > at org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:455) > at org.basex.io.random.TableDiskAccess.read1(TableDiskAccess.java:148) > at org.basex.data.Data.kind(Data.java:307) > at org.basex.query.value.node.DBNode.<init>(DBNode.java:53) > at org.basex.core.cmd.OptimizeAll$DBParser.parse(OptimizeAll.java:201) > at org.basex.build.Builder.parse(Builder.java:75) > at org.basex.build.DiskBuilder.build(DiskBuilder.java:87) > at org.basex.core.cmd.OptimizeAll.optimizeAll(OptimizeAll.java:130) > at org.basex.query.up.primitives.db.DBOptimize.apply(DBOptimize.java:102) > at org.basex.query.up.DataUpdates.apply(DataUpdates.java:175) > at org.basex.query.up.ContextModifier.apply(ContextModifier.java:126) > at org.basex.query.up.Updates.apply(Updates.java:134) > at org.basex.query.QueryContext.iter(QueryContext.java:364) > at org.basex.query.QueryContext.execute(QueryContext.java:605) > at org.basex.query.QueryProcessor.execute(QueryProcessor.java:98) > at org.basex.core.cmd.AQuery.query(AQuery.java:83) > at org.basex.core.cmd.XQuery.run(XQuery.java:22) > at org.basex.core.Command.run(Command.java:379) > at org.basex.core.Command.execute(Command.java:95) > at org.basex.gui.GUI.exec(GUI.java:467) > at org.basex.gui.GUI.access$400(GUI.java:41) > at org.basex.gui.GUI$7.run(GUI.java:410) > > Thank you > > -- > Ertan TİKE

⚡Generated with XQuery