3 Replies Latest reply on Jul 10, 2012 1:35 AM by 817264

    Random Cannot Lauch Application problem

      I just recently deployed a new JWS App.

      For the most part, t deployed ok, however, I am getting random reports of users getting Cannot Launch Application pop up messages.

      The launched from the web site had and continues to have no issues. This always seems to work.

      Once installed, users use the Dekstop link to launch the App. This is when my users start having problems. I have had users that claimed to have left the machine logged in over night and have it not work the next day, or log off but leave the machine on, and have problems. And some users say they logoff, then try again a little while later and have problems.

      These are users running XP or Win7, mostly 1.6 update 30, but some are are at 31, some lower.

      And it seems to be random. Removing the App and deleting the files always seems to clear the problem. Some of these users have it happen again, some have not. This makes it hard to determine if they are just clearing things up themselves or they are fixed.

      I am not using servlets or services. Just using IIS to deploy. The files on the web server have not been updated since I deployed.

      At this moment, I do not have access to the files, so I cannot post them, but I need some suggestions. I have looked over bug reports and forums posts but I do not have a clear picture of what could be the problem, other than it appears to be a cache issue.

      Stacktrace is here:
      CouldNotLoadArgumentException[ Could not load file/URL specified:
      C:\Documents and Settings\MyUser\Application Data\Sun\Java\Deployment\cache\6.0\25\19da9159-15c73a45]
      at com.sun.javaws.Main.launchApp(Unknown Source)
      at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
      at com.sun.javaws.Main$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

        • 1. Re: Random Cannot Lauch Application problem
          if you look into what desktop shortcut is you will notice it is basically request for javaws to use cached copy of JNLP file.
          It is fragile and may break if cached jnlp file will be removed (and JNLP file update works as removal of old copy and creation of new copy with different name).
          JRE6 was trying to ensure shortcuts gets updated once cache is updated but this did work well for all scenarios.
          JRE7 uses different and more robust approach by using original application URL to lookup entry in the cache.

          Unfortunately i am not sure if JRE7 solution was ported to JRE 6.

          If your users can not upgrade to Java 7 (unless Java 7 has some blocking issue i'd recommend upgrade to 7u) then options you have are:
          a) add custom code to create desktop shortcut (will need to sign your app and understand how shortcuts work on the target systems)
          create it as
          path\to\javaws http://your.site/path/to/jnlp

          b) try to chase down reasons why JNLP file is getting removed and try working this around so removal is not needed
          Possible root causes you may workaround:
          - http server reports JNLP is updated every time (or does not provide last modified date, or expiration date)
          - cache is getting cleared externally (e.g. by scripts)

          If application do not change (or appear to be changed) and user is not upgrading JRE then unless deployment cache is "full" there are no reasons to remove cache entries i think
          and then shortcut should work.
          • 2. Re: Random Cannot Lauch Application problem
            I have done a, only tested on one system so far. It seems to work at this time.

            I have asked our IT guys to take a look at what might be going on, but I have not heard anything back.

            What version of Java 7 is supposed to have the fix?

            BTW, Thanks for your response.

            One of the things I have noticed is that in some posts they will say it was fixed or resolved but never say how it was fixed or resolved.
            The get a response from and never follow up.

            I do not plan on doing that. We need to help each other the best we can.
            • 3. Re: Random Cannot Lauch Application problem
              JRE 7.0 should have the fix i think. Or may be 7 update 2.

              Easiest way to validate is to install it, run your app and then right click on shortcut to see what is associated command.
              If you see full original URL there then JRE has the fix.