java.lang.ArrayIndexOutOfBoundsException on REST GETrequest
Friday, 5 June 2020 · 2 messages · last reply 6 Jun 2020
GA
Geoff Alexander5 Jun 2020 23:17 #
We have a BaseX application that uses the BaseX REST API. A number of GET requests are failing with an HTTP 400 Bad Request response. Looking at the BaseX logs, I find that BaseX is internally throwing
java.lang.ArrayIndexOutOfBoundsException for these HTTP 400 Bad Request failures:
<entry time="05:13:57.193" address="***.***.***.***:*****" user="admin" type="400" ms="3.93">[GET]
https://********.*******.ibm.com:10443/BaseX/rest/****/*******.xml; Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 8.6.7 Java: IBM Corporation, 1.8.0_241 OS: Linux, amd64 Stack Trace:
java.lang.ArrayIndexOutOfBoundsException at
org.basex.util.Compress.unpack(Compress.java:120) at
org.basex.data.DiskData.txt(DiskData.java:284) at
org.basex.data.DiskData.text(DiskData.java:251) at
org.basex.io.serial.Serializer.node(Serializer.java:370) at org.basex.io.serial.Serializer.node(Serializer.java:158) at org.basex.io.serial.StandardSerializer.node(StandardSerializer.java:105) at org.basex.io.serial.Serializer.node(Serializer.java:345) at org.basex.io.serial.Serializer.node(Serializer.java:158) at org.basex.io.serial.StandardSerializer.node(StandardSerializer.java:105) at org.basex.io.serial.AdaptiveSerializer.node
(AdaptiveSerializer.java:75) at org.basex.io.serial.Serializer.serialize (Serializer.java:109) at
org.basex.io.serial.AdaptiveSerializer.serialize
(AdaptiveSerializer.java:66) at org....</entry>
I realize that BaseX 8.6.7 is somewhat old. I can look at upgrading to a more recent version if necessary. But before I do that, I'd like to know if the java.lang.ArrayIndexOutOfBoundsException is a known problem and more importantly if there is anything we can do short of upgrading BaseX to fix the problem.
Thanks,
Geoff Alexander, Ph.D.
Software Engineer, Corporate Tools Development
IBM Corporation
Charlotte, NC
CG
Christian Grün6 Jun 2020 19:47 #
Hi Geoff,
As you already indicated, version 8.6.7 is pretty old now, so it’s difficult to guess what might have gone wrong. Feel free to share with us if you can reproduce the behavior with the latest version.
Best,
Christian
Quoted text · Geoff Alexander · 15 lines
On Fri, Jun 5, 2020 at 9:17 PM Geoff Alexander <gdlxn at us.ibm.com> wrote: > > We have a BaseX application that uses the BaseX REST API. A number of GET requests are failing with an HTTP 400 Bad Request response. Looking at the BaseX logs, I find that BaseX is internally throwing java.lang.ArrayIndexOutOfBoundsException for these HTTP 400 Bad Request failures: > > <entry time="05:13:57.193" address="***.***.***.***:*****" user="admin" type="400" ms="3.93">[GET] https://********.*******.ibm.com:10443/BaseX/rest/****/*******.xml; Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 8.6.7 Java: IBM Corporation, 1.8.0_241 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException at org.basex.util.Compress.unpack(Compress.java:120) at org.basex.data.DiskData.txt(DiskData.java:284) at org.basex.data.DiskData.text(DiskData.java:251) at org.basex.io.serial.Serializer.node(Serializer.java:370) at org.basex.io.serial.Serializer.node(Serializer.java:158) at org.basex.io.serial.StandardSerializer.node(StandardSerializer.java:105) at org.basex.io.serial.Serializer.node(Serializer.java:345) at org.basex.io.serial.Serializer.node(Serializer.java:158) at org.basex.io.serial.StandardSerializer.node(StandardSerializer.java:105) at org.basex.io.serial.AdaptiveSerializer.node(AdaptiveSerializer.java:75) at org.basex.io.serial.Serializer.serialize(Serializer.java:109) at org.basex.io.serial.AdaptiveSerializer.serialize(AdaptiveSerializer.java:66) at org....</entry> > > > I realize that BaseX 8.6.7 is somewhat old. I can look at upgrading to a more recent version if necessary. But before I do that, I'd like to know if the java.lang.ArrayIndexOutOfBoundsException is a known problem and more importantly if there is anything we can do short of upgrading BaseX to fix the problem. > > Thanks, > Geoff Alexander, Ph.D. > Software Engineer, Corporate Tools Development > IBM Corporation > Charlotte, NC >
Written for BaseX 9.3. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery