Announcement

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

    Errors in log after changing image in skin

    Hi, we recently made some changes in our skin - more specifically customised the grouping icons. However, while the images do show in the browser, our logs are now filled with a weird error message:

    23-02-13 06:21:01.936 [http-nio-8080-exec-2] ERROR c.i.contentexport.ResourceLoader - Can't read image file; unexpected problem for URI 'https://xyz.com/*our skin*/images/ListGrid/group_opened.png'
    java.io.IOException: The byte array is not a recognized imageformat.
    at com.lowagie.text.Image.getInstance(Unknown Source)
    at com.isomorphic.contentexport.ResourceLoader.getImageResource
    Any idea what this is?
    ...

    We also have various skin related isomorphic null pointers in the logs, some examples:

    EDIT: I now realised the URL of the images below! They are pointing to some location within our module (called "nw") there are no skin files there, not sure where that url comes from.

    we have the javascript loading of the skin in our load page, and again, we have no GUI problems anywhere, all images load fine, except for these calls, which I have no idea where they come from.

    You guys have any pointers?



    23-02-13 09:35:21.838 [http-nio-8080-exec-5] ERROR com.isomorphic.download.Download - Problem sending static file: /data/ourproj/projects/webapp-1.0-SNAPSHOT/nw/sc/skins/standard/images/Window/close.gif
    java.lang.NullPointerException: null
    at com.isomorphic.util.SkinUtil.getThemes(SkinUtil.java:214)
    at com.isomorphic.servlet.ServletTools.sendStaticFile(ServletTools.java:1522)
    at com.isomorphic.servlet.FileDownload.doGet(FileDownload.java:202)


    at java.lang.Thread.run(Thread.java:745)
    23-02-13 09:35:21.838 [http-nio-8080-exec-6] ERROR com.isomorphic.download.Download - Problem sending static file: /data/ourproj/projects/webapp-1.0-SNAPSHOT/nw/sc/skins/standard/images/Window/headerGradient.gif
    java.lang.NullPointerException: null
    at com.isomorphic.util.SkinUtil.getThemes(SkinUtil.java:214)
    at com.isomorphic.servlet.ServletTools.sendStaticFile(ServletTools.java:1522)
    at com.isomorphic.servlet.FileDownload.doGet(FileDownload.java:202)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)


    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
    23-02-13 09:35:21.828 [http-nio-8080-exec-2] ERROR com.isomorphic.download.Download - Problem sending static file: /data/ourproj/projects/webapp-1.0-SNAPSHOT/nw/sc/skins/standard/images/Scrollbar/vthumb_stretch.gif
    java.lang.NullPointerException: null
    at com.isomorphic.util.SkinUtil.getThemes(SkinUtil.java:214)
    From what I can see these also show up in the browser?

    Our logs are pretty big now so would love to understand why they show up. :)
    Last edited by mathias; 14 Feb 2023, 00:23.

    #2
    Notice the paths says "standard" in the latter logs - this is a classic sign that you are loading two skins at once. This can happen if you try to load your own skin, but include one of the framework modules that also loads a skin, for example.

    That could be the cause of the first error as well, although there, we would guess that what's going on is that the new media has not actually been copied to the locations where the contentexport process is trying to retrieve them.

    Comment


      #3
      Hey thanks for responding so quickly. It's really strange, never had the issue before, and I have no idea what could cause it. Perhaps you can help me out in pinpointing it down.

      My gwt.xml looks like this:
      Code:
      <inherits name='com.google.gwt.user.User'/>
        <inherits name="com.smartgwt.tools.SmartGwtToolsNoTheme"/>
        <inherits name="com.smartgwtee.SmartGwtEENoScriptNoTheme"/>
      
        <inherits name="com.google.gwt.i18n.I18N"/>
        <inherits name="com.google.gwt.maps.Maps"/>
        <inherits name='com.google.web.bindery.event.EventBinder'/>
        <inherits name="com.google.gwt.precompress.Precompress"/>
      This is my script tags in my jsp that loads smartGWT:
      Code:
      <script src="nw/sc/modules/ISC_Core.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_Foundation.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_Containers.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_Grids.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_Forms.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_Calendar.js<%=v%>"></script>
      <script src="nw/sc/modules/ISC_DataBinding.js<%=v%>"></script>
      <script type="text/javascript" language="javascript" src="nw/nw.nocache.js"></script>
      <script type="text/javascript" language="javascript" src="<%=sv%>load_skin.js"></script>
      <script>isc.PrintCanvas.addProperties({printFrameURL: "<%=sv%>print.html"});</script>
      Can you see anything out of the ordinary? Is there anywhere else I should look?

      EDIT: I'm not actually *stating* my skin anywhere, I only have the load_skin script in the JSP above. Do I need to tell smartGWT about skin name, location or something?
      Again, I have never done so in the past, and there are no visible issues in the web app in the browser.

      Is there any way to debug if multiple skins are loaded?


      As for the first error (the resourceloader/byte array error), I can't see how that could be the case. The URL is correct, and the image can be seen in the browser in a bunch of places, so the URL works.
      Last edited by mathias; 14 Feb 2023, 12:36.

      Comment


        #4
        That part looks fine.

        It's super easy to see if you are loading multiple skins: just look at the network. 2 load_skin.js loads = 2 skins.

        The load_skin.js file normally tells the system the name of the skin. Otherwise it is derived from the base path to the resources.

        Another possibility is that your skin file is crashing partway through, so it never gets to the point where it sets up the Window, so you are seeing framework defaults.

        Or perhaps you in your changes to your skin, you removed some key properties that you didn't think were important, and they were.

        You should diff your skin file against the previous version, for starters.

        Comment


          #5
          Aaaah, ok, I thought you were referring to something else.

          That I have checked, there is only one load_skin in the network logs. Also, popup windows look like they should.


          Also, one thing I failed to mention, which I really should have, is that it's intermittent. It happened a couple of times yesterday. the byte array error was only once yesterday... very strange.

          Comment

          Working...
          X