I created a Java Applet which manipulates a JSP webpage's form fields. The JSP calls the Java Applet, of course.
This the error I'm getting in the Java Console, when I run my Java Applet on my JSP:
Ignored exception: java.security.PrivilegedActionException:
java.lang.reflect.InvocationTargetException
I am not calling InvocationTargetException or passing any exceptions in the code. Somehow, I managed to trace it, by painstaking trial-and-error, that the line causing the error is:
BlowfishCBC bfcbc = new BlowfishCBC(testkey, 0, testkey.length, CBCIV_START);
As a test, I disabled all code that has dependencies on the JSP, so I can just run it inside Eclipse. I created a main method to execute the Java Applet and then ran it inside Eclipse. I got no errors or warnings, at all.
I exported the same Java Applet, as a JAR, copied it to the server, restarted Apache Tomcat, went to the page on my web browser, ran the applet, and the same InvocationTargetException error occurred
What could be the problem?
Note: I am not using try..catch anywhere in my code. What can I put in the code that will capture this exception information and how do I do that?
Thank you.
Update:
Here is the stacktrace from the Java Console:
java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.checkLiveConnectCaller(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation.access$000(Unknown Source)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)
in encrypt method
trying to get pwd value from document
got pwd from document, password is 12345
is this getting here?
Ignored exception: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
I think that's the stacktrace. I hope that information is sufficient and helpful.