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.
Summary: | Installer does not register App Server in Servers node | ||
---|---|---|---|
Product: | ide | Reporter: | Mikhail Vaysman <vaysman> |
Component: | Code | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | issues, jglick, ksorokin, pnejedly |
Priority: | P2 | Keywords: | SPACE_IN_PATH |
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | Solaris | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 105470 | ||
Attachments: |
NBI log
Netbeans log |
Description
Mikhail Vaysman
2007-05-23 14:55:33 UTC
please attach installation log (~/.nbi/log/<timestamp>.log) and netbeans log file (~/.netbeans/dev/var/log/messages.log). Created attachment 42895 [details]
NBI log
Created attachment 42896 [details]
Netbeans log
Logs attached. INCOMPLETE keyword removed. Due to the investigations I can say that the issue is in the netbeans.conf file. Now we set the following strings to add appserver instance (on unix): netbeans_default_options="-J-Dcom.sun.aas.installRoot=\"/home/username/ SUNWappserver\" ..." If I change it to the following string then everything works fine: netbeans_default_options="-J-Dcom.sun.aas.installRoot=/home/username/ SUNWappserver ..." *** Issue 105053 has been marked as a duplicate of this issue. *** According to the SystemProperties module the same property com.sun.aas.installRoot in M9 is set to /home/username/ SUNWappserver and in nightly builds to "/home/username/ SUNWappserver" (with quotes) using the netbeans_default_options string in netbeans.conf I do think that the following changes in nbexec have broken the working in m9 functionality of AS/AM integration: http://nbi.netbeans.org/source/browse/core/launcher/unix/nbexec?r1=1.46&r2=1.47 Commit info: 2007-05-15 19:50:27+0000 (2 weeks ago) by jglick Commit message : Stronger quoting of -J* options, meaning you can now pass e.g. -J-Dorg.netbeans.something.Outer$Inner.level=0 (quoted appropriately for your invoking shell) and expect it to work. I`ve written the following class: class Test { public Test() { } public static void main(String[] arguments) { System.out.println("" + System.getProperty("property")); } } > java -Dproperty=VALUE Test VALUE > java -Dproperty="VALUE" Test VALUE > java -Dproperty=\"VALUE\" Test "VALUE" Using the second variant in netbeans.conf is equal to netbeans_default_options="-J-Dproperty=\"VALUE\"" Earlier the value of property was correct (VALUE) In the current implementation it is incorrect ("VALUE"). Since the latest changes in nbexec do not process correctly the quoted values I reassing the issue the launcher and to Jesse specifically. Removing quotes in netbeans.conf for AM_CONFIG_FILE and com.sun.aas.installRoot does not work for me on any *nix. Also removing the "\" before does not help either on Mac, Linux, Solaris. work around works for me now, also must delete user dir after editing netbeans.conf for it to work. It is true that adding e.g. -J-Duser.dir=\"/tmp/foo bar\" into netbeans_default_options in etc/netbeans.conf does not work. However it does not work for me with nbexec 1.47 reverted, either (in fact it is worse). Note that you can pass -J-Duser.dir='/tmp/foo bar' on the command line and it works; the problem is with nb_d_o. Frankly I do not see any way to fix, other than never adding quotes to values in nb_d_o, and rejecting any appserver installation dir using spaces. More clever patches from someone with Bourne shell experience are welcome. I tried various combinations of quotes and backslashes without success. I'm not sure what the significance of the attached test class is. The problem is not in Java code, it is in shell scripts, which cannot very reliably handle spaces or quotes. Well, I assume it would be easier to fix on our side. We wil switch to single quotes (') for wrapping parameter values. And will not use them is there are not spaces in the path. This will give us a reasonable success percentage, I guess. I could not get single quotes to work either. Jesse, I don't know what has happened. Nothing changed on our side and it DID work for M9 and before. I don't know which build was the first with this functionality broken. I will look into it a bit further. Spaces might be not that common, but they are valid and nbexec should be supporting them IMO. So to clarify: my most recent patch just fixed handling of -J* parameters which included substitutable metachars such as $, by single-quoting them. (Obviously params including ' itself would be broken by this change, but I consider that less likely than $.) Parameters just including spaces worked with or without the patch, if you passed them directly on the command line, e.g. .../bin/netbeans -J-Dkey='some value' My patch just made this work too: .../bin/netbeans -J-Dkey='some$value' whereas previously 'key' would be incorrectly set to 'some'. As far as I can tell, parameters with embedded spaces did not work in netbeans_default_options to begin with, i.e. not a regression. I *think* I know how to fix this now, using eval. It's always scary to make any metachar-handling changes in the launcher scripts, since some kind of regression is quite likely, but let's try. Please verify, and I'll see if complaints start coming in. Checking in apisupport/harness/release/launchers/app.sh; /shared/data/ccvs/repository/apisupport/harness/release/launchers/app.sh,v <-- app.sh new revision: 1.12; previous revision: 1.11 done Checking in ide/launcher/unix/netbeans; /shared/data/ccvs/repository/ide/launcher/unix/netbeans,v <-- netbeans new revision: 1.46; previous revision: 1.45 done |