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

[jira] Created: (MYFACES-1024) Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss

Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss
-----------------------------------------------------------------------------

         Key: MYFACES-1024
         URL: http://issues.apache.org/jira/browse/MYFACES-1024
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1    
 Environment: JBoss AS 4.0.3SP1
    Reporter: Julien Viet


When using tomahawk lib in a war file there is a class cast exception which occurs because it contains a class in myfaces.
As this class is loaded at the application server level and the war file level a CCE occurs.
The name of the class is : org.apache.myfaces.config.MyFacesConfig
Simply removing this class from tomahawk.jar will solve the issue.

-- 
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-1024) Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1024?page=comments#action_12362683 ] 

sean schofield commented on MYFACES-1024:
-----------------------------------------

Perhaps we should remove the standard jsf component definitions from the tomahawk faces-config.xml?  Those should be defined by your JSF implementation so I can't see why they are in tomahawk.

> Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss
> -----------------------------------------------------------------------------
>
>          Key: MYFACES-1024
>          URL: http://issues.apache.org/jira/browse/MYFACES-1024
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>  Environment: JBoss AS 4.0.3SP1
>     Reporter: Julien Viet
>     Assignee: Stan Silvert

>
> When using tomahawk lib in a war file there is a class cast exception which occurs because it contains a class in myfaces.
> As this class is loaded at the application server level and the war file level a CCE occurs.
> The name of the class is : org.apache.myfaces.config.MyFacesConfig
> Simply removing this class from tomahawk.jar will solve the issue.

-- 
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-1024) Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss

Posted by "Simon Kitching (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1024?page=comments#action_12362714 ] 

Simon Kitching commented on MYFACES-1024:
-----------------------------------------

Hi Julien,

This is caused because there are some classes that are used by both myfaces-impl and tomahawk.
If tomahawk only ran on myfaces-impl, then it would be simple: place the classes in myfaces-impl.
However tomahawk is also intended to run on the Sun RI.

The approach up to and including release 1.1.1 was to have a "share" module, and the classes from "share" get inserted into both myfaces-impl.jar and tomahawk.jar. When used together, the fact that both jars have identical classes causes no problems. When tomahawk is used with Sun's RI, it has the classes it needs.

Unfortunately as you've discovered this doesn't work when myfaces-impl is in a "shared" classpath, while tomahawk.jar is in a webapp classpath.

Moving tomahawk.jar into the same lib dir as myfaces-impl.jar will solve the issue. Removing the class from tomahawk.jar is not an option for the myfaces project, as tomahawk will no longer work on sun's RI if that's done.

However the SVN head (and therefore the next release) splits the shared classes out into their own jar, myfaces-commons.jar. This should also solve your issue; when myfaces-impl is being used then myfaces-commons must be deployed in the same lib dir. When tomahawk is used alone, myfaces-commons should be deployed in the samelib dir as tomahawk.

Sean: oops - you're right. tomahawk's faces-config.xml has all sorts of unwanted entries! Is this related to the original question though? I don't think so...

Regards,

Simon

> Duplicate class in myfaces and tomahawk lead in class cast exception in JBoss
> -----------------------------------------------------------------------------
>
>          Key: MYFACES-1024
>          URL: http://issues.apache.org/jira/browse/MYFACES-1024
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1
>  Environment: JBoss AS 4.0.3SP1
>     Reporter: Julien Viet
>     Assignee: Stan Silvert

>
> When using tomahawk lib in a war file there is a class cast exception which occurs because it contains a class in myfaces.
> As this class is loaded at the application server level and the war file level a CCE occurs.
> The name of the class is : org.apache.myfaces.config.MyFacesConfig
> Simply removing this class from tomahawk.jar will solve the issue.

-- 
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