Bug #4680
closedGeoserver StringIndexOutOfBoundsException
0%
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