problem with massive use

"Celestino Bellone" <[email protected]> Mon, 23 Jun 2003 15:30:56 +0200
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <006401c3398b$ad6b17a0$4d8414ac@celestino>
Hi everybody

I've developed (with my colleagues) a RE-based java class (named
CalcoloCodice) that evaluates a string and returns a "code" strictly
dependentent on the string.

The class contains different static String arrays (the expressions) that,
via a static initializer, are converted into RE arrays.

At runtime, the application calls a CalcoloCodice's static method that calls
the match() method for every regexp until a code is found (and exits if
anything is found) returning the result code.

Occasionally (with no apparent reason), when there are a lot of users that
uses the application, the following exception are trown by RE class:

java.lang.StringIndexOutOfBoundsException: String index out of range: 7
        at java.lang.String.charAt(String.java:516)
        at
org.apache.regexp.StringCharacterIterator.charAt(StringCharacterIterator.jav
a:90)
        at org.apache.regexp.RE.matchNodes(RE.java:1209)
        at org.apache.regexp.RE.matchAt(RE.java:1448)
        at org.apache.regexp.RE.match(RE.java:1498)
        at org.apache.regexp.RE.match(RE.java:1468)
        at org.apache.regexp.RE.match(RE.java:1561)

There are some people that can help me?

Thanks a lot in advance

Celestino

P.S.: excuse me for my poor English... ;-)