0

I am using Geomesa 1.1 to connect to Accumulo 1.6.2 with Java. I have no problems querying the database for specific attributes (specific column values). But when I try to run a range query (tried both time and geometric ranges) I get an error.

When I check the Accumulo logs I see this error:

exception while doing multi-scan 
    java.lang.ArrayIndexOutOfBoundsException: -1

But none of my code uses Arrays. The exception is thrown from the underlying library.

This is how I am constructing my CQL filter:

Filter cqlFilter = CQL.toFilter("BBOX(where, 160.0, 1.0, 170.0, 3.0)");

What might be causing the java.lang.ArrayIndexOutOfBoundsException: -1?

EDIT

Updated question and answer to make it clear it isn't a duplicate and provide more general help to future visitors.

Misha Brukman
  • 12,938
  • 4
  • 61
  • 78
Mike S
  • 11,329
  • 6
  • 41
  • 76
  • 1
    Don't suppose you have the full stack trace for that exception, do you? – Christopher Jan 07 '16 at 00:43
  • I think I've figured out the problem. I'm pretty sure it was a dumb mistake on my part (as these things usually are). If I'm right I'll add the answer. – Mike S Jan 07 '16 at 17:10

2 Answers2

0

As a quick note, it looks like you might be using the GeoMesa Accumulo QuickStart. The geometry field there is named 'Where'. If you update the filter to

Filter cqlFilter = CQL.toFilter("BBOX(Where, 160.0, 1.0, 170.0, 3.0)");

it may work for you.

GeoJim
  • 1,320
  • 7
  • 12
-1

Geomesa/Accumulo will misleadingly throw this red herring error if you pass an invalid/incorrect table name to toFilter. Before you spend a lot of time reading through general solutions to this problem and searching your code for bugs, be sure that you have the correct table name.

Community
  • 1
  • 1
Mike S
  • 11,329
  • 6
  • 41
  • 76