InvocationTargetException when running applet locally

Mickey Segal java3 at segal.org
Fri Oct 18 10:37:27 UTC 2013


We were able to get past the problem of getCodeBase() returning null by hard-coding the URL.  This worked in 7 update 25 and 7 update 40.  We were able to debug that problem because the applet would launch and we could use println statements find that the problem was getCodeBase() returning null.  But the problem with 7 update 45 is that we don't even get to the stage of anything appearing in the Java Console; even from a println at the beginning of the code.  So we don't have a set of stacked Exceptions because the only clue that InvocationTargetException is involved is an error dialog that come up, but when one clicks the option for details, the Java Console is displayed, but no messages appear. 

-----Original Message-----
From: Bernd Eckenfels [mailto:bernd-2013 at eckenfels.net] 
Sent: Thursday, October 17, 2013 5:15 PM

It might be obvious, but maybe not: InvocationTargetException is an  
Exception produced by Reflection. It is used to wrap Exceptions thrown in  
the reflected code (since it is not possible to declare them dynamically).  
In your case I guess Reflection is used by the launcher to start the  
applet methods.

It would be good citizenship to remove the ITE from printing/displaying  
but as it is not done, you have to do it. You need to look at the stacked  
cause, the next Exception is the one your code throws. Without seeing this  
chain it is hard to guess what your problem is.

But I think most likely you run into a NPE because of the changed behavior  
of getCodeBase() (as explained here for example:  
http://www.duckware.com/tech/java-security-clusterfuck.html)

Greetings
Bernd




More information about the security-dev mailing list