ArrayIndexOutOfBoundsException when querying some databases
Hello,
I have several databases running and when I try to query one of them I'm getting the attached exception trace. Any ideas?
Regards, Sebastián
Unexpected error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 8.6.3 Java: Oracle Corporation, 1.8.0_131 OS: Linux, amd64 Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 4291
at org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:172)
at org.basex.data.Data.textRef(Data.java:446)
at org.basex.data.DiskData.text(DiskData.java:250)
at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:58)
at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:1)
at org.basex.query.iter.BasicIter.value(BasicIter.java:63)
at org.basex.query.expr.ParseExpr.value(ParseExpr.java:68)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.CachedFilter.value(CachedFilter.java:37)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.List.value(List.java:148)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.If.value(If.java:128)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.List.value(List.java:150)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.Try.value(Try.java:82)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:185)
at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:70)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.expr.If.value(If.java:128)
at org.basex.query.QueryContext.value(QueryContext.java:405)
at org.basex.query.func.StaticFunc.invValue(StaticFunc.java:182)
at org.basex.query.func.FuncCall.invoke(FuncCall.java:87)
at org.basex.query.func.FuncCall.value(FuncCall.java:61)
at org.basex.query.func.FuncCall.iter(FuncCall.java:66)
at org.basex.query.QueryContext.iter(QueryContext.java:394)
at org.basex.query.scope.MainModule.iter(MainModule.java:121)
at org.basex.query.QueryContext.iter(QueryContext.java:330)
at org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:77)
at org.basex.http.restxq.RestXqModule.process(RestXqModule.java:104)
at org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:107)
at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:49)
at org.basex.http.BaseXServlet.service(BaseXServlet.java:59)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)Hi Sebastián,
Can the error be reproduced with BaseX 9.x? Did you access the affected databases outside the client/server context (e.g. from the GUI or other BaseX instances, while your server was running)? If not, you could check the database logs and find out which actions were performed before the first error occurred.
Best, Christian
Quoted text · Sebastián Filippini · 74 lines
On Fri, Nov 23, 2018 at 12:05 PM Sebastián Filippini <jseba at mpl.cat> wrote: > > Hello, > > I have several databases running and when I try to query one of them I'm getting the attached exception trace. Any ideas? > > Regards, > Sebastián > > > Unexpected error: Improper use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 8.6.3 > Java: Oracle Corporation, 1.8.0_131 > OS: Linux, amd64 > Stack Trace: > java.lang.ArrayIndexOutOfBoundsException: 4291 > at org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:172) > at org.basex.data.Data.textRef(Data.java:446) > at org.basex.data.DiskData.text(DiskData.java:250) > at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:58) > at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:1) > at org.basex.query.iter.BasicIter.value(BasicIter.java:63) > at org.basex.query.expr.ParseExpr.value(ParseExpr.java:68) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.CachedFilter.value(CachedFilter.java:37) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.List.value(List.java:148) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.If.value(If.java:128) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.List.value(List.java:150) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.Try.value(Try.java:82) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:185) > at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:70) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.expr.If.value(If.java:128) > at org.basex.query.QueryContext.value(QueryContext.java:405) > at org.basex.query.func.StaticFunc.invValue(StaticFunc.java:182) > at org.basex.query.func.FuncCall.invoke(FuncCall.java:87) > at org.basex.query.func.FuncCall.value(FuncCall.java:61) > at org.basex.query.func.FuncCall.iter(FuncCall.java:66) > at org.basex.query.QueryContext.iter(QueryContext.java:394) > at org.basex.query.scope.MainModule.iter(MainModule.java:121) > at org.basex.query.QueryContext.iter(QueryContext.java:330) > at org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:77) > at org.basex.http.restxq.RestXqModule.process(RestXqModule.java:104) > at org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:107) > at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:49) > at org.basex.http.BaseXServlet.service(BaseXServlet.java:59) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) > at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) > at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) > at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:748)
Hi Christian,
I have upgraded to 9.1 and have the same error. I only access this database via a webapp that connects by a socket. I have checked the logs and found a REQUEST REPLACE operation before the first error occurred. I have the file name but I don't know how to view it.
Regards, Sebastián
Quoted text · Christian Grün · 86 lines
El 23/11/18 a las 12:08, Christian Grün escribió: > Hi Sebastián, > > Can the error be reproduced with BaseX 9.x? Did you access the > affected databases outside the client/server context (e.g. from the > GUI or other BaseX instances, while your server was running)? If not, > you could check the database logs and find out which actions were > performed before the first error occurred. > > Best, > Christian > > > On Fri, Nov 23, 2018 at 12:05 PM Sebastián Filippini <jseba at mpl.cat> wrote: >> Hello, >> >> I have several databases running and when I try to query one of them I'm getting the attached exception trace. Any ideas? >> >> Regards, >> Sebastián >> >> >> Unexpected error: Improper use? Potential bug? Your feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 8.6.3 >> Java: Oracle Corporation, 1.8.0_131 >> OS: Linux, amd64 >> Stack Trace: >> java.lang.ArrayIndexOutOfBoundsException: 4291 >> at org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:172) >> at org.basex.data.Data.textRef(Data.java:446) >> at org.basex.data.DiskData.text(DiskData.java:250) >> at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:58) >> at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:1) >> at org.basex.query.iter.BasicIter.value(BasicIter.java:63) >> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:68) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.CachedFilter.value(CachedFilter.java:37) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.List.value(List.java:148) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.If.value(If.java:128) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.List.value(List.java:150) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.Try.value(Try.java:82) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:185) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:70) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.If.value(If.java:128) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.func.StaticFunc.invValue(StaticFunc.java:182) >> at org.basex.query.func.FuncCall.invoke(FuncCall.java:87) >> at org.basex.query.func.FuncCall.value(FuncCall.java:61) >> at org.basex.query.func.FuncCall.iter(FuncCall.java:66) >> at org.basex.query.QueryContext.iter(QueryContext.java:394) >> at org.basex.query.scope.MainModule.iter(MainModule.java:121) >> at org.basex.query.QueryContext.iter(QueryContext.java:330) >> at org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:77) >> at org.basex.http.restxq.RestXqModule.process(RestXqModule.java:104) >> at org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:107) >> at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:49) >> at org.basex.http.BaseXServlet.service(BaseXServlet.java:59) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) >> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) >> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) >> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) >> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612) >> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) >> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) >> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) >> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) >> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) >> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) >> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) >> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) >> at java.lang.Thread.run(Thread.java:748)
Hi Cristian.
Same here. We have experienced the same few weeks back. We have BaseX 8.6.3 as well. It was caused by REQUEST REPLACE command, and since then all databases had corrupted one after another. I had to delete all databases, create a new one, and then restore all the old databases from the day before the error occurred (the later backups were also corrupted).
Since that day the error hasn't occurred.
Best regards,
Radim Havlicek
---------- Původní e-mail ---------- Od: Sebastián Filippini <jseba at mpl.cat> Komu: Christian Grün <christian.gruen at gmail.com> Datum: 23. 11. 2018 13:29:02 Předmět: Re: [basex-talk] ArrayIndexOutOfBoundsException when querying some databases "Hi Christian,
I have upgraded to 9.1 and have the same error. I only access this database via a webapp that connects by a socket. I have checked the logs and found a REQUEST REPLACE operation before the first error occurred. I have the file name but I don't know how to view it.
Regards, Sebastián
Quoted text · Christian Grün · 18 lines
El 23/11/18 a las 12:08, Christian Grün escribió: > Hi Sebastián, > > Can the error be reproduced with BaseX 9.x? Did you access the > affected databases outside the client/server context (e.g. from the > GUI or other BaseX instances, while your server was running)? If not, > you could check the database logs and find out which actions were > performed before the first error occurred. > > Best, > Christian > > > On Fri, Nov 23, 2018 at 12:05 PM Sebastián Filippini <jseba at mpl.cat> wrote: >> Hello, >> >> I have several databases running and when I try to query one of them I'm
getting the attached exception trace. Any ideas?
Quoted text · Sebastián Filippini · 53 lines
>> >> Regards, >> Sebastián >> >> >> Unexpected error: Improper use? Potential bug? Your feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 8.6.3 >> Java: Oracle Corporation, 1.8.0_131 >> OS: Linux, amd64 >> Stack Trace: >> java.lang.ArrayIndexOutOfBoundsException: 4291 >> at org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:172) >> at org.basex.data.Data.textRef(Data.java:446) >> at org.basex.data.DiskData.text(DiskData.java:250) >> at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:58) >> at org.basex.query.func.db.DbListDetails$1.get(DbListDetails.java:1) >> at org.basex.query.iter.BasicIter.value(BasicIter.java:63) >> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:68) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.CachedFilter.value(CachedFilter.java:37) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.List.value(List.java:148) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.If.value(If.java:128) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.List.value(List.java:150) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:71) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.Try.value(Try.java:82) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:185) >> at org.basex.query.expr.gflwor.GFLWOR.value(GFLWOR.java:70) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.expr.If.value(If.java:128) >> at org.basex.query.QueryContext.value(QueryContext.java:405) >> at org.basex.query.func.StaticFunc.invValue(StaticFunc.java:182) >> at org.basex.query.func.FuncCall.invoke(FuncCall.java:87) >> at org.basex.query.func.FuncCall.value(FuncCall.java:61) >> at org.basex.query.func.FuncCall.iter(FuncCall.java:66) >> at org.basex.query.QueryContext.iter(QueryContext.java:394) >> at org.basex.query.scope.MainModule.iter(MainModule.java:121) >> at org.basex.query.QueryContext.iter(QueryContext.java:330) >> at org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:77) >> at org.basex.http.restxq.RestXqModule.process(RestXqModule.java:104) >> at org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:107) >> at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:49) >> at org.basex.http.BaseXServlet.service(BaseXServlet.java:59) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) >> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:303)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:208)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:220)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:122)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:612)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
java:170)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
java:103)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
950)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:116)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.
java:421)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp
11Processor.java:1070)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process
(AbstractProtocol.java:611)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run
(JIoEndpoint.java:314)
Quoted text · Sebastián Filippini · 1 line
>> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142)
Quoted text · Sebastián Filippini · 1 line
>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:617)
Quoted text · Sebastián Filippini · 1 line
>> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
(TaskThread.java:61)
Quoted text · Sebastián Filippini · 1 line
>> at java.lang.Thread.run(Thread.java:748)
"
Written for BaseX 9.1. BaseX may have changed since: please check the current documentation.