commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "O'Shea, Sean" <Sean.O'S...@fmr.com>
Subject RE: [commons-validator] Upgrade issues
Date Fri, 04 Aug 2006 17:02:34 GMT
Thanks Niall,

I'm running in WebSphere 5.1.1 and it packages a jython.jar with the
server. This jython.jar includes a Util.class which does not work with
jakarta-oro-2.0.8.

This article explains all:
http://www-128.ibm.com/developerworks/websphere/techjournal/0406_brown/0
406_brown.html

Sean


-----Original Message-----
From: Niall Pemberton [mailto:niall.pemberton@gmail.com] 
Sent: Thursday, August 03, 2006 10:17 PM
To: Jakarta Commons Users List
Subject: Re: [commons-validator] Upgrade issues

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 <Sean.O'Shea@fmr.com> 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&#40;Ljava/lang/StringBuffer&#59;Lorg/apache/oro/text/regex/Pa
>
tternMatcher&#59;Lorg/apache/oro/text/regex/Pattern&#59;Lorg/apache/oro/
> text/regex/Substitution&#59;Ljava/lang/String&#59;I&#41;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



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message