You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Peter Muir (JIRA)" <de...@myfaces.apache.org> on 2006/05/11 15:55:05 UTC

[jira] Created: (MYFACES-1305) 'is no' hides ClassNotFoundException

'is no' hides ClassNotFoundException
------------------------------------

         Key: MYFACES-1305
         URL: http://issues.apache.org/jira/browse/MYFACES-1305
     Project: MyFaces Core
        Type: Bug

  Components: General  
    Versions: 1.1.3    
    Reporter: Peter Muir


A confusing error message

The exception 

java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamNavigationHandler is no javax.faces.application.NavigationHandler

was thrown because the class loader couldn't find org.jboss.seam.jsf.SeamNavigationHandler not because it doesn't extend/implement. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1305) 'is no' hides ClassNotFoundException

Posted by "Bruno Aranda (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1305?page=comments#action_12415681 ] 

Bruno Aranda commented on MYFACES-1305:
---------------------------------------

The code you are talking about is on org.apache.myfaces.config.FacesConfigurator, 531:

Class implClass = ClassUtils.simpleClassForName(implClassName);

// check, if class is of expected interface type
 if (!interfaceClass.isAssignableFrom(implClass))
{
     throw new IllegalArgumentException("Class " + implClassName + " is no " + interfaceClass.getName());
}

But, ClassUtil.simpleClassForName() checks already if the class exist. If not it would throw a FacesException, caused by the ClassNotFoundException and the IllegalArgumentException would never be reached. Peter, are you sure that a ClassNotFoundException happens?

> 'is no' hides ClassNotFoundException
> ------------------------------------
>
>          Key: MYFACES-1305
>          URL: http://issues.apache.org/jira/browse/MYFACES-1305
>      Project: MyFaces Core
>         Type: Bug

>   Components: General
>     Versions: 1.1.3
>     Reporter: Peter Muir
>     Priority: Minor

>
> A confusing error message
> The exception 
> java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamNavigationHandler is no javax.faces.application.NavigationHandler
> was thrown because the class loader couldn't find org.jboss.seam.jsf.SeamNavigationHandler not because it doesn't extend/implement. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira