Thank you for your post.
If you specify all the fields instead of the asterisk, do you still get the same error? If you specify the field that contains the string, do you get the same error? I'm just trying to hopefully narrow down the cause.
To avoid confusion let me first clarify the issue. There are actually two issues.
Issue 1: FMSQLException constructor throws StringIndexOutOfBoundsException
I'm calling executeQuery (see ):
ResultSet rs=someStatement.executeQuery("SELECT * FROM some_table");
The query succeeds and executeQuery returns a ResultSet
an error occurs and executeQuery throws a SQLException that contains a hopefully meaningful error message.
executeQuery throws a StringIndexOutOfBoundsException.
The stack trace in my first post shows that the StringIndexOutOfBoundsException was caused in the constructor of FMSQLException (which presumably is a subclass of the expected SQLException), because the constructor called substring (see ) with a value of 11 for beginIndex or endIndex on a String that is shorter than 11 characters. That's pretty clearly a bug in the constructor of FMSQLException (which is part of the JDBC driver).
The value of the String was "65527". I have no idea where that value comes from but I'm quite sure that it's not in the table (can't look it up from where I am now).
An unpleasant side effect of this bug is that the StringIndexOutOfBoundsException "hides" the about to be thrown FMSQLException and I don't get that hopefully meaningful error message for...
"SELECT * FROM some_table" shouldn't cause an error. And before upgrading to FM 11 it didn't. The only thing I changed in the application was replacing the old Sequelink JDBC driver with the new Filemaker 11 JDBC driver. After changing the query to "SELECT field1, field2, ... FROM some_table" the query succeeded. But I only selected a few fields. I'll try all when I'm back at work tomorrow. I'll also verify whether the string "65527" is in the table then.
Thanks for the additional information.
I apologize for my first post. I should have been more clear. With the information I had, I wanted to try and narrow down the cause. The asterisk should work, but I wanted to try and isolate it and see if a particular field is causing the issue.
How many fields are being requested? Do any fields contain a large amount of content? Anything else you can think of that may affect the query would be appreciated.
Have you tried executing the same query using an ODBC application (like MS Excel or MS Access)?
Since ODBC and JDBC use the same SQL engine, you might be able to find out the true error message from an ODBC application (that doesn't have the same problem with the FMSQLException constructor).