title: Java 7 update 25 makes our java web start application fail with no logging
body: <p>Since the java 7 update 25 launched by Oracle our application no longer functions.</p>
  
  <p>Initially we got some warning about codebase &amp; sercurity tags missing in the Manifest file, which we fixed.</p>
  
  <p>The problem we now end up with is that in the Console we only get the following lines:</p>
  
  <pre><code>#### Java Web Start Error:
  #### null
  </code></pre>
  
  <p>We also get an application Error dialog with the message: <strong>Unable to launch the application</strong>.</p>
  
  <p>The details button gives the following details in the Exception:</p>
  
  <pre><code>java.lang.NullPointerException
      at com.sun.jnlp.JNLPClassLoader.getPermissions(Unknown Source)
      at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:206)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at desktop.DesktopProxySelector.&lt;init&gt;(DesktopProxySelector.java:24)     &lt;- code smippet below
      at desktop.Main.main(Main.java:139)                                      &lt;- code smippet below
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at com.sun.javaws.Launcher.executeApplication(Unknown Source)
      at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
      at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
      at com.sun.javaws.Launcher.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:724)
  </code></pre>
  
  <p>The relevant code parts are:</p>
  
  <pre><code>Desktop.Main.main
  
  /**
   * Main method, starts the application
   */
  public static void main(String[] args) {
      System.setProperty("java.net.useSystemProxies", "true");
  
      //Logger.getLogger("httpclient.wire.header.level").setLevel(Level.FINEST);
      //Logger.getLogger("org.apache.commons.httpclient.level").setLevel(Level.FINEST);
      java.net.ProxySelector.setDefault(new DesktopProxySelector(java.net.ProxySelector.getDefault()));
  </code></pre>
  
  <p>(The last line is line number 139)</p>
  
  <pre><code>desktop.DesktopProxySelector:
  
  public class DesktopProxySelector extends ProxySelector {
  
      public  DesktopProxySelector(ProxySelector defaultSelector) {
      URI httpsUri = new CentralConfigurationService().getCentralLocation();
  </code></pre>
  
  <p>(The last line is line number 24 where the exception occures)</p>
  
  <p>Can someone give us some clues hints (or better a solution) for this new behaviour of java caused by this 'minor' update.</p>
  
  <p>When we run the application straight from the cli using java -jar Desktop.jar the application wil run file, so the issue has clearly something todo with the changes in java web start.</p>
  
  <p>@trashgod: the error clearly has something to do with the Permissions change in 7u25, since the NullPointerException occurs in com.sun.jnlp.JNLPClassLoader.getPermissions. </p>
  
  <p>Just to explain what I think happens (I am a colleague of Wouter):
  desktop.Main instantiates a desktop.DesktopProxySelector (our class), 
  desktop.DesktopProxySelector instantiates desktop.configuration.CentralConfigurationService
  desktop.configuration.CentralConfigurationService instantiates a java.net.URI.</p>
  
  <p>On the first line of the DesktopProxySelector init where the CentralConfigurationService is instantiated the getPermissions method, called by the JNLPClassLoader, throws the NullPointerException. So something is going wrong while loading the CentralConfigurationService class by java webstart with getting the permissions for the class. Could that have anything to do with the fact that a URI class is instantiated, which requires extra permissions (a connection to a remote uri is setup)?</p>