• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception on parsing  RSS feed

 
Angelo Giugliano
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all.
I have a problem on my application
It is installed on windows and on linux.
It's composed by:
-Jsp + EJB deployed on Websphere Application Server;
-DB Oracle 9

It has a method that parsing a string and gives back the parsed string.
I use a jar: jakarta-oro-2.0.6.jar

It works on windows but not on linux.

It throws an exception on linux:

java.lang.ArrayIndexOutOfBoundsException: 4102
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Perl5Matcher.__repeat(Perl5Matcher.java(Compiled Code))
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Perl5Matcher.__match(Perl5Matcher.java(Compiled Code))
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Perl5Matcher.__tryExpression(Perl5Matcher.java(Inlined Compiled Code))
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Perl5Matcher.__interpret(Perl5Matcher.java(Compiled Code))
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Perl5Matcher.contains(Perl5Matcher.java(Compiled Code))
[11/9/04 11:00:25:631 CET] 62b557af SystemErr R at org.apache.oro.text.regex.Util.substitute(Util.java)

The pattern is:

patternRep01 = compiler.compile("(<img|<IMG)([^\\>]*)(\\> ");


and the code is:

........................................
PatternMatcherInput inputRep01 = new PatternMatcherInput(output);
while (matcher.contains(inputRep01, patternRep01)) {
result = matcher.getMatch();
group = result.group(2);
if (matcher.contains(group, patternRep00)) {
output = Util.substitute(matcher, patternRep00, new Perl5Substitution("", Perl5Substitution.INTERPOLATE_ALL), inputRep01.toString(), 1);
inputRep01.setInput(output);
}
}
.......................................


Could be the different encoding on windows and on linux?
Moreover I read on ORO docs that "Per5Matcher only supports 8-bit ASCII. Any attempt to match Unicode values greater than 255 will result in undefined behavior"


Thank you in advance.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!