Project

General

Profile

Actions

Bug #4680

closed

Geoserver StringIndexOutOfBoundsException

Added by Michael Daigle about 14 years ago. Updated about 13 years ago.

Status:
Resolved
Priority:
Normal
Category:
metacat
Target version:
Start date:
01/20/2010
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4680

Description

Geoserver is throwing many StringIndexOutOfBoundsExceptions. There is a geoserver bug listed against version 2.4.4 that seems to address this. Note that we are running version 1.4.0. We should probably update geoserver.

The bug info that I found is:

International strings in DbfFileWriter cause StringIndexOutOfBoundsException
----------------------------------------------------------------------------

Key: GEOT-1926
URL: http://jira.codehaus.org/browse/GEOT-1926
Project: GeoTools
Issue Type: Bug
Components: data shapefile
Affects Versions: 2.4.4
Reporter: Alexey Noskov
Assignee: Jesse Eichar
Attachments: DbaseInternationalTest.java

When storing some international string using DbfFileWriter, exception
StringIndexOutOfBoundsException may occur if two conditions are met:
1) String's length less then field size
2) String's size in bytes more, then field size

Problem in DbaseFileWriter, method getFieldString(int size, String s)

Loop
for( int index=size-1; currentBytes>size; index--)
need change to
for( int index=buffer.length()-1; currentBytes>size; index--)

Because, when storing string in buffer through buffer.replace( 0, size, s ),
it's size are truncated to length of s, and there are possible no symbol at
index size-1


Related issues

Blocked by Metacat - Bug #4367: metacat didn't update xml_path_index table while a document was updatedResolvedMichael Daigle09/04/2009

Actions
Actions #1

Updated by ben leinfelder about 13 years ago

We are now using Geotools 2.6.4

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 4680

Actions

Also available in: Atom PDF