From: Christoph F. <cf...@fo...> - 2004-10-27 11:59:58
|
Hi Rinalldo I'm pretty sure that the reason for this is the potential asynchronious behavior of the Preferences implementation. I guess you are still running TMNav-Applet with the -f option? And removed the call to System.exit(int); If so, please try to add a call to sync in TMNav.clearSessionData(): After that the try - block should look roughly like this: try { String path = tmnavRootNode.absolutePath(); tmnavRootNode.removeNode(); tmnavRootNode.sync(); // new call to sync System.out.println("Removed Session Data from path " + ... If this does not help, try to add the sync call also to TMNav.closeInstance(int), just after the line: session.storeSession(); (For the latter case you need to access tmnavRootNode just as in clearSessionData().) Hope that helps c Am Mittwoch, den 27.10.2004, 18:38 +1000 schrieb Rinalldo Yasahardja: > The following is the exception TMNav threw when it is ran the second time > from applet (remember I told you that TMNav ran successfully once, but the > second time it was run, it crashed). > > You might wonder about the TMNavApplet.java > > This is the applet for TMNav and inside the init() function is what was > originally inside of the main function in TMNav.java > > although there are slight changes, the changes are irrelevant... > > If you knew what was going on, that would help me greatly > > thanks > > > java.lang.IllegalStateException: Node has been removed. > > at java.util.prefs.AbstractPreferences.get(Unknown Source) > > at java.util.prefs.AbstractPreferences.getInt(Unknown Source) > > at > org.tm4j.tmnav.app.ui.util.PersistentJFrame.restore(PersistentJFrame.java:55 > ) > > at > org.tm4j.tmnav.app.TMNavMainFrame.resetSize(TMNavMainFrame.java:244) > > at org.tm4j.tmnav.app.TMNav.show(TMNav.java:203) > > at org.tm4j.tmnav.app.TMNavApplet.init(TMNavApplet.java:118) > > at sun.applet.AppletPanel.run(Unknown Source) > > at java.lang.Thread.run(Unknown Source) > -- Christoph Froehlich <cf...@fo...> |