CouldNotLoadArgumentException is thrown in JWS client - java

I am trying to start a JWS application:
It throws CouldNotLoadArgumentException in Windows 8.
But if I try the same thing in other computer running Windows 7 it works just fine.
I have found couple of similar post in stack overflow and applied those suggestion:
Removed all property fields from JNLP file.
Cleared the temp files and browser cache.
But still it failed.
Stack trace
CouldNotLoadArgumentException[ Unable to load the specified file/URL: C:\Users\N -~1\AppData\Local\Temp\javaws5]
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)
[27-07-2015 23:55:30] Esther.Hung : java.io.FileNotFoundException: C:\Users\N -~1\AppData\Local\Temp\javaws5 (System can not find the path specified.)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(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)

Related

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?
Remove the signature from jar's meta-inf and sign it again

Unable to launch application : JNLP error

I found answer to this question here!
However, I tried enabling java caching by checking “Keep temporary files on my computer.”
But I still get the exception:
com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://localhost:8080/<context-root>/client/servlet-api.jar
at com.sun.javaws.security.SigningInfo.getCommonCodeSignersForJar(Unknown Source)
at com.sun.javaws.security.SigningInfo.check(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(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(Thread.java:745)
Is there any other possible solution?

Fail to launch java web start in java 7 update 25

I try to deploy my java web start application as deploy java web start
But when i launch my application, but I got exception:
java.io.IOException: Cannot find cached resource for URL: http://nguyennguyen1647:8080/myweb/byte-viewer-1.0.0.jar
at com.sun.deploy.cache.Cache.getCachedResourceFilePath(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.getCachedResourceFilePath(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPBits(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.getSignedJNLPFile(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedLaunchDescHelper(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedLaunchDesc(Unknown Source)
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedLaunchDesc(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(Thread.java:724)
I think my problem is my jar file is self-signed.
Please tell me how to sign jar file with certificate?
Thanks in advance!

Java Applet Error In Browser - java.lang.ExceptionInInitializerError

I'm trying to run my first java applet in my browser but when I open the HTML file which the applet class is embedded into, the following error occurs:
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at Applet.MAIN.<clinit>(MAIN.java:39)
... 21 more
What should I do to solve this problem?
Here is the: entire error block
Applet has limited permissions. Non-signed applet cannot access file system and part of the system properties. In your case you tried to access user.dir.
You have the following solutions.
try to avoid using user.dir
sign your applet
do not use applet at all. Use java web start instead.
Youre trying to access something you dont have permission to
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
You can sign your applet
And/or set the permissions in the users home directory
http://docs.oracle.com/javase/1.4.2/docs/guide/security/permissions.html

"Unable to create shortcut for" on starting Java7 on OSX

Whenever I start a JNLP WebStart Application with Java7 on OS X 10.8 I get the following message dialog:
Unable to create shortcut for XXXX
The console outputs the following exception:
java.io.FileNotFoundException: /Users/XXXX/Library/Application Support/Oracle/Java/Deployment/cache/6.0/37/6bb90625-129dd80a.icns (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at com.sun.javaws.MacOSXShortcutUtil.copy(Unknown Source)
at com.sun.javaws.MacOSXShortcutUtil.createBundle(Unknown Source)
at com.sun.javaws.MacOSXLocalInstallHandler.createBundle(Unknown Source)
at com.sun.javaws.MacOSXLocalInstallHandler.createShortcuts(Unknown Source)
at com.sun.javaws.LocalInstallHandler.installShortcuts(Unknown Source)
at com.sun.javaws.LocalInstallHandler.performIntegration(Unknown Source)
at com.sun.javaws.LocalInstallHandler.install(Unknown Source)
at com.sun.javaws.Launcher.notifyLocalInstallHandler(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(Thread.java:722)
Cleaning cache, removing deployment cache does not help.
The shortcut-bug on OSX existed in Java 7u9.
It was fixed in 7u10. You probably need to update your JRE.
Discussion

Categories