Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-Final
    • Fix Version/s: 1.0-Final
    • Component/s: Core
    • Labels:
      None

      Description

      I'm still trying to find out the best way to use the Maven Jetty Plugin, so I might be doing something wrong on this side here.

      Nevertheless, when I run mvn package on my project while the server is running (to update dependent libraries to the server), I get the following error:

      [INFO] Restarting webapp
      18-apr-2010 21:24:02 org.apache.myfaces.webapp.StartupServletContextListener dispatchInitializationEvent
      INFO: Processing plugin:org.apache.myfaces.extensions.scripting.servlet.StartupServletContextPluginChainLoader
      18-apr-2010 21:24:02 org.apache.myfaces.webapp.StartupServletContextListener dispatchInitializationEvent
      INFO: Processing MyFaces plugins done
      18-apr-2010 21:24:02 org.apache.myfaces.extensions.scripting.core.util.WeavingContext getWeaver
      WARNING: [EXT-SCRIPTING] Scripting Weaver is not set. Disabling script reloading subsystem. Make sure you have the scripting servlet filter enabled in your web.xml
      2010-04-18 21:24:02.920::WARN: failed org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@63f5af

      {/html5parleys,D:\dev\work\idea9\parleys\web-html5\target\parleys-frontend-html5-0.1-SNAPSHOT}

      java.lang.NullPointerException
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.weaveDelegate(FacesContextProxy.java:54)
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.<init>(FacesContextProxy.java:140)
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.factories.ScriptingFacesContextFactory.getFacesContext(ScriptingFacesContextFactory.java:52)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:195)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:204)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:215)
      at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:599)
      at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:498)
      at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStop(Jetty6PluginWebAppContext.java:132)
      at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
      at org.mortbay.jetty.plugin.Jetty6RunWarExploded.restartWebApp(Jetty6RunWarExploded.java:118)
      at org.mortbay.jetty.plugin.Jetty6RunWarExploded$1.filesChanged(Jetty6RunWarExploded.java:100)
      at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
      at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
      at org.mortbay.util.Scanner.scan(Scanner.java:280)
      at org.mortbay.util.Scanner$1.run(Scanner.java:232)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)
      [ERROR] Error reconfiguring/restarting webapp after change in watched files
      java.lang.NullPointerException
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.weaveDelegate(FacesContextProxy.java:54)
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.<init>(FacesContextProxy.java:140)
      at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.factories.ScriptingFacesContextFactory.getFacesContext(ScriptingFacesContextFactory.java:52)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:195)
      at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:204)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:215)
      at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:599)
      at org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:498)
      at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStop(Jetty6PluginWebAppContext.java:132)
      at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78)
      at org.mortbay.jetty.plugin.Jetty6RunWarExploded.restartWebApp(Jetty6RunWarExploded.java:118)
      at org.mortbay.jetty.plugin.Jetty6RunWarExploded$1.filesChanged(Jetty6RunWarExploded.java:100)
      at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
      at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
      at org.mortbay.util.Scanner.scan(Scanner.java:280)
      at org.mortbay.util.Scanner$1.run(Scanner.java:232)
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

      Above is all console output from the moment the server sees the new files.

      This exception prevents the webapp from booting.

      PS. Note the typo in the package name: "org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations"...

        Activity

        Hide
        Werner Punz added a comment -

        Afair this is a jetty related issue, I did some testing regarding restarting a while ago and it worked on Tomcat, but I might have broken something again.
        Nevertheless I cannot even restart myfaces in a jetty environment here with my testing examples, I do not even reach the NPE
        But seriously, I will do another round of testing in this area and will post about the results.
        It probably is better to simply restart jetty if you do a dependency update, since you can cover most other changes with ext-scripting I guess this is bearable.

        Show
        Werner Punz added a comment - Afair this is a jetty related issue, I did some testing regarding restarting a while ago and it worked on Tomcat, but I might have broken something again. Nevertheless I cannot even restart myfaces in a jetty environment here with my testing examples, I do not even reach the NPE But seriously, I will do another round of testing in this area and will post about the results. It probably is better to simply restart jetty if you do a dependency update, since you can cover most other changes with ext-scripting I guess this is bearable.
        Hide
        Werner Punz added a comment -

        Ok seems like I introducerd another bug there, on tomcat the reloading works fine
        but the NPE is reproducable (See below)
        I will work that out, but as I said context reloading works fine it is just a cosmetic NPE I run into here.
        Either way NPEs should not occur I will fix that.

        SCHWERWIEGEND: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
        java.lang.NullPointerException
        at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.weaveDelegate(FacesContextProxy.java:54)
        at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.<init>(FacesContextProxy.java:140)
        at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.factories.ScriptingFacesContextFactory.getFacesContext(ScriptingFacesContextFactory.java:52)
        at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:195)
        at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:204)
        at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:211)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882)
        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4516)
        at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1004)
        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1212)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
        at java.lang.Thread.run(Thread.java:637)

        Show
        Werner Punz added a comment - Ok seems like I introducerd another bug there, on tomcat the reloading works fine but the NPE is reproducable (See below) I will work that out, but as I said context reloading works fine it is just a cosmetic NPE I run into here. Either way NPEs should not occur I will fix that. SCHWERWIEGEND: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener java.lang.NullPointerException at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.weaveDelegate(FacesContextProxy.java:54) at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.implemetations.FacesContextProxy.<init>(FacesContextProxy.java:140) at org.apache.myfaces.extensions.scripting.jsf.dynamicdecorators.factories.ScriptingFacesContextFactory.getFacesContext(ScriptingFacesContextFactory.java:52) at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:195) at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:204) at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:211) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882) at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4516) at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1004) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1212) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) at java.lang.Thread.run(Thread.java:637)
        Hide
        Werner Punz added a comment -

        Ok on tomcat reloading now works as expected, I am not sure why jetty fails, but it fails on a different part for me, if tomcat reloads without any error than I see the problem as solved, I might add a tomcat run option as well in the long run.
        (or you can do it yourself, Jan)

        Show
        Werner Punz added a comment - Ok on tomcat reloading now works as expected, I am not sure why jetty fails, but it fails on a different part for me, if tomcat reloads without any error than I see the problem as solved, I might add a tomcat run option as well in the long run. (or you can do it yourself, Jan)
        Hide
        Jan-Kees van Andel added a comment -

        I might do that. Also a good way to start learning the internals of ExtScript. But, for now, I'm very happy.

        Good enough for an 1.0 release IMHO.

        Show
        Jan-Kees van Andel added a comment - I might do that. Also a good way to start learning the internals of ExtScript. But, for now, I'm very happy. Good enough for an 1.0 release IMHO.
        Hide
        Werner Punz added a comment -

        Actually tomcat:run is not an ext-scripting internal it is just an issue of providing a maven option via the tomcat plugin.

        Show
        Werner Punz added a comment - Actually tomcat:run is not an ext-scripting internal it is just an issue of providing a maven option via the tomcat plugin.

          People

          • Assignee:
            Werner Punz
            Reporter:
            Jan-Kees van Andel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development