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 110272 - netbeans inserts invalid value for jvm-option http.nonProxyHosts
Summary: netbeans inserts invalid value for jvm-option http.nonProxyHosts
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Nitya Doraisamy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-19 11:51 UTC by raharsha
Modified: 2007-09-28 05:56 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 raharsha 2007-07-19 11:51:50 UTC
See glassfish issue

https://glassfish.dev.java.net/issues/show_bug.cgi?id=3360

This is caused by netbeans inserting the jvm option without quotes when the jvm option value contains a pipe character
("|"). This cause all further asadmin create-jvm-options command to fail. 

See also the origin of this feature in netbeans. 

http://www.netbeans.org/issues/show_bug.cgi?id=74321
Comment 1 Lukas Jungmann 2007-07-19 12:45:46 UTC
"|" is valid separator for hosts in nonProxyhosts property.
" " is the character which is invalid ("host1*| .domain.com*|") - How did a space got there? What is your proxy setting
in the IDE? In your OS? Did you somehow modify them?

BTW: AFAIK space is not valid char in the domain name nor in the IP address...
Comment 2 raharsha 2007-07-19 13:22:03 UTC
You are right " " is the invalid character. It has taken it from Internet settings on windows. My settings for non proxy
hosts were

wstrust;.sfbay.sun.com;129.158.172.111;.india.sun.com;wstrust.india.sun.com

This got converted to the following entry in domain.xml

-Dhttp.nonProxyHosts=wstrust*| .sfbay.sun.com*| 129.158.172.111*| .india.sun.com*|
wstrust.india.sun.com*|<local>*|localhost|127.0.0.1|wssc|wssc.india.sun.com

I have also checked the checkbox "Bypass proxy server for local addresses" . So either java or netbeans or IE has taken
these settings and this resulted in a invalid option. You can also see invalid value for <local>. 

As you can see my proxy settings are correct without any whitespaces. 
Comment 3 Nitya Doraisamy 2007-09-27 05:07:11 UTC
The plugin does not do any conversions while setting the proxy values. The value returned by
System.getProperty("http.nonProxyHosts") is set on the jvm options. A comma seperated list is returned with '|' instead
of commas and the spaces depend on what the user settings were.

eg. 
'<local>*, localhost, 127.0.0.1, india3' is returned as '<local>*|localhost|127.0.0.1|india3'

'<local>*,  localhost, 127.0.0.1, india3' is returned as '<local>*| localhost|127.0.0.1|india3' 

Will look into the <local> becoming &lt;local&gt; when set in jvm options
Comment 4 Nitya Doraisamy 2007-09-27 05:18:40 UTC
<local> appears as &lt;local&gt; when you view in xml editor but the settings in domain is actually <local> 
as seen in jvm option editor in runtime tab and admin-gui

Marking issue as invalid
Comment 5 raharsha 2007-09-27 07:02:29 UTC
space is a valid character in IE non proxy hosts setting, whereas for jvm options it is invalid. You have to strip it
out before inserting into domain.xml

admin gui may show <local> because it is displayed on browser and &lt and &gt are valid escape characters in html, but
not in xml. 
Comment 6 Nitya Doraisamy 2007-09-27 18:18:08 UTC
If you see in the jvm editor, <local> is displayed. The plugin does not do any translations of value returned by server. 
Similarly admin-cli shows value as <local>. The plugin is passing <local> but it is translated to &lt;local&gt; and vice
versa by the server api's.