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 153502 - Unable to profile a web application
Summary: Unable to profile a web application
Status: RESOLVED WONTFIX
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: J Bachorik
URL: https://glassfish.dev.java.net/issues...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-20 04:27 UTC by dpkumar
Modified: 2009-02-19 22:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Server.log (18.60 KB, text/plain)
2008-11-20 04:28 UTC, dpkumar
Details
server.log (10.65 KB, text/plain)
2008-11-21 09:13 UTC, dpkumar
Details
IDE message.log (49.74 KB, text/plain)
2008-11-21 09:42 UTC, dpkumar
Details
GlassFish threaddump before the timeout (34.17 KB, text/plain)
2008-11-21 11:46 UTC, Jiri Sedlacek
Details
NetBeans threaddump before the timeout (21.78 KB, text/plain)
2008-11-21 11:46 UTC, Jiri Sedlacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dpkumar 2008-11-20 04:27:42 UTC
NB IDE-NB6.5 RC2
GF V2.1-B60
JDK:jdk1.6.0

Steps to reproduce:
-Install NB and GF V2.1
-Open IDE and Register server.
-Start server In profile 
-Open any sample application.Set target server as GFV2.1(I used ServletExamples sample web appliaction)
-Right click on the application and select target "Profile".

Issue:
After some time IDE brings the error message and on refreshing server,IDE hangs.

profile-j2ee:
start-profiled-server-extraargs:
Stopping the profiler
Stopping profiled server
Profiled server stopped
Server is ready waiting for profiler to attach...
Profiler attached, waiting for the server to start up...
/home/kumar/NetBeansProjects/ServletExamples/nbproject/profiler-build-impl.xml:19: The following error occurred while
executing this line:
/home/kumar/NetBeansProjects/ServletExamples/nbproject/profiler-build-impl.xml:30: Starting of server in profile mode
timed-out after 300 secs.
BUILD FAILED (total time: 5 minutes 7 seconds)
Comment 1 dpkumar 2008-11-20 04:28:40 UTC
Created attachment 73935 [details]
Server.log
Comment 2 Jiri Sedlacek 2008-11-20 08:23:55 UTC
It looks like you are mixing two different approaches to Java EE profiling: you've first started the server for direct
attach (using the Start in Profile Mode) action and then invoked the Profile action on the project which is a different
approach to profiling.

The Start in Profile Mode action is designed to be used with the Attach Profiler action, the first action starts server
in direct attach mode and the second action attaches the profiler to the server, which allows the server to start up.
The Profile Project action does the above automatically, it starts the server in profiling mode, deploys the
application, opens it in browser and starts profiling it. For more information on Java EE profiling please see
http://profiler.netbeans.org/docs/help/5.5/profile_j2ee.html, this could also be helpful:
http://blogs.sun.com/nbprofiler/entry/tweaking_profiler_timeouts.

Leaving the issue open for further investigation if anything could be improved on profiler side. Based on the IDE output
and server logfile the server started too long which caused a timeout.
Comment 3 dpkumar 2008-11-21 09:12:03 UTC
I followed steps as you described but still I was not able to profile a web application:

-Regitered GFV21 server.
-Opned a sample web application(Same application that I used prevesiously)
-Selected "Profile " target on the sample application.

Issue:
Still profiler waits to profile a application, but after some time(about 5 min) i am hitting the same issue.
Comment 4 dpkumar 2008-11-21 09:13:27 UTC
Created attachment 73990 [details]
server.log
Comment 5 Jiri Sedlacek 2008-11-21 09:30:58 UTC
There are some suspicious messages in the server logfile:

  recursive call into SystemOutandErrhandler
  java.lang.RuntimeException: recursivecall

I was unable to reproduce the problem using this configuration:

  Windows Vista
  NetBeans IDE 6.5
  GlassFish v2ur2
  JDK 1.6.0_10
  ServletExamples

Will try to reproduce with exactly the same configuration you've used. Could you please attach the IDE logfile? It
contains detailed information about the IDE/profiling session settings and possible exceptions at profiler side.
Comment 6 dpkumar 2008-11-21 09:42:47 UTC
Created attachment 73992 [details]
IDE message.log
Comment 7 Jiri Sedlacek 2008-11-21 11:44:35 UTC
Not reproducible using the following configuration:

  Ubuntu Linux
  NetBeans IDE 6.5
  GlassFish v2.1b60 installed using setup.xml
  JDK 1.6.0_10
  ServletExamples

REPRODUCED using the following configuration:

  Ubuntu Linux
  NetBeans IDE 6.5
  GlassFish v2.1b60 installed using setup-cluster.xml
  JDK 1.6.0_10
  ServletExamples

In both configurations the server logfile contained these lines:

  recursive call into SystemOutandErrhandler
  java.lang.RuntimeException: recursivecall

It looks like a GlassFish bug. Could you please confirm that you are using the cluster setup?

Assigning to yardus for further evaluation.
Comment 8 Jiri Sedlacek 2008-11-21 11:46:02 UTC
Created attachment 74001 [details]
GlassFish threaddump before the timeout
Comment 9 Jiri Sedlacek 2008-11-21 11:46:36 UTC
Created attachment 74002 [details]
NetBeans threaddump before the timeout
Comment 10 dpkumar 2008-11-21 12:26:21 UTC
I used GFv2.1-b60 'ee' version build and used default domain 'domain1' to test.
Comment 11 J Bachorik 2008-11-21 13:24:23 UTC
This is a glassfish related issue - please, take a look at https://glassfish.dev.java.net/issues/show_bug.cgi?id=4551
and vote for that issue if possible. I have been trying to get it fixed for at least half a year with no success.
Comment 12 Jiri Sedlacek 2008-11-21 14:02:31 UTC
As a workaround till fixed you should use non-clustered GlassFish - "standard distribution" installed by ant -f setup.xml.