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.

Bug 50497 - Output window keeps text even after execution ends and clear is done
Summary: Output window keeps text even after execution ends and clear is done
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: issues@serverplugins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-15 19:01 UTC by mhaynesjr
Modified: 2005-07-19 09:02 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Netbean output log (569.18 KB, text/plain)
2004-10-18 16:19 UTC, mhaynesjr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mhaynesjr 2004-10-15 19:01:01 UTC
I have a web application ( struts, Tomcat if that
helps ) that starts a Tomcat session. Two tabs
appear in the output window ( <Name of App>(Run)
and <Name of App> ). The second window displays
stack traces when exceptions are thrown, which its
suppose to do. When I right click the window and
select "Clear" the pane clears, which I expect.
Now when I end my application run ( close the
browser, and even make sure the embedded Tomcat is
stopped ) and then re-run the app, the output
window has all the previous error messages, etc as
if I never selected "clear" from the menu.
Shouldn't the clear menu option clear the text for
good and not retain previous sessions' output? If
this is expected, I apologize, but I am new to
NetBeans and am still learning its features.
Comment 1 _ tboudreau 2004-10-16 17:48:19 UTC
Which tab do you call clear on?

The content definitely shouldn't remain there - I wonder if the web module is somehow 
caching old content and rewriting it to the new output pane.

Note that if the output stream for the process is still open when it is cleared, the tab's 
content will be replaced, but the contents of the old stream could reappear if the web 
module tries to re-show that tab.  

Could you reproduce this while running NetBeans with
-J-Dnb.output.log=true

and attach the resulting file $TMP/outlog.txt

That would help find out exactly what is going on.
Comment 2 mhaynesjr 2004-10-18 16:19:56 UTC
Created attachment 18365 [details]
Netbean output log
Comment 3 mhaynesjr 2004-10-18 16:21:29 UTC
Just as a test, I clear all tabs in the output window ( There are 3
tabs, Bundled Tomcat, <Project Name>(Run), <Project Name>. The
<Project Name> tab is the tab that writes the runtime exceptions that
I throw. I clear that tab and it does clear, but when I stop the run,
make some code changes and re-run the tab opens and still contains the
previous run's exception output. I have reproduced this issue with the
flags set as you indicated. I have attached the file as well. Here are
the steps I performed when I had the flags turned on:

First off, I intentionlly added runtime exceptions just to get
straight to the error

1) Cleaned and built project
2) Started project ( this starts Tomcat and then opens a web browser )
3) I click on a link to run an action ( the action throws a hibernate
exception )
4) The output is sent to the browser and the output tab in Netbeans.
5) Close the browser, right-click on the HTTP Server node and stop the
server, and then right click on the output pane with the exceptions
and select "clear" from the popup menu. I also actually closed the
tabs by pressing the "X" on the panes just to really make sure the
tabs close.
6) Redo steps 1,2,3. The output pane still has the previous run's
exceptions in it ( I know this because of the timestamps of the
exceptions. The new exceptions are just appended to the end. 
Comment 4 Martin Krauskopf 2004-10-26 16:36:50 UTC
I'll try to investigate it, since I'm working on some output tab issues.
Comment 5 Jaroslav Tulach 2004-10-27 15:15:46 UTC
This is a remainder to you, the owner of this bug, that this issue has P3, is
reported against 4.0 and its target milestone has not yet been set. Please set
the milestone, fix the issue or change its priority by tomorrow. Thank you for
helping NetBeans to get ready for code freeze.
Comment 6 Martin Krauskopf 2004-10-29 13:37:58 UTC
It seems that tomcat module repopulate output tab with the logfile(s)
everytime you open it. I don't know the tomcat module, so don't know
if it is a feature or bug. I just followed the stacktrace and came to
o.n.modules.tomcat5.util.LogViewer.run() method where the populating
is happening.
So I'm reassingning them the issues. If I'm wrong throw it back guys :)
Comment 7 Sherold Dev 2004-11-01 14:19:44 UTC
Changing to ENHANCEMENT.

Showing the full context log is a feature which has been "implemented"
when the context log was not yet being opened automatically. It is too
late to change this in the 4.0 release. In the next release "open
context log" action will show only newly added log messages and some
other action will offer displaying of the old content.

Please note that we do not plan to clear the log files physically,
since it would be quite risky to do so, however the effect should be
quite the same.