Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 80984 invoked from network); 4 Aug 2006 02:17:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 02:17:50 -0000 Received: (qmail 70587 invoked by uid 500); 4 Aug 2006 02:17:46 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 70565 invoked by uid 500); 4 Aug 2006 02:17:45 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 70548 invoked by uid 99); 4 Aug 2006 02:17:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 19:17:45 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of niall.pemberton@gmail.com designates 64.233.182.190 as permitted sender) Received: from [64.233.182.190] (HELO nf-out-0910.google.com) (64.233.182.190) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2006 19:17:43 -0700 Received: by nf-out-0910.google.com with SMTP id y25so1351460nfb for ; Thu, 03 Aug 2006 19:17:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WHeAZITCcC4LMeAhl4r37X/KyY4i8PJcaEG6Nm/nbrrLVIcQE7FTFGkEjnjFlvZMg+a2TIkWAXx0hmdcBggI4KFyi6O2o5jxEhUXb6htcypy09rMsCQElQqKFI4NQzyo4WHvtXMfU6VThslYcbyu5DuM/GWmQ2eB1D0JRS908S0= Received: by 10.78.159.7 with SMTP id h7mr562763hue; Thu, 03 Aug 2006 19:17:22 -0700 (PDT) Received: by 10.78.143.16 with HTTP; Thu, 3 Aug 2006 19:17:22 -0700 (PDT) Message-ID: <55afdc850608031917h1612720dp28eebc0d44cba3e2@mail.gmail.com> Date: Fri, 4 Aug 2006 03:17:22 +0100 From: "Niall Pemberton" To: "Jakarta Commons Users List" Subject: Re: [commons-validator] Upgrade issues In-Reply-To: <7DEC0455383D5044B9499068E379F36A01B83CA0@MSGMROCLN2WIN.DMN1.FMR.COM> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7DEC0455383D5044B9499068E379F36A01B83CA0@MSGMROCLN2WIN.DMN1.FMR.COM> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Are you sure you have ORO 2.0.8 deployed (and no other versions hanging around)? 2.0.8 is the version that Validator 1.3.0 depends on - and the email tests run fine against that version. >From memory this came up before and when I looked into it, the method with that signature didn't exist in earlier oro versions - so I suspect that somehow you're picking up an earlier version. Niall On 8/3/06, O'Shea, Sean wrote: > Hi all, > > I recently upgraded to commons-validator 1.3 and jakarta-oro 2.0.8 in my > struts 1.2.9 application. I was previously using commons-validator > 1.1.4, struts 1.2.7 and jakarta-oro 2.0.6 > > After the upgrade, I notice I get this error any time I try to validate > using the email validator: > > [Servlet Error]-[org.apache.oro.text.regex.Util: method > substitute(Ljava/lang/StringBuffer;Lorg/apache/oro/text/regex/Pa > tternMatcher;Lorg/apache/oro/text/regex/Pattern;Lorg/apache/oro/ > text/regex/Substitution;Ljava/lang/String;I)I not found]: > java.lang.NoSuchMethodError: org.apache.oro.text.regex.Util: method > substitute(Ljava/lang/StringBuffer;Lorg/apache/oro/text/regex/PatternMat > cher;Lorg/apache/oro/text/regex/Pattern;Lorg/apache/oro/text/regex/Subst > itution;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) > at > org.apache.commons.validator.EmailValidator.stripComments(EmailValidator > .java:249) > at > org.apache.commons.validator.EmailValidator.isValid(EmailValidator.java: > 98) > at > org.apache.commons.validator.GenericValidator.isEmail(GenericValidator.j > ava:256) > at > org.apache.struts.validator.FieldChecks.validateEmail(FieldChecks.java:7 > 78) > > The stripComments() method looks like this: > > protected String stripComments(String emailStr) { > String input = emailStr; > String result = emailStr; > String commentPat = > "s/^((?:[^\"\\\\]|\\\\.)*(?:\"(?:[^\"\\\\]|\\\\.)*\"(?:[^\"\\\\]|\111111 > \\\\.)*)*)\\((?:[^()\\\\]|\\\\.)*\\)/$1 /osx"; > Perl5Util commentMatcher = new Perl5Util(); > result = commentMatcher.substitute(commentPat,input); > // This really needs to be =~ or Perl5Matcher comparison > while (!result.equals(input)) { > input = result; > result = commentMatcher.substitute(commentPat,input); > } > return result; > } > > The error occurs when it hits result = > commentMatcher.substitute(commentPat,input); line. > > Has this happened to anyone else? It appears to be some kind of version > clashing issue? > > Any help would be greatly appreciated > > Thanks > > Sean O Shea > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org