ICEfaces
  1. ICEfaces
  2. ICE-6213

JS error when icefaces-ace-2.0-Beta2.jar is present

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.0
    • Component/s: ACE-Components, Framework
    • Labels:
      None
    • Environment:
      client

      Description

      JS error occurs when loading a page that references JS resources defined by icefaces-ace-2.0-Beta2.jar:

      "Error in extras bootstrap [TypeError: window.logger.child is not a function] "

        Activity

        Mircea Toma created issue -
        Mircea Toma made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Assignee Mircea Toma [ mircea.toma ]
        Mircea Toma made changes -
        ICEsoft Forum Reference http://www.icefaces.org/JForum/posts/list/17905.page
        Salesforce Case []
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23065 Tue Nov 09 13:52:52 MST 2010 mircea.toma ICE-6213 Attach the 'logger' variable to ice.yui3 namespace to avoid the naming conflict.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.util/component.js
        Hide
        Mircea Toma added a comment - - edited

        This issue is caused by the component.js resource included by icefaces-ace-*.jar library. The file declares a global 'logger' variable which depending on the order the JS resources are loaded would overwrite the global 'logger' variable declared in icefaces-compat.jar. The 'logger' variable declared doesn't match the API and functionality of the other 'logger' variable in icefaces-compat.jar, hence the JS error.
        The solution was to attach the 'logger' variable in component.js to the ice.yui3 namespace to avoid the naming conflict.

        Show
        Mircea Toma added a comment - - edited This issue is caused by the component.js resource included by icefaces-ace-*.jar library. The file declares a global 'logger' variable which depending on the order the JS resources are loaded would overwrite the global 'logger' variable declared in icefaces-compat.jar. The 'logger' variable declared doesn't match the API and functionality of the other 'logger' variable in icefaces-compat.jar, hence the JS error. The solution was to attach the 'logger' variable in component.js to the ice.yui3 namespace to avoid the naming conflict.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2
        Priority Major [ 3 ] Critical [ 2 ]
        Ken Fyten made changes -
        Comment [ C'mon! Have you asked the comp guys about this error? How can a Javascript fix to cause a Java exception on application startup? ]
        Ken Fyten made changes -
        Comment [ After this change I'm seeing the following error when trying to start ace-showcase, but with just the icefaces-compat.jar added to the lib folder:


        Nov 10, 2010 1:48:08 PM com.sun.faces.config.ConfigManager initialize
        INFO: Unsanitized stacktrace from failed start...
        com.sun.faces.config.ConfigurationException:
          Source Document: jar:file:/Users/Ken/Code/apache-tomcat-6.0.18/webapps/ace-showcase/WEB-INF/lib/icefaces-compat.jar!/META-INF/faces-config.xml
          Cause: Class 'com.icesoft.faces.component.effect.ApplyEffectRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
        at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:275)
        at com.sun.faces.config.processor.RenderKitConfigProcessor.addRenderers(RenderKitConfigProcessor.java:309)
        at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:175)

        The app. fails to start up. No issue with starting compat samples such as auctionMonitor on their own though.
        ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Assignee Priority P2
        Resolution Fixed [ 1 ]
        Hide
        Ken Fyten added a comment -

        Mircea, we believe this extraneous logger reference that you moved into YUI3 namespace was intended to enable the regular icefaces bridge console to work. If this is not the case, then please remove this code altogether.

        Comps team will use either the normal IF bridge console/debugger or the YUI debugger component in the future.

        Show
        Ken Fyten added a comment - Mircea, we believe this extraneous logger reference that you moved into YUI3 namespace was intended to enable the regular icefaces bridge console to work. If this is not the case, then please remove this code altogether. Comps team will use either the normal IF bridge console/debugger or the YUI debugger component in the future.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2
        Priority Critical [ 2 ] Minor [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23201 Wed Nov 24 16:55:14 MST 2010 mircea.toma ICE-6213 Removed temporary logger.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.util/component.js
        Hide
        Mircea Toma added a comment -

        Removed temporary logger.

        Show
        Mircea Toma added a comment - Removed temporary logger.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Mircea Toma
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: