You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oro-user@jakarta.apache.org by Jo...@mizuhocbus.com on 2003/06/03 04:21:33 UTC

method substitute not found: please help

Stats:
oro 2.0.7
Websphere in Win2k
JDK 1.3.1x

It seems no matter what I do, I get the following message when I try to do 
a substitution with the PerlUtil lib:

[Servlet Error]-[org.apache.oro.text.regex.Util: method 
substitute(Ljava/lang/StringBuffer&#59;Lorg/apache/oro/text/regex/PatternMatcher&#59;Lorg/apache/oro/text/regex/Pattern&#59;Lorg/apache/oro/text/regex/Substitution&#59;Ljava/lang/String&#59;I)I 
not found]: java.lang.NoSuchMethodError: org.apache.oro.text.regex.Util: 
method 
substitute(Ljava/lang/StringBuffer;Lorg/apache/oro/text/regex/PatternMatcher;Lorg/apache/oro/text/regex/Pattern;Lorg/apache/oro/text/regex/Substitution;Ljava/lang/String;I)I 
not found
        at org.apache.oro.text.perl.Perl5Util.substitute(Unknown Source)
        at org.apache.oro.text.perl.Perl5Util.substitute(Unknown Source)
 
Strange thing is, I know I've used this in the last year, albeit on 
Tomcat. The jakarta-oro-2.0.7.jar is in the lib directory with all the 
rest of the jars I'm using and I even rename it to jakarta-oro.jar just in 
case.

Here are the imports (took the whole kitchen sink just in case) and the 
code I'm trying to get working.

import org.apache.oro.text.regex.Pattern;
import org.apache.oro.text.regex.PatternCompiler;
import org.apache.oro.text.regex.PatternMatcher;
import org.apache.oro.text.regex.Perl5Compiler;
import org.apache.oro.text.perl.MalformedPerl5PatternException;
import org.apache.oro.text.perl.Perl5Util;

..snip

Perl5Util parseit = new Perl5Util();
String tmpAction = null;

...snip

tmpAction = eb.getActionTaken();
tmpAction = parseit.substitute("s/joe/sam/g",tmpAction);

Massive thanks in advance for any help, Joe

= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = 
This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the "Bank"). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained.
= = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =