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 213570 - Cannot set multiple options on Platform tab
Summary: Cannot set multiple options on Platform tab
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: WebLogic (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 01:52 UTC by rym002
Modified: 2012-06-09 04:36 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 rym002 2012-06-05 01:52:20 UTC
When setting multiple values from the Platform tab, all values are not passed to startWebLogic.cmd

Setting Java VM passes envrionment variable JAVA_VENDOR, but does not pass in JAVA_OPTIONS if set.

Setting VM Memory Options passes environment variable USER_MEM_ARGS, but does not pass JAVA_OPTIONS if set and does not pass JAVA_VENDOR if set.

I started using Weblogic with Netbeans version 7.0 and have been seeing this issue since then. I am currently running 7.2Beta. Running Weblogic 10.3.
Comment 1 rym002 2012-06-08 04:53:12 UTC
I think this is the issue


        protected ExternalProcessBuilder initBuilder(ExternalProcessBuilder builder) {
            ExternalProcessBuilder result = builder;
            
            result = setJavaOptionsEnv( result );
            String vendor = dm.getInstanceProperties().getProperty(WLPluginProperties.VENDOR);
            if (vendor != null && vendor.trim().length() >0) {
                result = builder.addEnvironmentVariable(JAVA_VENDOR_VARIABLE,         
                        vendor.trim());
            }
            String memoryOptions = dm.getInstanceProperties().getProperty(
                    WLPluginProperties.MEM_OPTS);
            if (memoryOptions != null && memoryOptions.trim().length() >0) {
                result = builder.addEnvironmentVariable(MEMORY_OPTIONS_VARIABLE,
                        memoryOptions.trim());
            }  
            return result;
        }


That should probably be

        protected ExternalProcessBuilder initBuilder(ExternalProcessBuilder builder) {
            ExternalProcessBuilder result = builder;
            
            result = setJavaOptionsEnv( result );
            String vendor = dm.getInstanceProperties().getProperty(WLPluginProperties.VENDOR);
            if (vendor != null && vendor.trim().length() >0) {
                result = result.addEnvironmentVariable(JAVA_VENDOR_VARIABLE,         
                        vendor.trim());
            }
            String memoryOptions = dm.getInstanceProperties().getProperty(
                    WLPluginProperties.MEM_OPTS);
            if (memoryOptions != null && memoryOptions.trim().length() >0) {
                result = result.addEnvironmentVariable(MEMORY_OPTIONS_VARIABLE,
                        memoryOptions.trim());
            }  
            return result;
        }

Seems the builder returned from addEnvironmentVariable is not being referenced and result is being overwritten with the last variable set.
Comment 2 Petr Hejl 2012-06-08 09:30:57 UTC
Nice catch.
Fixed in web-main 6e54f40f3088.
Comment 3 Quality Engineering 2012-06-09 04:36:06 UTC
Integrated into 'main-golden', will be available in build *201206090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6e54f40f3088
User: Petr Hejl <phejl@netbeans.org>
Log: #213570 - Cannot set multiple options on Platform tab