[ 
https://issues.apache.org/jira/browse/MYFACES-1829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12607102#action_12607102
 ] 

K. Ghadami commented on MYFACES-1829:
-------------------------------------

That sounds strange, maybe there is a problem with the class path, duplicated 
jar files or somthing else. If your class implements 
javax.faces.validator.Validator java would be able to cast. I belive the bug is 
not up to myfaces.

> JSF Validator cannot be cast to javax.faces.validator.Validator
> ---------------------------------------------------------------
>
>                 Key: MYFACES-1829
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1829
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.5
>         Environment: JBoss Portal - Identity portlet
>            Reporter: Alex Kachanov
>
> JBoss portal is using idenityt portlet to regster new users and edit  
> profiles for existing users
> I added new my own JSF validator to the identty portlet which when opened 
> throws the following exception:
> java.lang.ClassCastException: com.kachanov.test004.validators.MyValidator 
> cannot be cast to javax.faces.validator.Validator
>       at 
> org.apache.myfaces.application.ApplicationImpl.createValidator(ApplicationImpl.java:613)
> The code of my validator is:
> ==========================================================
> package com.kachanov.test004.validators;
> import javax.faces.application.FacesMessage;
> import javax.faces.component.UIComponent;
> import javax.faces.context.FacesContext;
> import javax.faces.validator.Validator;
> import javax.faces.validator.ValidatorException;
> public class MyValidator implements Validator {
>       public void validate(FacesContext arg0, UIComponent arg1, Object arg2) 
> throws ValidatorException {
>               
>               System.out.println("testing this validator");
>       }
> }
> ==========================================================
> So please thell me how can it bee that a class that implements Validator 
> cannot be cast to javax.faces.validator.Validator??????
> Is in't it against basic design of Java languages?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to