I just upgraded my Java plugin to 1.7.0_25, which caused a fatal error using an applet that I wrote several years ago (and has supported since then).
At the beginning of the applet init () method, I call
logger = Logger.getAnonymousLogger();
This call works with Java 1.4.2 without problems. Now, with Java 1.7.0_25 (at least on Windows 7, I don’t have a Mac or Linux machine to test here), it works fine the first time the applet loads. However, if the applet’s browser page is closed and the page is loaded again, the applet does not work with the following console message:
basic: Applet loaded. basic: Applet resized and added to parent container basic: PERF: AppletExecutionRunnable - applet.init() BEGIN ; jvmLaunch dt 756747 us, pluginInit dt 76093467 us, TotalTime: 76850214 us java.lang.NullPointerException at java.util.logging.Logger.doSetParent(Unknown Source) at java.util.logging.Logger.getAnonymousLogger(Unknown Source) at java.util.logging.Logger.getAnonymousLogger(Unknown Source) at com.optix.applet.viewer.ObjectViewer.init(ObjectViewer.java:214) at com.sun.deploy.uitoolkit.impl.awt.AWTAppletAdapter.init(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Ignored exception: java.lang.NullPointerException
To download the applet again, I have to close and restart the browser.
This never happened with a previous release of Java, since java.util.logger was introduced in Java 1.4.
There should not be any permissions: I added new attributes to META-INF / MANFEST.MF
Permissions: all-permissions Codebase: *
as stated in http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/no_redeploy.html . The applet is signed with the current GoDaddy certificate and marked timestamped.
I found that if I create a registrar with
logger = Logger.getLogger(String);
the applet will load every time.
I can not find anything by this error. Has anyone seen this? Does anyone know what made it appear with Java 1.7.0_25, or why will the call work once in a browser session, but not a second time?