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 67260 - Stack-trace does not link to anonymous classes
Summary: Stack-trace does not link to anonymous classes
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-21 06:47 UTC by _ gtzabari
Modified: 2006-01-24 17:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Webapp testcase (901 bytes, text/plain)
2005-10-24 16:42 UTC, _ gtzabari
Details
Screenshot of server output window from my app (not the testcase) (151.99 KB, image/jpeg)
2005-10-24 17:59 UTC, _ gtzabari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2005-10-21 06:47:55 UTC
dev build 200510171800

I'm not sure if this is by design or its a bug so I'll assume the latter.

If the output window contains a stack-trace, the methods are hyperlinked so I
can click on any of them and jump to the approriate line number. The problem is
that for anonymous classes it doesn't generate a hyperlink.

In my use-case I use *a lot* of anonymous classes and when I get an error this
shortcoming makes it difficult for me to debug. Is there a way to fix this?
Comment 1 _ lcincura 2005-10-24 14:34:43 UTC
Reassigning for evaluation
Comment 2 Milos Kleint 2005-10-24 16:16:22 UTC
hyperlinking logic done in ant I suppose, reassigning.
Comment 3 Jesse Glick 2005-10-24 16:23:51 UTC
Need a test case to reproduce from scratch.
Comment 4 _ gtzabari 2005-10-24 16:38:34 UTC
This is only reproducible as a webapp (as opposed to a standalone application).
Please see the attached testcase.
Comment 5 Jesse Glick 2005-10-24 16:41:19 UTC
There is no attached test case yet, is it coming?
Comment 6 _ gtzabari 2005-10-24 16:42:20 UTC
Created attachment 26283 [details]
Webapp testcase
Comment 7 Jesse Glick 2005-10-24 16:50:39 UTC
The source file is not enough, I need actual steps to see the problem happen.
What buttons / menu items / etc. do I click in the UI. What do I type in which
text field. If the problem can be reproduced by opening a ZIPped-up project
(with no nbproject/private/) on a NB dev build on any machine (no special libs
needing to be installed etc.), and then e.g. clicking Run on the project, that
would make it a bit easier. Assume I have no idea what you're talking about (and
since I do not work on web apps, I probably don't).
Comment 8 _ gtzabari 2005-10-24 16:59:10 UTC
You should be able to run this testcase without any libraries or external
dependencies. These steps should work for you:

1) Drop the testcase into a Web project
2) Ensure servlet is bound to a specific URL. If it isn't configured yet, you
can add it using: Web Pages -> WEB-INF -> web.xml -> Servlets -> Add Servlet
Element -> Servlet name = whatever, Servlet class = HyperlinkTest, URL Pattern =
/HyperlinkTest
3) Then simply run the Servlet. You can do this by finding the source-file in
the explorer tree, right click on it and "Run file"
Comment 9 Jesse Glick 2005-10-24 17:17:53 UTC
Followed your instructions, and I see the stack trace in my web browser, but not
in the IDE anywhere. (Looked in Output Window under the tabs "WebApplication1
(run)" as well as "Bundled Tomcat (5.5.9)".) So still cannot reproduce.
Comment 10 Jesse Glick 2005-10-24 17:18:36 UTC
Unlikely to have anything to do with the Output Window.
Comment 11 _ gtzabari 2005-10-24 17:40:23 UTC
The output window should contain a tab for the Tomcat server. The server output
will show the stack-trace I am talking about.
Comment 12 Jesse Glick 2005-10-24 17:50:14 UTC
I looked in the server output tab and did not see any stack traces. Can you try
again in a fresh dev build, fresh userdir, fresh project and attach a screenshot?
Comment 13 _ gtzabari 2005-10-24 17:56:41 UTC
It seems to me you're not running the testcase correctly. If you look at it, you
will notice it *always* throws an exception when run, so if you're not seeing a
stack-trace then either you're not hitting the servet or this is a Netbeans bug
(because we should always be seeing this stack-trace somewhere).

Isn't there anyone around you who is familiar with running Netbeans webapps? :)
Comment 14 _ gtzabari 2005-10-24 17:59:53 UTC
Created attachment 26291 [details]
Screenshot of server output window from my app (not the testcase)
Comment 15 Jesse Glick 2005-10-24 18:02:27 UTC
As I say, I *do* see a stack trace in my web browser. Just not in the server log
file.

Reassigning to web apps team to evaluate. If the problem is specific to web
apps, it is anyway likely that the fault lies in an AntLogger impl supplied by
some web module.
Comment 16 _ gtzabari 2005-11-09 17:24:36 UTC
Hey web guys :) can you reproduce this problem on your end?
Comment 17 Radko Najman 2005-11-15 13:39:59 UTC
I can see the stack trace also in web browser only, not in Tomcat Output window.

Are you sure that not hyperlinked classes from your attached picture are on you
project classpath?
Comment 18 _ gtzabari 2005-11-15 17:08:20 UTC
Yes, I'm sure the classes are in my classpath because other (non-anonymous)
classes in the same classpath show up as links.

This is just a guess but I think maybe the reason I see output in the Tomcat
output window and you don't is due to my log4j configuration. I've got:

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.rootLogger=warn, stdout

which might be responsible.
Comment 19 Sherold Dev 2005-11-15 17:39:15 UTC
-> tomcatint
Comment 20 Sherold Dev 2006-01-05 19:22:07 UTC
F.

Checking in src/org/netbeans/modules/tomcat5/util/LogSupport.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/LogSupport.java,v 
<--  LogSupport.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/tomcat5/util/LogViewer.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/LogViewer.java,v 
<--  LogViewer.java
new revision: 1.9; previous revision: 1.8
done
Checking in src/org/netbeans/modules/tomcat5/util/ServerLog.java;
/cvs/tomcatint/tomcat5/src/org/netbeans/modules/tomcat5/util/ServerLog.java,v 
<--  ServerLog.java
new revision: 1.4; previous revision: 1.3
done
RCS file:
/cvs/tomcatint/tomcat5/test/unit/src/org/netbeans/modules/tomcat5/util/LogViewerTest.java,v
done
Checking in test/unit/src/org/netbeans/modules/tomcat5/util/LogViewerTest.java;
/cvs/tomcatint/tomcat5/test/unit/src/org/netbeans/modules/tomcat5/util/LogViewerTest.java,v
 <--  LogViewerTest.java
initial revision: 1.1
done
RCS file:
/cvs/tomcatint/tomcat5/test/unit/src/org/netbeans/modules/tomcat5/util/ServerLogTest.java,v
done
Checking in test/unit/src/org/netbeans/modules/tomcat5/util/ServerLogTest.java;
/cvs/tomcatint/tomcat5/test/unit/src/org/netbeans/modules/tomcat5/util/ServerLogTest.java,v
 <--  ServerLogTest.java
initial revision: 1.1
done
Comment 21 Jaroslav Pospisil 2006-01-18 15:07:16 UTC
gtzabari,could zou please verify the fix?
Comment 22 _ gtzabari 2006-01-24 17:15:11 UTC
Works great, thanks :)