Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • DataSourceLoader fails to load DataSources-SEC7112: blocked due to mime type mismatch

    SmartClient Version: v9.1p_2014-10-15/PowerEdition Deployment (built 2014-10-15)

    We have an application that we have been developing for over 2 years. The application works fine will all versions of Firefox from version 24 to present. The application also works with IE 8. We now have a requirement to support IE 10. The application will not completely load in IE 10. Our initial Loading message is displayed, but the application never finishes loaded. Using IE 10 Developers tools, I can see the following message in the Console:

    SEC7112: Script from https://localhost:8443/App/app/sc/Da...t,UserAccounts was blocked due to mime type mismatch

    Below is our bootstrap file (a .jsp file). The line "<script src="<%= contextPath %>/app/sc/DataSourceLoader?dataSource=IdleSession,ForceLogout,UserAccounts"></script>" results in the above message on mime type mismatch. At the bottom of this message is the SmartClient Developers Console Log Messages.

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ page import="java.util.Map" %>
    <%@ page import="java.util.UUID" %>
    <%@ page import="org.springframework.security.core.context.SecurityContextHolder" %>
    <%@ page import="mil.iapp.server.common.ConfigurationData" %>
    <%
    String token = (String) session.getAttribute("CSRF_TOKEN");
    if (token == null) {
    token = UUID.randomUUID().toString();
    session.setAttribute("CSRF_TOKEN", token);
    } else {
    session.removeAttribute("Account");
    }

    String contextPath = request.getContextPath();

    String userName = SecurityContextHolder.getContext().getAuthentication().getName();

    Map configurationData = ConfigurationData.get();

    String classColor = (String) configurationData.get("banner_color");
    String classText = (String) configurationData.get("banner_text");

    %>
    <!DOCTYPE HTML">
    <%-- The HTML 4.01 Transitional DOCTYPE declaration --%>
    <%-- above set at the top of the file will set --%>
    <%-- the browser's rendering engine into --%>
    <%-- "Quirks Mode". Replacing this declaration --%>
    <%-- with a "Standards Mode" doctype is supported, --%>
    <%-- but may lead to some differences in layout. --%>

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <%-- --%>
    <%-- Any title is fine --%>
    <%-- --%>
    <title>Application</title>

    <%-- IMPORTANT : You must set the variable isomorphicDir --%>
    <%-- to [MODULE_NAME]/sc/ so that the SmartGWT resource --%>
    <%-- are correctly resolved --%>
    <script> var isomorphicDir = "<%= contextPath %>/app/sc/"; </script>

    <script>
    window.CSRF_TOKEN = "<%= token %>";
    window.ContextPath = "<%= contextPath %>";
    window.UserName = "<%= userName %>";
    window.bannerColor = "<%= bannerColor %>";
    window.bannerText = "<%= bannerText %>";
    </script>

    <%-- --%>
    <%-- Consider inlining CSS to reduce the number of requested files --%>
    <%-- --%>
    <link type="text/css" rel="stylesheet" href="<%= contextPath %>/app.css">

    <%-- --%>
    <%-- This script loads your compiled module. --%>
    <%-- If you add any GWT meta tags, they must --%>
    <%-- be added before this line. --%>
    <%-- --%>
    </head>

    <%-- --%>
    <%-- The body can have arbitrary html, or --%>
    <%-- you can leave the body empty if you want --%>
    <%-- to create a completely dynamic UI. --%>
    <%-- --%>
    <body>
    <script type="text/javascript" language="javascript" src="<%= contextPath %>/app/app.nocache.js"></script>
    <h2>Loading App</h2>
    Please contact your system administrator if App does not load.

    <%--load the datasources--%>
    <script src="<%= contextPath %>/app/sc/DataSourceLoader?dataSource=IdleSession,ForceLogout,UserAccounts"></script>
    <%--
    <script src="<%= contextPath %>/app/sc/DataSourceLoader?CSRF_TOKEN=<%= token %>"></script>
    --%>
    <%-- OPTIONAL: include this if you want history support --%>
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
    style="position:absolute;width:0;height:0;border:0"></iframe>

    </body>
    </html>


    The following is the log messages from the SmartClient Developers console.

    13:27:49.703:INFO:Log:initialized
    13:27:49.761:WARN:Log:New Class ID: 'Window' collides with ID of existing object with value '[object Window]'. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    13:27:49.809:WARN:Log:New Class ID: 'Selection' collides with ID of existing object with value '[object Selection]'. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    13:27:49.937:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value '
    function DataView() {
    [native code]
    }
    '. Existing object will be replaced.
    This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
    13:27:49.996:WARN:Log:New Class ID: 'IAutoFitButton' collides with ID of existing Class object '[Class IAutoFitButton]'. Existing object will be replaced.
    13:27:49.996:WARN:Log:New Class ID: 'HeaderMenuButton' collides with ID of existing Class object '[Class HeaderMenuButton]'. Existing object will be replaced.
    13:27:51.897:WARN:Log:Uncaught JavaScript exception: Unable to get property 'getOrCreateJsObj' of undefined or null reference in https://localhost:8443/iApp/iapp/F33...5F4.cache.html, line 223, column 7
    13:27:51.905:INFO:Log:isc.Page is loaded


  • #2
    This was corrected way back in April - you just need a new patch build from smartclient.com/builds.

    Comment


    • #3
      I downloaded the latest SmartGWT, PowerEditon (2015-09-09) from smartclient.com/builds and rebuilt the application. I still get the same behavior about mime type mismatch. Did I download the correct version? The full path to the patch build downloaded is: http://www.smartclient.com/builds/Sm...p/PowerEdition.

      The SmartClient Developer console now reports: SmartClient Version: v9.1p_2015-09-09/PowerEdition Deployment (built 2015-09-09)

      The Log messages from Smartclient Developers console are:

      15:45:50.100:INFO:Log:initialized
      15:45:50.102:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined. Returning 500
      15:45:50.103:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined. Returning 500
      15:45:50.188:WARN:Log:New Class ID: 'Window' collides with ID of existing object with value '[object Window]'. Existing object will be replaced.
      This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
      15:45:50.239:WARN:Log:New Class ID: 'Selection' collides with ID of existing object with value '[object Selection]'. Existing object will be replaced.
      This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
      15:45:50.385:WARN:Log:New Class ID: 'DataView' collides with ID of existing object with value '
      function DataView() {
      [native code]
      }
      '. Existing object will be replaced.
      This conflict would be avoided by disabling ISC Simple Names mode. See documentation for further information.
      15:45:50.442:WARN:Log:New Class ID: 'IAutoFitButton' collides with ID of existing Class object '[Class IAutoFitButton]'. Existing object will be replaced.
      15:45:50.442:WARN:Log:New Class ID: 'HeaderMenuButton' collides with ID of existing Class object '[Class HeaderMenuButton]'. Existing object will be replaced.
      15:45:52.615:WARN:Log:Uncaught JavaScript exception: Unable to get property 'getOrCreateJsObj' of undefined or null reference in https://localhost:8443/App/app/BD140...6C7.cache.html, line 223, column 7
      15:45:52.623:INFO:Log:isc.Page is loaded
      15:46:06.649:WARN:Log:Uncaught JavaScript exception: 'resultsForm' is undefined in https://localhost:8443/App/app/sc/modules/ISC_Core.js, line 920, column 83
      15:46:06.649:WARN:Log:Uncaught JavaScript exception: 'resultsForm' is undefined in https://localhost:8443/App/app/sc/modules/ISC_Core.js, line 920, column 83


      Thanks.

      Comment


      • #4
        I still cannot load dataources from my application bootstap file under IE 10. I' upgraded to the latest 4.1 Power Edition patch release. I continue to get mime type mismatch errors. The application works fine with all version of Firefox 24 up and IE 8. I would certainly appreciate any other suggestions on where to look or a configuration change that might help resolve this problem.

        Comment


        • #5
          The fix is ported to 4.1 now, you should wait for the next (2015-09-11) nightly build to download it.

          Comment


          • #6
            I've downloaded the 4.1 2015-09-11 build and it has resolved our problem with using IE 10 with our application. Thanks for the patch.

            Comment

            Working...
            X