5

I get this error when I try to open an specific .jnlp file:

net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:813)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:532)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:936)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
    at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2393)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:321)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:734)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:285)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:357)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:429)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:403)
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:805)
    ... 2 more

that file is for access to Cisco ASA's ASDM and it had been working fine since always, untill yesterday... I'm using 4 more files like that one (cause I have 5 ASA's) and those are working great.

Can anybody helpme please?? Thanks in advance.

BR.


thanks to you too @ryekayo, here's what I get from the command line:

gaspar@gaspar-Lenovo-ideapad-310-15ISK ~ $ javaws https://192.168.0.5/admin/public/asdm.jnlp
OpenJDK 64-Bit Server VM warning: NewSize (1536k) is greater than the MaxNewSize (1024k). A new max generation size of 1536k will be used.
netx: Initialization Error: Could not initialize application. (Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:813)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:532)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:936)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
    at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2393)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:321)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:734)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:285)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:357)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:429)
    at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:403)
    at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:805)
    ... 2 more
7
  • Have you tried running javaws from the command line? This can provide more info as stated by your stacktrace.
    – ryekayo
    Commented May 30, 2017 at 15:50
  • Probably, there was a java upgrade and the new runtime is no more compatible with this version.
    – DevOps
    Commented May 30, 2017 at 16:54
  • Also, the error message is pointing you at the problem: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
    – DevOps
    Commented May 30, 2017 at 16:55
  • Also check for the Java control panel (javacpl.exe) but when I had the issue in the past, it was linked to a updated and more restrictive Java runtime
    – DevOps
    Commented May 30, 2017 at 16:57
  • thanks @DevOps, but if there was a java update, why are the other 4 files working fine?? besides, I can see the message is pointing to the error but how can I fix that??? and for the last, I'm working in Linux, so how can I call the Java Control Panel??? Commented May 30, 2017 at 17:20

3 Answers 3

5

Copied this from an iDrac solution that I used to fix my Cisco ASDM issue and found that it worked.

https://velenux.wordpress.com/2017/06/07/workaround-for-javaws-jnpl-error-cannot-grant-permissions-to-unsigned-jars/

You are getting an error like:

net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars.

Quick workaround:

Find the java.security file. In my case it is located in /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security

Then find the row:

jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024

Comment it out, copy it, delete the MD5 string.

#jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024
jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024

Save the file. Try again. It should work.

3

The accepted answer from larry-r-irwin has identified the issue and wisely points to the java.security file.

Due to small reputation I can't comment, so I will try to add some helpful information in this answer:

  1. You have to identify which java you are using if you have multiple.

    ls -l /usr/lib/jvm

  2. Then go to specific path

    e.g. cd /usr/lib/jvm/java-1.11.0-openjdk-amd64

  3. Then find specific configuration file and make a copy before changing:

    find . -name java.security

    cp java.security java.security.original

  4. Last but not least, in addition to MD5 as larry-r-irwin says, you might have to remove other security restrictions. In my case I had to remove below config:

    jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \
    RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \
    SHA1 usage SignedJAR & denyAfter 2019-01-01, \
    include jdk.disabled.namedCurves
and keep only:

`jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024`
0

Download a previous version of Java runtime (like 1.7 or 1.6) and run it with this one. Location is at the bottom on the page at http://www.oracle.com/technetwork/java/javase/downloads/index.html

As state on the page :

WARNING: These older versions of the JRE and JDK are provided to help developers debug issues in older systems. They are not updated with the latest security patches and are not recommended for use in production.

In our case, you don't have any choice as Cisco is not providing updated signed jar to access your Cisco ASA.

To run it with old version, don't forget to provide full path like for windows

c:\tools\jdk1.6.0_95\bin\javaw.exe https://192.168.0.5/admin/public/asdm.jnlp 

or linux in your case

/opt/jdk1.6.0_67/bin/javaws https://192.168.0.5/admin/public/asdm.jnlp 
8
  • I'm a little bit disoriented here because I don't know java very much...the java's version I have installed is: gaspar@gaspar-Lenovo-ideapad-310-15ISK / $ java -version openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-0ubuntu1.16.04.2-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode) and in the link you sent me I can't find 1.6 or 1.7, from where can I download any of those versions?? Commented Jun 2, 2017 at 21:46
  • prntscr.com/ffa2cz then prntscr.com/ffa2hg then prntscr.com/ffa2sf
    – DevOps
    Commented Jun 3, 2017 at 0:11
  • sorry @DevOps, I already download and installed jdk-6u45-linux-x64.bin, but when I run the command I get the following: gaspar@gaspar-Lenovo-ideapad-310-15ISK ~ $ /opt/jdk1.6.0_45/bin/javaws 192.168.0.5/admin/public/asdm.jnlp bash: /opt/jdk1.6.0_45/bin/javaws: No existe el archivo o el directorio... what I'm missing here?? Commented Jun 7, 2017 at 15:37
  • if you try ls -la /opt/jdk1.6.0_45/bin/ what is the output ? This is to ensure it is available with right permissions.
    – DevOps
    Commented Jun 7, 2017 at 16:38
  • gaspar@gaspar-Lenovo-ideapad-310-15ISK ~ $ ls -la /opt/jdk1.6.0_45/bin/ ls: no se puede acceder a '/opt/jdk1.6.0_45/bin/': No existe el archivo o el directorio.... sorry, mi Linux is in Spanish, output says something like: directory doesn't exist Commented Jun 7, 2017 at 17:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .