ICEfaces
  1. ICEfaces
  2. ICE-11172

Emporium demo clocks stop ticking after several hours

    Details

    • Assignee Priority:
      P2
    • Affects:
      Sample App./Tutorial

      Description

      The clocks in the emporium app stop ticking after several hours. Looking through the server logs the only thing of interest was the following:
      SEVERE: Error Rendering View[/auction.xhtml]
      java.lang.StringIndexOutOfBoundsException: String index out of range: 4
              at java.lang.String.substring(String.java:1934)
              at org.icefaces.util.UserAgentInfo.isMobileBrowser(UserAgentInfo.java:191)
              at org.icefaces.util.UserAgentContext.detectFormFactor(UserAgentContext.java:83)
              at org.icefaces.util.UserAgentContext.<init>(UserAgentContext.java:59)
              at org.icefaces.util.UserAgentContext.getInstance(UserAgentContext.java:219)
              at org.icefaces.impl.event.RestoreResourceDependencies.processEvent(RestoreResourceDependencies.java:43)
              at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
              at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)
              at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2169)
              at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2142)
              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:301)
              at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:245)
              at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:857)
              at javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:985)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1854)
              at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
              at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
              at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.icesoft.util.servlet.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:74)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.icesoft.util.servlet.CustomHeaderFilter.doFilter(CustomHeaderFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Nov 2, 2016 4:29:05 AM org.icefaces.demo.emporium.settings.SettingsBean initSettingsBean
      INFO: User initialized with SettingsBean: User #45706 from North America using theme cupertino with fg/bg colors rgba(0, 0, 0, 0.9)/rgba(176, 196, 222, 0.9)

      1. log1.txt
        47 kB
        Liana Munroe

        Activity

        Liana Munroe created issue -
        Hide
        Ken Fyten added a comment -

        We've been running the 4.2 preview from 4.x trunk on the public Emporium demo. The clocks seem to stop ticking within 24 hours each day.

        Show
        Ken Fyten added a comment - We've been running the 4.2 preview from 4.x trunk on the public Emporium demo. The clocks seem to stop ticking within 24 hours each day.
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Jack Van Ooststroom [ jack.van.ooststroom ]
        Fix Version/s 4.2 [ 12870 ]
        Assignee Priority P2 [ 10011 ]
        Liana Munroe made changes -
        Environment Emporium public demo at http://emporium.icesoft.org/emporium/auction.jsf Emporium public demo at http://emporium.icesoft.org/emporium/auction.jsf
        The demo is from ICEfaces 4 trunk r49384
        Hide
        Liana Munroe added a comment - - edited

        I deployed the app locally and modified the TestFlags.java file by setting TEST_EXPIRY=true so that the auctions would expire in a short time. As soon as the shortest time left was about to expire (2 seconds remaining) all the clocks stopped. See attached server log file log1.txt . The log covers the deployment of the application and up until ~ 5 seconds after the clocks stopped.
        This may be an issue with the item being removed while a push is happening.
        I commented out this line in the AuctionWatcher class : toWatch.checkAuctionExpiry();
        It checks items for expiry and adds more as needed
        When it is commented out the clocks do not stop but go into a negative time mode when the item expires (expected behaviour)

        Show
        Liana Munroe added a comment - - edited I deployed the app locally and modified the TestFlags.java file by setting TEST_EXPIRY=true so that the auctions would expire in a short time. As soon as the shortest time left was about to expire (2 seconds remaining) all the clocks stopped. See attached server log file log1.txt . The log covers the deployment of the application and up until ~ 5 seconds after the clocks stopped. This may be an issue with the item being removed while a push is happening. I commented out this line in the AuctionWatcher class : toWatch.checkAuctionExpiry(); It checks items for expiry and adds more as needed When it is commented out the clocks do not stop but go into a negative time mode when the item expires (expected behaviour)
        Liana Munroe made changes -
        Attachment log1.txt [ 22366 ]
        Ken Fyten made changes -
        Affects Version/s EE-4.1.0.GA [ 12171 ]
        Hide
        Liana Munroe added a comment -

        I updated http://dev.icesoft.com/svn/repo/icefaces-ee4/trunk and placed the icefaces-ee jars found there in the emporium .war file. This version is now in use for the current live demo. The clocks are still failing around the time that the first auction item expires.

        Show
        Liana Munroe added a comment - I updated http://dev.icesoft.com/svn/repo/icefaces-ee4/trunk and placed the icefaces-ee jars found there in the emporium .war file. This version is now in use for the current live demo. The clocks are still failing around the time that the first auction item expires.
        Ken Fyten made changes -
        Assignee Jack Van Ooststroom [ jack.van.ooststroom ] Mircea Toma [ mircea.toma ]
        Hide
        Mircea Toma added a comment -

        Modified AuctionImage.staticConvertNameToImageName method to use Class.getResource API to determine the URL of image resources since the FacesContext instance is not available on the clock thread.

        Show
        Mircea Toma added a comment - Modified AuctionImage.staticConvertNameToImageName method to use Class.getResource API to determine the URL of image resources since the FacesContext instance is not available on the clock thread.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #49545 Fri Nov 11 07:19:12 MST 2016 mircea.toma ICE-11172 Modified staticConvertNameToImageName method to use Class.getResource API to determine the URL of image resources.
        Files Changed
        Commit graph MODIFY /icefaces4/trunk/icefaces/samples/ace/emporium/src/main/java/org/icefaces/demo/emporium/bid/model/AuctionImage.java
        Hide
        Liana Munroe added a comment - - edited

        Verified ICEfaces 4 trunk r49545 FF 47, Chrome 53, IE 11. Modified TestFlags.java to use a shorter expiry while testing. No issues were found when an auction item expires.

        Show
        Liana Munroe added a comment - - edited Verified ICEfaces 4 trunk r49545 FF 47, Chrome 53, IE 11. Modified TestFlags.java to use a shorter expiry while testing. No issues were found when an auction item expires.
        Ken Fyten made changes -
        Fix Version/s 4.2.BETA [ 13091 ]
        Ken Fyten made changes -
        Security Private [ 10001 ]
        Affects Version/s 4.1 [ 11375 ]
        Affects Version/s 4.2 [ 12870 ]
        Affects Sample App./Tutorial [ 10001 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: