We have an application which starts on a logon page and then navigates to a second page from which an applet is loaded. Everything works great. When the user logs off, the browser navigates back to the logon screen. If the user logs back on again, the browser crashes when parts of the applet are initialized. This only happens on the second loading of the applet. Caching has been disabled in the browser but the browser is never completely closed so am I right to assume that the applet loaded on the first logon is still around?
More information. The sun java console appears when the applet loads. When the user logs off and returns to the logon screen, the sun java console is still up even though the logon screen does not use java (only html and javascript). I think that something is not being reinitialized when the user logs off but the applet is stopped and destroyed so what could be still hanging around?
Oddly enough, this only happens on one test machine but not on others.
Below is the error log from the SJC:
java.lang.NullPointerException
at javax.swing.text.html.parser.Parser.errorContext(Unknown Source)
at javax.swing.text.html.parser.Parser.parse(Unknown Source)
at javax.swing.text.html.parser.DocumentParser.parse(Unknown Source)
at javax.swing.text.html.parser.ParserDelegator.parse(Unknown Source)
at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
at javax.swing.JEditorPane.setText(Unknown Source)
at ReportPane.setDescription(ReportPane.java:577)
at ReportPane.doDefineLoad(ReportPane.java:608)
at ReportPane.<init>(ReportPane.java:565)
at RevApp2.createGui(RevApp2.java:640)
at RevApp2.access$0(RevApp2.java:414)
at RevApp2$1.run(RevApp2.java:393)
at java.awt.event.InvocationEvent.dispatch(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)
asDescription-><font face="CENTURY SCHOOLBOOK">Use to assign accounts to coders.</font>
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at RevApp2.init(RevApp2.java:389)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at javax.swing.text.html.parser.Parser.errorContext(Unknown Source)
at javax.swing.text.html.parser.Parser.parse(Unknown Source)
at javax.swing.text.html.parser.DocumentParser.parse(Unknown Source)
at javax.swing.text.html.parser.ParserDelegator.parse(Unknown Source)
at javax.swing.text.html.HTMLEditorKit.read(Unknown Source)
at javax.swing.JEditorPane.setText(Unknown Source)
at AdminPane.setDescription(AdminPane.java:197)
at AdminPane.<init>(AdminPane.java:174)
at RevApp2.createGui(RevApp2.java:656)
at RevApp2.access$0(RevApp2.java:414)
at RevApp2$1.run(RevApp2.java:393)
at java.awt.event.InvocationEvent.dispatch(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)
netscape.javascript.JSException: Unspecified error invoking method or accessing property "accountfocus"
at sun.plugin2.main.client.MessagePassingJSObject.newJSException(Unknown Source)
at sun.plugin2.main.client.MessagePassingJSObject.waitForReply(Unknown Source)
at sun.plugin2.main.client.MessagePassingJSObject.call(Unknown Source)
at RevApp2.start(RevApp2.java:2045)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: netscape.javascript.JSException: Unspecified error invoking method or accessing property "accountfocus"
If you google “javax.swing.text.html.parser.Parser.errorContext” you will find that others have had similar issues and have reported them on some oracle discussion board:
http://forums.oracle.com/forums/thread.jspa?messageID=8297744&tstart=0
They talk about a workaround for this – maybe this might fit your case as well.
Qute from the forum: