jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sureka, Sushil" <Sushil.Sur...@tgslc.org>
Subject java.lang.StringIndexOutOfBoundsException Exception
Date Wed, 13 Nov 2002 21:38:52 GMT
Hello All,

 

I wasn't sure if it is suitable for dev or user so I am sending it to both
the groups.

 

I have run into an issue and it seems like it can be a issue in regexp
package. Here is the exception stack trace

 

ava.lang.StringIndexOutOfBoundsException: String index out of range: 7

            at java.lang.String.charAt(String.java:511)

            at
org.apache.regexp.StringCharacterIterator.charAt(StringCharacterIterator.jav
a:90)

            at org.apache.regexp.RE.matchNodes(RE.java:1320)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            at org.apache.regexp.RE.matchNodes(RE.java:910)

            at org.apache.regexp.RE.matchNodes(RE.java:1376)

            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)

            at
org.tgslc.service.validation.rule.RegExpRule.violatesCondition(RegExpRule.ja
va:147)

 

All I am doing at RegExpRule.violatesCondition is calling
re.match(SOME_STRING).

 

The regular expression it is trying to match against is (^[A-Za-z0-9\-/
]*$)|(^[Nn]/[Aa]$)

 

The string is getting read from the file and it is getting matched against
this expression. The thing is if we have multiple files running we have run
into this issue off and on, but the same file (which fails when we are
running multiple files simultaneously)  processes ok if we are running by
itself.

 

This points me to some synchronization problem but then we don't store the
Re class as static variable. Any idea what might be going wrong here??

 

Sushil

 

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message