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 212011 - Cannot profile web application on GFv3
Summary: Cannot profile web application on GFv3
Status: VERIFIED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Ide (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: J Bachorik
URL:
Keywords: SPACE_IN_PATH
Depends on:
Blocks:
 
Reported: 2012-05-03 12:01 UTC by Jiri Skrivanek
Modified: 2012-07-02 11:59 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log. (75.75 KB, text/plain)
2012-05-03 12:01 UTC, Jiri Skrivanek
Details
Server and Ant logs. (1.89 KB, text/plain)
2012-05-03 12:02 UTC, Jiri Skrivanek
Details
New stack trace. (1.05 KB, text/plain)
2012-06-25 08:48 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2012-05-03 12:01:53 UTC
Created attachment 119023 [details]
IDE log.

It is not possible to profile web application. To reproduce:

- install 7.2 beta (http://smetiste.cz.oracle.com/builds/netbeans/7.2/beta/2012-05-02_15-16-04/ml/start.html?platform=windows&lang=en&option=javaee) to default location on Windows 7 64
- create web project with GlassFish (C:\Program Files\glassfish-3.1.2)
- right-click project node and choose Profile
- click Run in dialog
- it fails and progress dialog "Connecting to the target VM..." stays opened (see attached logs)

Product Version: NetBeans IDE 7.2 Beta (Build 201205021516)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
User directory: C:\Users\jskrivanek\AppData\Roaming\NetBeans\7.2beta
Comment 1 Jiri Skrivanek 2012-05-03 12:02:20 UTC
Created attachment 119024 [details]
Server and Ant logs.
Comment 2 Vince Kraemer 2012-05-03 18:29:33 UTC
tomas: please investigate this
Comment 3 Vince Kraemer 2012-05-15 21:54:04 UTC
could not replicate with recent pull on Mac OS X
Comment 4 Vince Kraemer 2012-05-16 14:53:31 UTC
(In reply to comment #3)
> could not replicate with recent pull on Mac OS X

Note: this is just an FYI.  I am not actively working this issue. Just trying to make sure it isn't a P1
Comment 5 Vince Kraemer 2012-05-16 18:58:56 UTC
looks like a space-in-path issue to me.
Comment 6 TomasKraus 2012-05-21 10:14:08 UTC
I was also unable to reproduce this with NB 7.2 build on Linux with local GlassFish configured. Will give it another try on Windows this afternoon.
Comment 7 TomasKraus 2012-05-21 11:59:30 UTC
Targeting to 7.2. If Vince is true, this fix won't take long.
Comment 8 TomasKraus 2012-05-22 08:11:29 UTC
Reproduced on Windows machine with glassfish in C:\Program files\gf-312 directory.
Application was deployed and opened in Firefox (http://localhost:8080/WebApplicationTest/).
In NetBeans 'Connecting to the target VM...' window stays opened.
Comment 9 Jiri Skrivanek 2012-06-05 09:13:22 UTC
Any progress with this bug? Probably not only space-in-path issue. Reproduced also with GlassFish in C:\Users\jskrivanek\GlassFish_Server the following way:

- create Java EE 6 web project with GlassFish server
- right-click project node and choose Profile
- wait until profiling is started and browser is opened
- stop profiling (menu item "Profile|Stop Profiling Session")
- again right-click project node and choose Profile
- server is not started and it fails with message

compile-jsps:
In-place deployment at D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web
deploy?DEFAULT=D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web&name=WebApplication2&contextroot=/WebApplication2&force=true failed. Instance is not GlassFish Server 3+.

Product Version: NetBeans IDE Dev (Build 201206050001)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 10 Vince Kraemer 2012-06-06 05:34:20 UTC
This looks and reads like a different bug to me.  I opened http://netbeans.org/bugzilla/show_bug.cgi?id=213640 to track it instead of mixing multiple bugs into this one issue.

(In reply to comment #9)
> Any progress with this bug? Probably not only space-in-path issue. Reproduced
> also with GlassFish in C:\Users\jskrivanek\GlassFish_Server the following way:
> 
> - create Java EE 6 web project with GlassFish server
> - right-click project node and choose Profile
> - wait until profiling is started and browser is opened
> - stop profiling (menu item "Profile|Stop Profiling Session")
> - again right-click project node and choose Profile
> - server is not started and it fails with message
> 
> compile-jsps:
> In-place deployment at
> D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web
> deploy?DEFAULT=D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web&name=WebApplication2&contextroot=/WebApplication2&force=true
> failed. Instance is not GlassFish Server 3+.
> 
> Product Version: NetBeans IDE Dev (Build 201206050001)
> Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
> System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 11 TomasKraus 2012-06-21 12:04:59 UTC
I tested this scenario again today and I'm unable to reproduce this issue with last 7.2 build.
Jiri, can you please re-test it again to see if it's still freezes after 'run'?
Comment 12 Petr Hejl 2012-06-22 11:14:43 UTC
I believe this issue and issue #213640 have a common cause. So the patch attached in #213640 should hopefully solve this as well.
Comment 13 Petr Hejl 2012-06-22 14:35:43 UTC
Jirko, can you also verify this one? It should be fixed by 74f26d341f9b done for issue #213640.
Comment 14 Jiri Skrivanek 2012-06-25 08:47:55 UTC
Still reproducible in dev build 201206250002 and 7.2rc1.
Comment 15 Jiri Skrivanek 2012-06-25 08:48:17 UTC
Created attachment 121286 [details]
New stack trace.
Comment 16 Petr Hejl 2012-06-25 12:21:56 UTC
Looks like the agent path is not properly escaped. So the problem is space in path of NB location.

Error occurred during initialization of VM
agent library failed to init: C:\Program Files\NetBeans Dev 201206250002\profiler\lib\deployed\jdk16\windows-amd64\profilerinterface.dll
Profiler Agent: Initializing...
Profiler Agent: Options: >C:\Program<
Profiler Agent: -agentpath:<PATH>/profilerinterface should be called with two parameters:
Profiler Agent: path to Profiler agent libraries and port number, separated by comma, for example:
Profiler Agent: java -agentpath:/mypath/profilerinterface=/home/me/nb-profiler-server/profiler-ea-libs,5140
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)
INFO: Grizzly Framework 1.9.46 started in: 109ms - bound to [0.0.0.0:3700]
INFO: Grizzly Framework 1.9.46 started in: 78ms - bound to [0.0.0.0:7676]
INFO: Grizzly Framework 1.9.46 started in: 109ms - bound to [0.0.0.0:4848]
INFO: Grizzly Framework 1.9.46 started in: 140ms - bound to [0.0.0.0:8181]
INFO: Grizzly Framework 1.9.46 started in: 218ms - bound to [0.0.0.0:8080]
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: GlassFish Server Open Source Edition 3.1.2 (23) startup time : Felix (16 860ms), startup services(3 015ms), total(19 875ms)
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://PHEJL-CZ.cz.oracle.com:8686/jndi/rmi://PHEJL-CZ.cz.oracle.com:8686/jmxrmi
INFO: Hibernate Validator 4.2.0.Final
INFO: Grizzly Framework 1.9.46 started in: 15ms - bound to [0.0.0.0:8080]
INFO: unable to read instance state file C:\Users\phejl\AppData\Roaming\NetBeans\dev\config\GF3\domain1\config\.instancestate, recreating
INFO: Grizzly Framework 1.9.46 started in: 16ms - bound to [0.0.0.0:8181]
Comment 17 Jiri Skrivanek 2012-06-25 13:01:39 UTC
Yes, I can replicate the problem when NetBeans is installed in folder with space in path.
Comment 18 J Bachorik 2012-06-27 07:58:22 UTC
This issue is glassfish specific. Tomcat, JBoss and Weblogic can process the profiler jvm args in its current form.
Comment 19 J Bachorik 2012-06-27 08:08:51 UTC
fixed in http://hg.netbeans.org/profiler-main/rev/05a657e0a8d5
Comment 20 Jiri Skrivanek 2012-06-27 10:02:03 UTC
Verified in patched trunk build 201206270002. Please, transplant to release72 branch till COB today.
Comment 21 Tomas Hurka 2012-06-27 12:04:50 UTC
The patch looks OK. It can be integrated into release72 branch.
Comment 22 Tomas Hurka 2012-06-27 14:48:15 UTC
Transplanted to release72 branch,


changeset:   232332:c40e68474b18
branch:      release72
user:        Jaroslav Bachorik <yardus@netbeans.org>
date:        Wed Jun 27 10:00:15 2012 +0200
summary:     #212011: Changing escaping the profiler jvm agent arg to make glassfish happy
Comment 23 Quality Engineering 2012-06-28 05:08:27 UTC
Integrated into 'releases', will be available in build *201206272359* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/c40e68474b18
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #212011: Changing escaping the profiler jvm agent arg to make glassfish happy
(transplanted from 05a657e0a8d5137a290676fe98b5ff3afd7e1b80)
Comment 24 Jiri Skrivanek 2012-06-28 08:04:40 UTC
Verified in NetBeans IDE 7.2 RC1 (Build 201206272359).
Comment 25 Quality Engineering 2012-07-02 11:59:25 UTC
Integrated into 'main-golden', will be available in build *201207020907* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/05a657e0a8d5
User: Jaroslav Bachorik <yardus@netbeans.org>
Log: #212011: Changing escaping the profiler jvm agent arg to make glassfish happy