- From: Toshiki Murata <mura@kansai.oki.co.jp>
- Date: Fri, 28 Feb 1997 18:39:13 +0900
- To: www-jigsaw@w3.org
I used w3c.tools.dbm.jdbm for very large data(size > 7000). Then w3c.tools.dbm.jdbm#lookup(key) cause java.lang.ArrayIndexOutOfBoundsException: 362 at w3c.tools.dbm.jdbm.lookupBucket(jdbm.java:687) at w3c.tools.dbm.jdbm.lookup(jdbm.java:738) jdbm#splitBucket(jdbm.java:296) dir_size <<= 1 ; dir_adr = allocateSpace(dir_size*4) ; int ndiridx[] = new int[dir_size] ; for (int i = 0 ; i < (dir_size/2) ; i++) { ndiridx[2*i] = diridx[i] ; ndiridx[2*i+1] = diridx[i] ; } diridx = ndiridx ; dir_bits = newbits ; dir_changed = true ; So diridx[] is increased here. jdbm#saveDirectory(jdbm.java:452) for (int i = 0 ; i < diridx.length ; i++) out.writeInt(diridx[i]) ; And increased diridx[] is written to jdbm file. But I think jdbm#saveBucket(jdbm.java:439) perhaps over-writes bucket data in diridx[] area. ( because (jdbm.java:556) fileptr is not changed. ) I tried to fix this problem, but it is difficult for me. Thanks. (Sorry about bad English...) -- -------------------------------------- Toshiki Murata Oki Electric Industry Co., Ltd. Kansai Laboratory mura@kansai.oki.co.jp --------------------------------------
Received on Friday, 28 February 1997 04:38:56 UTC