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

Thomas Andraschko commented on MYFACES-4201:
--------------------------------------------

[~eduardobreijo] Could you please fix that case?
It should be backward compatible.

> InstantiationException for ConfigurableNavigationHandler that does not have a 
> default constructor
> -------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-4201
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4201
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>         Environment: MyFaces-2.3.0-SNAPSHOT
> Revision: 1823978
> Apache Tomcat 9.0.5
> JDK 1.8.0.152
> PrimeFaces 6.1
>            Reporter: Holger Sunke
>            Priority: Major
>             Fix For: 2.3.0
>
>
> Knowing it's bleeding edge work in progress, I wanted to report a regression 
> in MyFaces-2.3.0-SNAPSHOT current Revision 1823978 - likely introduced with 
> this commit:
> Revision: 1823976
> Author: embreijo
> Date: Montag, 12. Februar 2018 15:36:05
> Message:
> MYFACES-4198 Injection on custom navigation handlers does not work
> ----
> Modified : 
> /myfaces/core/branches/2.3.x/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
> Modified : 
> /myfaces/core/branches/2.3.x/shared-public/src/main/java/org/apache/myfaces/shared/util/ClassUtils.java
> When initializing a Primefaces 6.1 application I get an Exception for a 
> NavigationHandler that does not provide a zero argument default constructor:
>  
> An error occured while initializing MyFaces: 
> java.lang.InstantiationException: 
> org.primefaces.application.DialogNavigationHandler
> javax.faces.FacesException: java.lang.InstantiationException: 
> org.primefaces.application.DialogNavigationHandler
>     at 
> org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:436)
>     at 
> org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:629)
>     at 
> org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:534)
>     at 
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:734)
>     at 
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:606)
>     at 
> org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:449)
>     at 
> org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:70)
>     at 
> org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:181)
>     at 
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:103)
>     at 
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4637)
>     at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5099)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>     at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
>     at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at 
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
>     at 
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
>     at 
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
>     at 
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>     at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)
>     at 
> org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     at 
> org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
>     at 
> java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
>     at 
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
>     at 
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>     at 
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>     at 
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
>     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>     at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke(Method.java:498)
>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
> Caused by: java.lang.InstantiationException: 
> org.primefaces.application.DialogNavigationHandler
>     at java.lang.Class.newInstance(Class.java:427)
>     at 
> org.apache.myfaces.shared.util.ClassUtils.newInstance(ClassUtils.java:426)
>     ... 38 more
> Caused by: java.lang.NoSuchMethodException: 
> org.primefaces.application.DialogNavigationHandler.<init>()
>     at java.lang.Class.getConstructor0(Class.java:3082)
>     at java.lang.Class.newInstance(Class.java:412)
>     ... 39 more



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to