You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "M. Huber" <dj...@gmx.de> on 2012/06/02 08:59:09 UTC

t:validateRegExpr gives NoSuchMethodException with Facelets

Hi!

I am using MyFaces Tomahawk 1.1.15 on Mojarra JSF 1.2 Impl with Facelets 1.1.11. Almost everything seems fine but when I use t:validateRegExpr I get:

java.lang.NoSuchMethodException: org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag.TagConfig)

The ValidatorBaseTagHandler contained in the Tomahawk JAR defines

org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag. jsf. TagConfig)

instead. I also had a look at Facelets 1.1.15 JAR (which is the latest 1.1.x I could find on the net) and it does not seem to define com.sun.facelets.tag.jsf.TagConfig either. Am I using the wrong Facelets version? Which version of Facelets goes with Tomahawk 1.1.15 and JSF 1.2?

Many thanks

Martin
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

Re: t:validateRegExpr gives NoSuchMethodException with Facelets

Posted by "M. Huber" <dj...@gmx.de>.
Sorry, there were two errors in my request: First, I am actually using tomahawk12-1.1.13 which is the latest release for JSF 1.2 on the Tomahawk download page as of now. Second ValidatorBaseTagHandler defines a constructor with parameter type ValidatorConfig and not TagConfig.

Maybe, Facelets takes the validateRegExpr for a normal tag instead of a validator and consequently wants to pass it a TagConfig instead of a ValidatorConfig. I do not know how to change this but I found a workaround:

I extracted the tomahawk.taglib.xml from the Tomahawk JAR and put it in my WEB-INF (which seems necessary for me anyway due to a bug in JBoss AS 5, see http://community.jboss.org/message/126291). Comparing the tomahawk.taglib.xml of version 1.1.13 to my previous version (I think 1.1.6 for MyFaces JSF 1.1) led me to trying to comment out the handlers in the validators section as a workaround. 

  <tag>
    <tag-name>validateRegExpr</tag-name>
    <validator>
      <validator-id>org.apache.myfaces.validator.RegExpr</validator-id>
      <!--handler-class>...ValidatorBaseTagHandler</handler-class-->
    </validator>
  </tag>

This seems to work. At least I was able to verify that by debugging through AbstractRegExprValidator.validate() which does the heavy lifting of t:validateRegExpr.

Actually, I do not really know why it works now or what was wrong before; so I regard this workaround as a hack. I still would appreciate any light on this to get rid of (or approve of) that hack.

Martin

-------- Original-Nachricht --------
> Datum: Sat, 2 Jun 2012 08:45:28 -0400
> Von: Mike Kienenberger <mk...@gmail.com>
> An: MyFaces Discussion <us...@myfaces.apache.org>
> Betreff: Re: t:validateRegExpr gives NoSuchMethodException with Facelets

> I use Facelets 1.1.14 with tomahawk 1.19 and Myfaces 1.2.9 right now.
> 
> One thing you should make sure is that you are using the JSF 1.2
> version of Tomahawk.  Also 1.1.15 is pretty old -- I would upgrade to
> the latest tomahawk version.
> 
> 
> 
> On Sat, Jun 2, 2012 at 2:59 AM, M. Huber <dj...@gmx.de> wrote:
> > Hi!
> >
> > I am using MyFaces Tomahawk 1.1.15 on Mojarra JSF 1.2 Impl with Facelets
> 1.1.11. Almost everything seems fine but when I use t:validateRegExpr I
> get:
> >
> > java.lang.NoSuchMethodException:
> org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag.TagConfig)
> >
> > The ValidatorBaseTagHandler contained in the Tomahawk JAR defines
> >
> >
> org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag. jsf. TagConfig)
> >
> > instead. I also had a look at Facelets 1.1.15 JAR (which is the latest
> 1.1.x I could find on the net) and it does not seem to define
> com.sun.facelets.tag.jsf.TagConfig either. Am I using the wrong Facelets version? Which
> version of Facelets goes with Tomahawk 1.1.15 and JSF 1.2?
> >
> > Many thanks
> >
> > Martin
> > --
> > NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> > Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Re: t:validateRegExpr gives NoSuchMethodException with Facelets

Posted by Mike Kienenberger <mk...@gmail.com>.
I use Facelets 1.1.14 with tomahawk 1.19 and Myfaces 1.2.9 right now.

One thing you should make sure is that you are using the JSF 1.2
version of Tomahawk.  Also 1.1.15 is pretty old -- I would upgrade to
the latest tomahawk version.



On Sat, Jun 2, 2012 at 2:59 AM, M. Huber <dj...@gmx.de> wrote:
> Hi!
>
> I am using MyFaces Tomahawk 1.1.15 on Mojarra JSF 1.2 Impl with Facelets 1.1.11. Almost everything seems fine but when I use t:validateRegExpr I get:
>
> java.lang.NoSuchMethodException: org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag.TagConfig)
>
> The ValidatorBaseTagHandler contained in the Tomahawk JAR defines
>
> org.apache.myfaces.validator.ValidatorBaseTagHandler.<init>(com.sun.facelets.tag. jsf. TagConfig)
>
> instead. I also had a look at Facelets 1.1.15 JAR (which is the latest 1.1.x I could find on the net) and it does not seem to define com.sun.facelets.tag.jsf.TagConfig either. Am I using the wrong Facelets version? Which version of Facelets goes with Tomahawk 1.1.15 and JSF 1.2?
>
> Many thanks
>
> Martin
> --
> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a