Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ArrayIndexOutOfBoundsException with db2jcc and db2 8.1 server

45 views
Skip to first unread message

Fred Romelfanger

unread,
Mar 8, 2003, 10:08:56 PM3/8/03
to
I didn't find a way to post a "free" support question on the ibm web
site, so I was wondering if anyone else had seen this.

I am using the trial version of the db2 v8.1 server on a RedHat 8.0
Linux box. I am using the version of the type 4 jdbc driver that
came with the release (db2jcc.jar) on a Sun running Solaris 9, tomcat
4.1.18 using J2SE 1.4.1_01.

I am running the following query:

select pr_type, pr_number, comment_number, email, authuser, remark,
mime_type, date_submit, pr_filename, ccomment, bcomment from pr_comment
where pr_type='PR' and pr_number in (
47243, 47273, 47287, 47355, 47356, 47365, 47386, 47396, 47438, 47448,
45013, 46258, 47072, 47145, 47223, 47224, 47226, 47229, 47233, 47235,
47246, 47276, 47364, 46491, 46825, 46866, 44798, 45757, 46029, 46442,
46688, 46751, 47069, 41635, 42613, 43086, 43036, 45511, 41453, 41998,
42529, 43033, 43467, 44210, 44434, 43233, 40695, 40696, 42932, 43095,
43219, 43320, 44031, 44302, 44796, 44864, 45043, 45371, 45419, 45458,
45600, 45910, 46311, 46380, 46532)
order by pr_type, pr_number, comment_number

I get the following exception when calling ResultSet.next()

java.lang.ArrayIndexOutOfBoundsException: 4
at com.ibm.db2.jcc.a.d.bc(d.java:681)
at com.ibm.db2.jcc.a.d.A(d.java:643)
at com.ibm.db2.jcc.a.d.f(d.java:258)
at com.ibm.db2.jcc.b.o.a(o.java:183)
at com.ibm.db2.jcc.b.ca.next(ca.java:220)

ccomment and bcomment are CLOB and BLOB fields, but other than that
the data is very basic data types. All I could think of was a hidden
limitation on the "in". I was wondering if anyone else had run into
something like this and knew how to get around it. The same software
runs fine using a Sybase and Oracle JDBC drivers/databases.

Thanks,
Fred Romelfanger
fr...@stsci.edu


Fred Romelfanger

unread,
Mar 10, 2003, 10:35:06 AM3/10/03
to

> select pr_type, pr_number, comment_number, email, authuser, remark,
> mime_type, date_submit, pr_filename, ccomment, bcomment from pr_comment
> where pr_type='PR' and pr_number in (
> 47243, 47273, 47287, 47355, 47356, 47365, 47386, 47396, 47438, 47448,
> 45013, 46258, 47072, 47145, 47223, 47224, 47226, 47229, 47233, 47235,
> 47246, 47276, 47364, 46491, 46825, 46866, 44798, 45757, 46029, 46442,
> 46688, 46751, 47069, 41635, 42613, 43086, 43036, 45511, 41453, 41998,
> 42529, 43033, 43467, 44210, 44434, 43233, 40695, 40696, 42932, 43095,
> 43219, 43320, 44031, 44302, 44796, 44864, 45043, 45371, 45419, 45458,
> 45600, 45910, 46311, 46380, 46532)
> order by pr_type, pr_number, comment_number
>
The exception is being caused by a particular number in the list
for which jdbc/db2 is having problems finding the entry in the table.
The insert of the record appears to have been sucessful, just can't
get it back.
fred.vcf

PM (pm3iinc-nospam)

unread,
Mar 11, 2003, 10:22:18 AM3/11/03
to
Not sure it relates but i've seen somewhere that the drda flow (that the db2
jcc uses)
doesn't support certain lobs > 32k.

Have you tried the db2drdat tool to trace? (drda trace)

You say it's not your case but just in case....
There is a sp1 for v8 and it contains a bad driver. (there is another one
available as a fix)
Verify your db2level.


PM

Fred Romelfanger

unread,
Mar 12, 2003, 2:17:39 PM3/12/03
to
The data in this particular case is about 400 bytes. We have tried
dumping the table and recreating it using the inserts, and have the
same problem with the exact same row. I will pass along your suggestion
to the person managing the server.
-- fred.
fred.vcf

PM (pm3iinc-nospam)

unread,
Mar 13, 2003, 10:50:42 AM3/13/03
to
just to narrow down the problem, you can select without the lobs to see if
it still works.


and maybe check these just in case
db2diag.log file
(JDK_PATH)
(JAVA_HEAP_SZ) (not 512)

PM


0 new messages