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 67428 - Using instructions from attach wizard to profile application with space in the path fails
Summary: Using instructions from attach wizard to profile application with space in th...
Status: CLOSED FIXED
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-24 14:40 UTC by iformanek
Modified: 2007-02-20 18:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description iformanek 2005-10-24 14:40:17 UTC
Using instructions from attach wizard to profile application with space in the 
path fails:

C:\Program Files\netbeans-4.1\bin>nb.exe -J-agentpath:"C:\Program 
Files\netbeans-5.0beta\profiler1\lib\deployed\jdk15\windows\prof
ilerinterface.dll=\"C:\Program Files\netbeans-5.0beta\profiler1\lib\"",5140
Agent_OnLoad called...
-agentpath:<PATH>/profilerinterface should be called with two parameters:
path to Profiler agent libraries and port number, separated by comma, for 
example:
java -agentpath:/mypath/profilerinterface=/home/me/nb-profiler-server/profiler-
ea-libs,5140
Error occurred during initialization of VM
agent library failed to init: C:\Program Files\netbeans-5.0beta\profiler1
\lib\deployed\jdk15\windows\profilerinterface.dll
Comment 1 iformanek 2005-10-24 14:41:35 UTC
A workaround is to remove the quotes and use 8.3 DOS filenames (Progra~1 
instead of Program Files)
Comment 2 iformanek 2005-10-25 14:47:54 UTC
As an immediate workaround, I suggest that the attach wizard suggests a text 
using the 8.3 dos names, without the quotes.

The bug can actually be down in JVMTI in passing parameters to the agent, we 
will need to investigate this more.
Comment 3 Jiri Sedlacek 2005-11-04 17:34:05 UTC
Actually converting long filenames to 8.3 format is not as straightforward as 
it seems, for concrete details see a Java Forum discussion about it at 
http://forum.java.sun.com/thread.jspa?threadID=517914&messageID=2473515.

It seems that the only reliable solution is to use a native API Windows 
call 'GetShortPathName', concrete implementation can be found at 
http://dolf.trieschnigg.nl/eightpointthree/eightpointthree.html.

As this is more complicated than expected, maybe it does make sense to only add 
a hint to integration instructions that 8.3 filenames should be used if 
problems occur.
Comment 4 Jiri Sedlacek 2005-11-07 13:11:49 UTC
Added a warning to integration instructions for Java Application and Generic 
Web/App Server that 8.3 paths should be used if the agent fails to start using 
spaces in path. Concrete targets covered by other IntegrationProviders are 
tested to work with spaces in path.

Fixed for M10.
Comment 5 ehucka 2006-10-09 12:10:22 UTC
Verification of old issues.
Comment 6 Alexander Kouznetsov 2007-02-20 10:13:00 UTC
Closing old issues
Comment 7 Alexander Kouznetsov 2007-02-20 18:08:03 UTC
Reverting to original Target Milestone value changed by mistake. Sorry for
inconvenience.