Link to home
Start Free TrialLog in
Avatar of jvmnj
jvmnj

asked on

What makes a Java Applet Jar Invalid?

Hello,
I have an issue with an applet. The issue has occured from more than one computer. The applet was last deployed in April. It was working from then.What can we look for that would invalidate the ability to read a jar file?


network: Downloading resource: https://[path and file name removed for privacy].jar
      Content-Length: -1
      Content-Encoding: null
java.io.IOException: Invalid jar file
      at com.sun.deploy.net.DownloadEngine.getJarFileWithoutCache(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.getJarFileWithoutCache(Unknown Source)
      at com.sun.deploy.net.DownloadEngine.downloadJarWithoutCache(Unknown Source)
      at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
      at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
      at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
      at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
      at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
      at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
      at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
      at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
      at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Last i heard, with current JREs, all applets must be signed now
Make sure that the JAR is being served properly too. Put the address (https://[path and file name removed for privacy].jar) into a normal browser address bar and make sure that is downloads the JAR file properly. Check that the downloaded jar file is correct.
Avatar of jvmnj
jvmnj

ASKER

Thanks mccarl.

I have done that it downloads and was able to view the files in a decompiler. I can confirm that the same jar file loads using the same client browser in 2 other deployed environments. What do you all think could be wrong with this environment?
You could well have different runtimes - did you test them?
http://www.java.com/en/download/testjava.jsp
Avatar of jvmnj

ASKER

Thanks CEHJ.

But the the same applet jar, ran by the same user, from the same desktop (same jre) works in 2 environments. But in the quality environment it reads invalid jar. Any other thoughts?
ASKER CERTIFIED SOLUTION
Avatar of jvmnj
jvmnj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jvmnj

ASKER

I found the answer on my own