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 102467 - Starting GlassFish fails on Windows
Summary: Starting GlassFish fails on Windows
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2007-04-25 11:45 UTC by Jiri Sedlacek
Modified: 2007-04-27 16:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Server logfile after Start server failure due to quoted AS_JAVA on Windows (5.83 KB, text/plain)
2007-04-25 11:46 UTC, Jiri Sedlacek
Details
proposed patch to fix this bug (4.15 KB, patch)
2007-04-25 15:11 UTC, Tomas Hurka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Sedlacek 2007-04-25 11:45:31 UTC
Windows XP -- seems to be Windows only problem, works fine on Linux & Mac OS X,
JDK 1.6.0_01,
GlassFish v1 or GlasFish v2,
NetBeans IDE Dev (Build 200704241800),
regression since NetBeans IDE Dev (Build 200704231800)

Starting GlassFish for profiling (both Profile Project and Start in Profile 
Mode) fails on Windows due to incorrectly set AS_JAVA in asenv.bat. Since then 
the server is unable to start again even in "normal" mode (Start). This is most 
likely caused by fixing Issue 93395.

Steps to reproduce:

1/ Start IDE, ensure that asenv.bat contains something like:
set AS_JAVA=D:\Software\Java\jdk1.6.0
start GlassFish from Runtime Tab using Start, server starts without problems

2/ Start GlassFish for profiling from Runtime Tab using Start in Profile Mode, 
startup fails, asenv.bat now contains
set AS_JAVA="D:/Software/Java/jdk1.6.0"
which causes the problem, appropriate message in server log is
Cannot run program ""D:/Software/Java/jdk1.6.0"\bin\java"

3/ Remove the quotes from asenv.bat manually and try to start GlassFish from 
Runtime Tab using Start, starting fails because quotes are automatically added 
to asenv.bat again.

The only workaround to start the server without profiling is to restart the IDE 
and remove quotes from asenv.bat manually and *don't try to profile GlassFish*.

I believe that AS_JAVA shouldn't be in quotes on Windows - you can see from the 
logfile that GlassFish itself puts later the value in quotes. So the suggested 
fix would be: do not add quotes to AS_JAVA on Windows.
Comment 1 Jiri Sedlacek 2007-04-25 11:46:56 UTC
Created attachment 41620 [details]
Server logfile after Start server failure due to quoted AS_JAVA on Windows
Comment 2 Vince Kraemer 2007-04-25 14:54:29 UTC
will resolve today
Comment 3 Tomas Hurka 2007-04-25 15:11:30 UTC
Created attachment 41635 [details]
proposed patch to fix this bug
Comment 4 Vince Kraemer 2007-04-25 15:58:55 UTC
the patch looks good.
Comment 5 Vince Kraemer 2007-04-25 21:08:31 UTC
run into another issue after applying the patch...

looks like a different quoting issue for the arguments passed to the JVM...
Comment 6 Vince Kraemer 2007-04-25 21:41:54 UTC
issue 102323

applied work-around and the profiling works...
Comment 9 Alexander Kouznetsov 2007-04-27 16:15:40 UTC
Seems to be fixed. 
Was not able to reproduce with Profiler 070426
NetBeans IDE 6.0 Preview (M9, build 070427)
1.6.0; Java HotSpot(TM) Client VM 1.6.0-b105
Windows XP version 5.1 running on x86
ru_RU (nb); Cp1251