MyFaces Core
  1. MyFaces Core
  2. MYFACES-2573

NavigationHandler decoration/delegation not supported in 2.0.0-beta2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta-2
    • Fix Version/s: 2.0.0-beta-3
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      PrettyFaces 2.0.4, Jetty

      Description

      http://code.google.com/p/prettyfaces/issues/detail?id=28

      Section 11.4.6 of the JSF spec states that when delegating NavigationHandler, it should accept (as a constructor parameter) the parent NavigationHandler to be decorated. This is no longer working in MyFaces 2.0.0-x.

      SEVERE: com.ocpsoft.pretty.faces.application.PrettyNavigationHandler
      java.lang.InstantiationException: com.ocpsoft.pretty.faces.application.PrettyNavigationHandler
      at java.lang.Class.newInstance0(Class.java:340)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:343)
      at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:2094)
      at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:1871)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:515)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:203)
      at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:99)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:155)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:645)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:189)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:978)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349)
      at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:102)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
      at org.eclipse.jetty.server.Server.doStart(Server.java:228)
      at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:69)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:433)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:377)
      at org.mortbay.jetty.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:68)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Feb 22, 2010 11:15:56 PM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
      SEVERE: An error occured while initializing MyFaces: java.lang.InstantiationException: com.ocpsoft.pretty.faces.application.PrettyNavigationHandler
      javax.faces.FacesException: java.lang.InstantiationException: com.ocpsoft.pretty.faces.application.PrettyNavigationHandler
      at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:353)
      at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:2094)
      at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:1871)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:515)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:203)
      at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:99)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:155)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:645)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:189)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:978)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349)
      at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:102)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:162)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:165)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
      at org.eclipse.jetty.server.Server.doStart(Server.java:228)
      at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:69)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:433)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:377)
      at org.mortbay.jetty.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:68)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.lang.InstantiationException: com.ocpsoft.pretty.faces.application.PrettyNavigationHandler
      at java.lang.Class.newInstance0(Class.java:340)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.myfaces.shared_impl.util.ClassUtils.newInstance(ClassUtils.java:343)
      ... 45 more

        Activity

        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jakob Korherr made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0-beta-3 [ 12314776 ]
        Resolution Fixed [ 1 ]
        Jakob Korherr made changes -
        Comment [ Oh, actually it does. So the problem is on the instantiation code. Anyhow, I'll fix it! ]
        Jakob Korherr made changes -
        Comment [ Right, so know I see what the real problem is: MyFaces' NavigationHandlerImpl does not implement javax.faces.application.ConfigurableNavigationHandler at the moment.

        Thanks for pointing out this bug! ]
        Jakob Korherr made changes -
        Assignee Jakob Korherr [ jakobkorherr ]
        Lincoln Baxter III made changes -
        Field Original Value New Value
        Component/s JSR-314 [ 12312453 ]
        Component/s General [ 12310160 ]
        Lincoln Baxter III created issue -

          People

          • Assignee:
            Jakob Korherr
            Reporter:
            Lincoln Baxter III
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development