ICEfaces
  1. ICEfaces
  2. ICE-5702

More graceful degradation in applications when icepush.jar is not present

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Bridge, Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 ICEpush JSF 2

      Description

      Using the auction sample application, which uses push, if you do not include the icepush.jar, the application fails rather drastically. Running it in Glassfish v3 and then trying to load the initial page results in:

      [#|2010-05-11T10:44:14.599-0700|SEVERE|glassfishv3.0|javax.enterprise.resource.webcontainer.jsf.application|_ThreadID=27;_ThreadName=Thread-1;|Error Rendering View[/auction.xhtml]
      com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: org.icefaces.demo.auction.beans.UserBean.
      at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:193)
      at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
      at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:405)
      at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:267)
      at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:99)
      at com.sun.el.parser.AstValue.getValue(AstValue.java:158)
      at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
      at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
      at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
      at javax.faces.component.UIOutput.getValue(UIOutput.java:168)
      at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:338)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
      at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
      at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.NullPointerException
      at org.icefaces.application.PushRenderer.addCurrentSession(PushRenderer.java:78)
      at org.icefaces.demo.auction.beans.UserBean.<init>(UserBean.java:101)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
      ... 53 more
      |#]

        Activity

        Hide
        Mircea Toma added a comment -

        Each public method in PushRenderer is now detecting when ICEpush is missing and logs a warning.

        Show
        Mircea Toma added a comment - Each public method in PushRenderer is now detecting when ICEpush is missing and logs a warning.
        Hide
        Ken Fyten added a comment -

        Need to revise the log statement to mention icepush.jar and the statement that is failing.

        Show
        Ken Fyten added a comment - Need to revise the log statement to mention icepush.jar and the statement that is failing.
        Hide
        Mircea Toma added a comment -

        Revised log statement to mention the missing of ICEpush library and also display the used method in PushRenderer.

        Show
        Mircea Toma added a comment - Revised log statement to mention the missing of ICEpush library and also display the used method in PushRenderer.
        Hide
        Ted Goddard added a comment -

        java.lang.NoClassDefFoundError: org/icepush/PushContext
        at org.icefaces.application.WindowScopeManager$ScopeMap.activate(WindowScopeManager.java:264)
        at org.icefaces.application.WindowScopeManager$ScopeMap.access$300(WindowScopeManager.java:222)
        at org.icefaces.application.WindowScopeManager.determineWindowID(WindowScopeManager.java:171)
        at org.icefaces.application.WindowScopeManager.beforePhase(WindowScopeManager.java:134)
        at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224)

        Show
        Ted Goddard added a comment - java.lang.NoClassDefFoundError: org/icepush/PushContext at org.icefaces.application.WindowScopeManager$ScopeMap.activate(WindowScopeManager.java:264) at org.icefaces.application.WindowScopeManager$ScopeMap.access$300(WindowScopeManager.java:222) at org.icefaces.application.WindowScopeManager.determineWindowID(WindowScopeManager.java:171) at org.icefaces.application.WindowScopeManager.beforePhase(WindowScopeManager.java:134) at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224)
        Hide
        Mircea Toma added a comment -

        Enclosed with try/catch the code that uses PushContext class to detect when NoClassDefFound occurs. Log INFO level message.

        Show
        Mircea Toma added a comment - Enclosed with try/catch the code that uses PushContext class to detect when NoClassDefFound occurs. Log INFO level message.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: