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 166626 - bad catalina_nbprofiler.sh created
Summary: bad catalina_nbprofiler.sh created
Status: RESOLVED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All Unix
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-05 19:07 UTC by summersb
Modified: 2009-11-13 06:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
bad catalina_sbprofile.sh file (285 bytes, text/plain)
2009-06-05 19:08 UTC, summersb
Details
Image of tomcat/bin directory (67.23 KB, image/png)
2009-11-08 13:40 UTC, summersb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description summersb 2009-06-05 19:07:12 UTC
I wanted to profile an external tomcat 6.0.18 but the catalina_nbprofiler.sh file create is broken
It has the windows specific tomcat entry not the Mac OS X one

Reproduce
Run Attach Profiler
Click change at the bottom
Select J2EE Web/App Server
Select Tomcat 6.x
Select local and direct then next
Click next
Leave on Automatic click next
Enter path to tomcat click next
Click perform
The generated catalina_nbprofiler.sh script has path-to-tomcat/bin/Tomcat6.exe --.....
On the mac it should have catalina.sh

Work around
copy the first line and export variables
run catalina.sh run
Comment 1 summersb 2009-06-05 19:08:29 UTC
Created attachment 83249 [details]
bad catalina_sbprofile.sh file
Comment 2 summersb 2009-06-05 19:09:10 UTC
I am using 6.7 RC1
Comment 3 Tomas Hurka 2009-11-06 10:29:58 UTC
it works for me. How did you installed Tomcat? What is the content of your tomcat/bin directory? 
Comment 4 summersb 2009-11-08 13:39:52 UTC
My tomcat is unzipped into /usr/local/apache-tomcat-6.0.18 with a symlink from /usr/local/apache-tomcat which is how I select it in the netbeans profile setup.

This is the file generated

CATALINA_OPTS=-agentpath:/var/folders/HZ/HZ0zsdCpHdGf0jkhrk-Xfk+++TI/-Tmp-/NBProfiler7020092720326283163.link/deployed/jdk16/mac/libprofilerinterface.jnilib=/var/folders/HZ/HZ0zsdCpHdGf0jkhrk-Xfk+++TI/-Tmp-/NBProfiler7020092720326283163.link,5140
/usr/local/apache-tomcat/bin/Tomcat6.exe //TS//Tomcat6 --JavaHome=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home --JvmOptions %CATALINA_OPTS%

On mac I don't have Tomcat6.exe that runs

I am now running an 6.7.1 and this still occurs

Attaching image of my tomcat/bin
Comment 5 summersb 2009-11-08 13:40:30 UTC
Created attachment 90559 [details]
Image of tomcat/bin directory
Comment 6 Tomas Hurka 2009-11-09 09:18:53 UTC
My installation of tomcat 6.0.18 on Mac OS X also has the following files in bin/ directory:

-rw-r--r--@ 1 user  staff  9915 Jul 22  2008 catalina.bat
-rw-r--r--@ 1 user  staff  1342 Jul 22  2008 cpappend.bat
-rw-r--r--@ 1 user  staff  2104 Jul 22  2008 digest.bat
-rw-r--r--@ 1 user  staff  4947 Jul 22  2008 service.bat
-rw-r--r--@ 1 user  staff  3307 Jul 22  2008 setclasspath.bat
-rw-r--r--@ 1 user  staff  2096 Jul 22  2008 shutdown.bat
-rw-r--r--@ 1 user  staff  2097 Jul 22  2008 startup.bat
-rw-r--r--@ 1 user  staff  3189 Jul 22  2008 tool-wrapper.bat
-rw-r--r--@ 1 user  staff  2101 Jul 22  2008 version.bat

Do you know why are you missing those files? They are part of apache-tomcat-6.0.18.tar.gz downloaded from http://tomcat.apache.org/download-60.cgi
Comment 7 summersb 2009-11-09 09:28:33 UTC
I probably deleted those because they are windows specific files
Comment 8 Tomas Hurka 2009-11-09 09:31:35 UTC
Ok, if you also delete all .exe files, which are also windows specific, the tomcat integration will start working again.
Comment 9 Tomas Hurka 2009-11-10 06:22:12 UTC
Tomcat detection code improved.

changeset:   152575:d2f3340935dc
user:        Tomas Hurka <thurka@netbeans.org>
date:        Tue Nov 10 14:19:45 2009 +0100
summary:     bugfix #166626, look for the tomcat.exe only on Windows platform
Comment 10 Quality Engineering 2009-11-13 06:43:56 UTC
Integrated into 'main-golden', will be available in build *200911131401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/d2f3340935dc
User: Tomas Hurka <thurka@netbeans.org>
Log: bugfix #166626, look for the tomcat.exe only on Windows platform