ICEmobile
  1. ICEmobile
  2. MOBI-110

ICEmobile variant without script execution

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 Final
    • Fix Version/s: 1.0 Final
    • Component/s: None
    • Labels:
      None
    • Environment:
      ICEmobile, app store

      Description

      ICEmobile currently makes use of an embedded UIWebView that contains a script engine. A variant that did not require an internal script engine would be useful for app store distribution.

        Activity

        Hide
        Ken Fyten added a comment -

        Recent commit for this (rvn# 26566) is causing component-showcase and other application to fail to deploy (using Mojarra JSF 2.1.4). Error in tomcat log is:

        Nov 25, 2011 10:09:17 AM com.sun.faces.config.ConfigureListener contextInitialized
        SEVERE: Critical error during deployment:
        com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: org.icefaces.impl.application.AuxUploadSetup.
        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:409)
        at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269)
        at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:256)
        at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:255)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
        at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
        at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        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:680)
        Caused by: java.lang.NullPointerException
        at com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188)
        at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:467)
        at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162)
        at com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:143)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at org.icefaces.impl.push.servlet.ICEpushResourceHandler.createResource(ICEpushResourceHandler.java:119)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110)
        at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:187)
        at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:171)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:84)
        at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:84)
        at org.icefaces.impl.application.AuxUploadResourceHandler.<init>(AuxUploadResourceHandler.java:54)
        at org.icefaces.impl.application.AuxUploadSetup.<init>(AuxUploadSetup.java:46)
        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)
        ... 13 more

        Show
        Ken Fyten added a comment - Recent commit for this (rvn# 26566) is causing component-showcase and other application to fail to deploy (using Mojarra JSF 2.1.4). Error in tomcat log is: Nov 25, 2011 10:09:17 AM com.sun.faces.config.ConfigureListener contextInitialized SEVERE: Critical error during deployment: com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: org.icefaces.impl.application.AuxUploadSetup. 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:409) at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:269) at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:256) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:255) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) 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:680) Caused by: java.lang.NullPointerException at com.sun.faces.application.view.MultiViewHandler.calculateLocale(MultiViewHandler.java:188) at com.sun.faces.application.resource.ResourceManager.getLocalePrefix(ResourceManager.java:467) at com.sun.faces.application.resource.ResourceManager.findResource(ResourceManager.java:162) at com.sun.faces.application.resource.ResourceHandlerImpl.createResource(ResourceHandlerImpl.java:143) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at org.icefaces.impl.push.servlet.ICEpushResourceHandler.createResource(ICEpushResourceHandler.java:119) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:110) at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:187) at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:171) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:84) at javax.faces.application.ResourceHandlerWrapper.createResource(ResourceHandlerWrapper.java:84) at org.icefaces.impl.application.AuxUploadResourceHandler.<init>(AuxUploadResourceHandler.java:54) at org.icefaces.impl.application.AuxUploadSetup.<init>(AuxUploadSetup.java:46) 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) ... 13 more
        Hide
        Ted Goddard added a comment -

        This appears to be an interaction with ResourceHandler.createResource() being called during startup (from an eager ApplicationScoped bean) and the presence of a message-bundle. It is possible that the message-bundle does not support all of the application-declared locales, or this may just be a mojarra bug. In any case, invoking createResource lazily (only when the resource is requested, which will now be during an HTTP request) resolves the issue during startup.

        Show
        Ted Goddard added a comment - This appears to be an interaction with ResourceHandler.createResource() being called during startup (from an eager ApplicationScoped bean) and the presence of a message-bundle. It is possible that the message-bundle does not support all of the application-declared locales, or this may just be a mojarra bug. In any case, invoking createResource lazily (only when the resource is requested, which will now be during an HTTP request) resolves the issue during startup.
        Hide
        Ted Goddard added a comment -

        Detection script:

        <script>
        var iceCloudPushId = "#

        {auxUpload.cloudPushId}

        ";
        if ("" != iceCloudPushId) {
        window.addEventListener("load", function()

        { ice.push.parkInactivePushIds(iceCloudPushId); }

        , false);
        window.addEventListener("pagehide", function()

        { ice.push.connection.pauseConnection(); }

        , false);
        window.addEventListener("pageshow", function()

        { ice.push.connection.resumeConnection(); }

        , false);
        }
        if (!#

        {auxUpload.enabled}

        ) {
        var auxiframe = document.getElementById('auxiframe');
        var ampstr = unescape("%26");
        if (null == auxiframe) {
        auxiframe = document.createElement('iframe');
        auxiframe.setAttribute("id", "auxiframe");
        auxiframe.setAttribute("style", "width:0px; height:0px; border: 0px");
        auxiframe.setAttribute("src",
        "icemobile://c=register" + ampstr + "r=" +
        escape(window.location) + ampstr + "JSESSIONID=#

        {session.id}

        " +
        ampstr + "u=" + escape('#

        {auxUpload.uploadURL}

        ')
        );
        document.body.appendChild(auxiframe);
        }
        }
        </script>

        Show
        Ted Goddard added a comment - Detection script: <script> var iceCloudPushId = "# {auxUpload.cloudPushId} "; if ("" != iceCloudPushId) { window.addEventListener("load", function() { ice.push.parkInactivePushIds(iceCloudPushId); } , false); window.addEventListener("pagehide", function() { ice.push.connection.pauseConnection(); } , false); window.addEventListener("pageshow", function() { ice.push.connection.resumeConnection(); } , false); } if (!# {auxUpload.enabled} ) { var auxiframe = document.getElementById('auxiframe'); var ampstr = unescape("%26"); if (null == auxiframe) { auxiframe = document.createElement('iframe'); auxiframe.setAttribute("id", "auxiframe"); auxiframe.setAttribute("style", "width:0px; height:0px; border: 0px"); auxiframe.setAttribute("src", "icemobile://c=register" + ampstr + "r=" + escape(window.location) + ampstr + "JSESSIONID=# {session.id} " + ampstr + "u=" + escape('# {auxUpload.uploadURL} ') ); document.body.appendChild(auxiframe); } } </script>
        Hide
        Ted Goddard added a comment -

        var iceCloudPushId = "#

        {auxUpload.cloudPushId}

        ";
        if ("" != iceCloudPushId) {
        window.addEventListener("load", function()

        { ice.push.parkInactivePushIds(iceCloudPushId); }

        , false);

        should be integrated with ice.setupPush in BridgeSetup.java: if available, iceCloudPushId can be passed in to the function.

        Show
        Ted Goddard added a comment - var iceCloudPushId = "# {auxUpload.cloudPushId} "; if ("" != iceCloudPushId) { window.addEventListener("load", function() { ice.push.parkInactivePushIds(iceCloudPushId); } , false); should be integrated with ice.setupPush in BridgeSetup.java: if available, iceCloudPushId can be passed in to the function.
        Hide
        Ted Goddard added a comment -

        This is resolved via ICEmobile-SX available on the app store: MOBI-131.

        Show
        Ted Goddard added a comment - This is resolved via ICEmobile-SX available on the app store: MOBI-131 .

          People

          • Assignee:
            Ted Goddard
            Reporter:
            Ted Goddard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: