Search code examples
javajava-web-startbouncycastlejnlp

Issue with loading bcprov-jdk15on-1.50.jar in JNLP


So I am trying to use run a project in JNLP that uses an external jar to provide encryption. When the JNLP is run I get the following Exception

com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost:8080/../lib/bcprov-jdk15on-1.50.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

And the following Wrapped Exception

java.io.IOException: invalid SHA1 signature file digest for org/bouncycastle/...
at com.sun.deploy.cache.CacheEntry$10.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
at com.sun.deploy.cache.CacheEntry.writeFileToDisk(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.downloadResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

the jar is question is being specified to the JNLP file as

<jar href="lib/bcprov-jdk15on-1.50.jar"/>

With out the jar the project boots just fine, but the parts requiring the encryption fail so I am fairly confident that this is issue with JNLP specification. Any ideas on fixes?


Solution

  • Remove the signature from jar's meta-inf and sign it again