0 Replies Latest reply on Apr 25, 2013 5:50 AM by 1005374

    I get NullPointerException when going offline despite <offline-allowed/>

    1005374
      Hello,
      I have the following problem :
      From time to time (1 out of 100 Users) webstart won't start.
      The error is:
      ---------------------------------------------------------------------------------------------------------

      java.lang.NullPointerException
      at com.sun.deploy.security.SessionCertStore$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.SessionCertStore.exportState(Unknown Source)
      at com.sun.deploy.util.SessionState.save(Unknown Source)
      at com.sun.javaws.Launcher.relaunch(Unknown Source)
      at com.sun.javaws.Launcher.prepareResources(Unknown Source)
      at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
      at com.sun.javaws.Launcher.launch(Unknown Source)
      at com.sun.javaws.Main.launchApp(Unknown Source)
      at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
      at com.sun.javaws.Main.access$000(Unknown Source)
      at com.sun.javaws.Main$1.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      ---------------------------------------------------------------------------------------------------------------------

      the jre is:
      Java 1.7_09 on Windows XP
      the jnlp is:
      ---------------------------------------------------------------------------------------------------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="https://www.mywebsite.com/app" href="https://www.mywebsite.com/app/myjnlp.jnlp">
      <information>
      <title>APP</title>
      <vendor>Vendor</vendor>
      <description>APP</description>
           <icon href="images/icon.gif" kind="shortcut" width="64" height="64" />
           <offline-allowed/>
                <update check="timeout" policy="always" />
      <shortcut online="true">
           <desktop/>
           <menu submenu="APP"/>
      </shortcut>
      </information>
      <security><all-permissions/></security>
      <resources>
      <j2se version="1.5+" initial-heap-size="256m" max-heap-size="512m" />
      <jar href="Launcher.jar" main="true" />
           <property name="netbeans.jnlp.fixPolicy" value="false"/>
      <property name="netbeans.user" value="${user.home}/.nbapp-netcomo"/>
           <property name="codebaseurl" value="https://www.mywebsite.com/app"/>
      </resources>
      <application-desc main-class="jnlpide.Launch"/>
      </jnlp>

      my webserber is serving the jnlp file with:
      ((HttpServletResponse) response).setHeader("Cache-Control", "no-cache");

      ---------------------------------------------------------------------------------------------------------------------
      here is what happens:

      1) the User uses VPN
      2) the user goes to our website https://www.mywebsite.com and clicks on the link "https://www.mywebsite.com/app/myjnlp.jnlp"
      3) Webstart starts
      4) Nullpointer Exception at com.sun.deploy.security.SessionCertStore
      5) in some cases if the user does not use VPN everything will works fine afterwards.

      I looked at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007740 but my user is using Java 1.7_09
      and all other 100 Users have no problem at all.

      I can reproduce the problem on my machine if I cuttoff the network.
      How can this be? My jnlp contains "<offline-allowed/>"



      Can anybody give me some tipps how to proceed?

      Can I get the sourcecode of com.sun.javaws.Launcher to maybe find out more?

      Edited by: 1002371 on 24.04.2013 22:46