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

Thomas Andraschko commented on MYFACES-4469:
--------------------------------------------

[~volosied] i will close it for now
Feel free to reopen with a reproducer

> "java.lang.IllegalArgumentException: object is not an instance of declaring 
> class" occurs in FacesConfigurator.purgeConfiguration 
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-4469
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4469
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 4.0.0-RC1, 2.3.10, 2.3-next-M7, 3.0.2
>            Reporter: Volodymyr Siedlecki
>            Assignee: Volodymyr Siedlecki
>            Priority: Minor
>
> If an application uses a custom factory via META-INF/services (such as 
> javax.faces.application.ApplicationFactory), then a purge failure can occur 
> when in *development mode* when an *update occurs to the faces-config.xml.* 
> Additionally, the server must not restart the application (which can occur).
> {code:java}
> java.lang.IllegalArgumentException: object is not an instance of declaring 
> class
> …
> at java.lang.reflect.Method.invoke(Method.java:508)
> org.apache.myfaces.config.FacesConfigurator.purgeConfiguration(FacesConfigurator.java:555)
> at 
> org.apache.myfaces.config.FacesConfigurator.update(FacesConfigurator.java:485)
> at 
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:136){code}
> Code where the exception can occur: 
> [https://github.com/apache/myfaces/blob/e9fe59f96410f31a7f5c0fbd6838c1a22683a691/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java#L452-L456]
> getPurgeMethod unwraps the factory to get the method, but it then calls the 
> private method on the wrong class ( which doesn't have that purge method)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to