This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
To reproduce: Day 1. 1) Bring up the context log and leave it open in the editor. Exit the IDE without closing the context log. Day 2: 2) Open the IDE again. The pld log file is still open in the text editor. Normally Tomcat creates a log file with the current date on it, but for whatever reason, this does not happen. If you exit the log file from the tab, and try to open it again, nothing happens. Restarting the server does not cause a log file to appear. This means that the user cannot engage in the normal debugging activity of checking what the container or their own resources logged to the context log.
I get an OutOfMemory error when I try to use the view context log action after restarting the IDE.
Milan, can you please look at this?
In 3.6, I was able to reproduce the issue (except of OutOfMemmory error). The OutOfMemmory depends likely on the size of the log file. Nevertheless, in Promo-D I cannot reproduce the issue at all. After some investigation I found that it was fixed already. The explanation : The FileObject:findResource("logs/"+ lastLogFile.getName()); method returns null in 3.6 for catalinaBase since (Catalina_Base) filesystem was not refreshed after new log file was created. That's why the new log file is not open. Now, there is a FileObject:base.getFileObject("logs/"+ lastLogFile.getName()); method that returns right file object for newly created log file. (the implementation of the method is enough smart to refresh the filesystem automatically) This is the diff file how to fix the issue for 3.6 : diff -c -r1.4 LogUtils.java *** LogUtils.java 19 Feb 2004 12:19:16 -0000 1.4 --- LogUtils.java 1 Jun 2004 14:32:23 -0000 *************** *** 54,59 **** --- 54,62 ---- FileSystem base = mng.getCatalinaBaseFileSystem(); if (base != null) { FileObject fo = base.findResource("logs/"+ lastLogFile.getName()); + // trying to refresh the filesystem + if (fo==null) base.refresh(); + fo = base.findResource("logs/"+ lastLogFile.getName()); if (fo!=null) { LogUtils.showLogFile(fo); // TextData Object - trying write to editor window }
There is a small mistake in diff file : refresh method should be called with boolean argument : refresh (true);
Build 20040802