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 169764 - com.sun.aas.installRoot is being set by default
Summary: com.sun.aas.installRoot is being set by default
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 9 (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on: 170005
Blocks:
  Show dependency tree
 
Reported: 2009-08-04 01:37 UTC by emiddio
Modified: 2009-08-07 18:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
netbeans.conf for nb671 (1.64 KB, text/plain)
2009-08-06 19:27 UTC, emiddio
Details
shows debugging variables and location of build.xml (244.10 KB, image/jpeg)
2009-08-06 19:28 UTC, emiddio
Details
shows debugging variables and servers (207.89 KB, image/jpeg)
2009-08-06 19:29 UTC, emiddio
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emiddio 2009-08-04 01:37:56 UTC
com.sun.aas.installRoot is being set before 1st line of build.xml is being called.

its being set to the 1st server i have in the servers list -- i have 10 different sun app servers configured.
which is c:\sun\as82 for an 8.2 server -- the 1st one in the list.

from favorites i select the build.xml, then choose debug core (the default target);

the ant debugger stops at line 13 -- the line of
  <property name="hellowar.home" value="."/> 


am i doing something wrong ?
thanks


the entire build.xml is below:
<!--
 Copyright 2004-2005 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.
-->

<!--DOCTYPE project [
  <!ENTITY sampleCommonCommands SYSTEM "../common-ant.xml">
]-->

<project name="hello-example" default="core" basedir=".">
  
  <!-- Configure the context path for this application --> 
  <property name="hellowar.home" value="."/> 
 
  <property name="hellowar.web.name" value="hello"/>

  <!-- Property names to passed to common targets -->  
  <property name="binary.name" value="${hellowar.web.name}"/>  
  <property name="sample.name" value="quickstart"/>
  <property name="application.type.war" value="true"/>
  
  <property name="sample.home" value="../" />

  <!--geb &sampleCommonCommands; -->
  <import file="../common-ant_1.xml"/>
    
  <target name="core" depends="war"
     description="Copy HTML and JSP pages and build hello.war file" >
  </target>  
  
  <target name="war" depends="init_common,create_war_common"/>
  
  <!-- ======================================================= -->
  <!-- Deploy target.                                          -->
  <!-- ======================================================= -->
  <target name="deploy" depends="select_binary_common, setpassword, deploy_common"/>
  
  <!-- ======================================================= -->
  <!-- Undeploy target.                                        -->
  <!-- ======================================================= -->
  <target name="undeploy" depends="init_common, setpassword, undeploy_common"/>
  
  <target name="clean" depends="clean_common"/>            

  <!-- ======================================================= -->
  <!-- Verify target.                                          -->
  <!-- ======================================================= -->
  <target name="verify" depends="select_binary_common,verify_common" />  

  <!-- ======================================================= -->
  <!-- Javadocs target.                                        -->
  <!-- ======================================================= -->
  <target name="javadocs" depends="javadocs_noop_common"/>   

  <target name="all"      depends="core,javadocs,verify,deploy"/>
</project>
Comment 1 Jesse Glick 2009-08-04 16:14:00 UTC
You would need to supply a complete script (as attachment please, not inline) together with any auxiliary files such as
<import>ed scripts or properties files.

I suspect whatever problem you are having (unclear from description) is a result of using tasks such as <property>
outside of any target, rather than keeping them inside some kind of "init" target.
Comment 2 emiddio 2009-08-04 18:31:41 UTC
ok -- rather than do that i created a new build.xml file -- its only 4 lines long:

<project name="hello-example" default="core" basedir=".">
    <property name="hellowar.home" value="."/>
    <target name="core" />
</project>

when i select build.xml and right click, choose 'debug target/core' the debugger stops on line 2 above,
the <property.../> line.

at that point com.sun.aas.installRoot is already set to a value i do not want.

Comment 3 Jesse Glick 2009-08-04 18:49:01 UTC
Well the property is not just coming from nowhere. Ant always inherits system properties, so something in your IDE
configuration is I presume setting this system property at some time for some reason. I do not see this property set in
a development build with all features enabled (using System Properties Viewer module from dev AU to check). Did you
install Glassfish as part of your IDE installation? Does your etc/netbeans.conf define this property? Is it mentioned in
your log file in the "Input arguments" section?
Comment 4 emiddio 2009-08-04 19:04:07 UTC
were on the same page -- where is it coming from; i do have 9 separate sun servers configured
in the services tab -- from as8.1 thur gfv3prelude;

the very 1st one that shows up in the services tab is named AS82 from c:/sun/AS82 -- which is
what com.sun.aas.installRoot is being set to.

but i am trying to do a build where -- from sun samples -- where com.sun.aas.installRoot is
set in the build/property/xml files and i am trying to use a different server than the 1st one,
ie -- not AS82.
Comment 5 Jesse Glick 2009-08-04 19:12:18 UTC
Probably the code which registers the GF instance should not be setting a system property in the IDE. In the meantime, I
guess you should just change the build scripts to use a different property name.
Comment 6 Vince Kraemer 2009-08-04 19:57:16 UTC
The installRoot property is used to support autoregistration when the user installs the IDE/AppServer 'bundle'.

is there a link to the 'sun samples' to which you refer?

I am really struggling to see what the problem you are actually running into...

Can you provide step by step instructions that would help me reproduce the issue that is created BECAUSE the installRoot
property is set?
Comment 7 emiddio 2009-08-04 20:25:11 UTC
when you install glassfishv2.1 i think the samples are present -- if not updatecenter provides them; in this particular
case i was messing around with installRoot/samples/quickstart/build.xml;

did you read the full history of this thread? i have 8 separate sun appservers installed in servers tab,
as8l.1, 8.2, 9.0, gfv2ur2, gfv2.1, gfv3prelude and some dups for sanity checking of mods i make.

also to simplify i made a 4 line build.xml to demonstrate the problem.
<project name="hello-example" default="core" basedir=".">
    <property name="hellowar.home" value="."/>
    <target name="core" />
</project>

the samples that come with as81, as82 as90 gfv2 gfv2.1 -- if you search them -- they all make reference to
com.sun.aas.installRoot in their respective common.properties, common-ant.xml files.

for sgesv2.1(sun glassfish enterprise server v2.1) the refs are in samples/bp-project/common-properties.xml,
samples/common.properties, samples/common-ant.xml, and quickstart/clusterjsp/build.xml, and a bunch of
private.properties in the samples/javaee5 subdirs -- in respective nbprojects.

imagine having more than one gfv2.1 installed or 1 gfv2.1 and 1 SJAS8.2 installed; samples in both servers
reference com.sun.aas.installRoot;

Comment 8 Vince Kraemer 2009-08-04 22:21:46 UTC
what happens if you open the NetBeans projects associated with samples... are you able to get the sample to execute on
the server of your choice, as you expect?
Comment 9 emiddio 2009-08-04 23:08:57 UTC
yes they work;

i found the following:
sgesv2.1 install installs samples/quickstart, samples/common-ant.xml, samples/common.properties
and use com.sun.aas.installRoot as in below:

com.sun.aas.derbyRoot=C:/Sun/sgesv2.1/javadb
com.sun.aas.webServicesLib=C:/Sun/sgesv2.1/lib
com.sun.aas.installRoot=C:/Sun/sgesv2.1
com.sun.aas.domains.dir=${com.sun.aas.installRoot}/domains
com.sun.aas.imqLib=C:/Sun/sgesv2.1/imq/lib
com.sun.aas.imqInstallDir=${com.sun.aas.imqLib}/../
com.sun.aas.imqHome=${com.sun.aas.domains.dir}/${domain.name}/imq
com.sun.aas.imqBinDir=${com.sun.aas.installRoot}/imq/bin
com.sun.aas.imqUserMgr=${com.sun.aas.imqBinDir}/imqusermgr
com.sun.aas.javaRoot=C:/Program Files/Java/jdk1.6.0_14

the other samples that result in samples/bp-project, samples/javaee5 -- all
come from the updatecenter titles java ee5 samples -- and they all use
com.sun.aas.installRoot in a from like  xxx= ... -Dcom.sun.aas.installRoot="..."

and its used in common-properties.xml like:
  <condition property="javaee.home" value="${com.sun.aas.InstallRoot}">
    <and>
      <not><isset property="javaee.home"/></not>
      <isset property="com.sun.aas.InstallRoot"/>
    </and>
  </condition>  

------------------
it appears that most of the projects designed as netbeans projects -- not free form projects
work and do not depend upon the user setting the value of com.sun.aas.installRoot;

but most of those projects are javaee5+ -- almost all samples/examples/tutorials in j2ee 1.4 -- are
asant.bat based builds which do use com.sun.aas.installRoot;

i just checked a javaee5tutorial tree i had been working on -- its got 84 references -- but none depend
upon the user setting the value like in j2ee1.4 asant world;


Comment 10 emiddio 2009-08-06 19:27:04 UTC
Created attachment 85922 [details]
netbeans.conf for nb671
Comment 11 emiddio 2009-08-06 19:28:22 UTC
Created attachment 85923 [details]
shows debugging variables and location of build.xml
Comment 12 emiddio 2009-08-06 19:29:15 UTC
Created attachment 85924 [details]
shows debugging variables and servers
Comment 13 emiddio 2009-08-06 19:32:29 UTC
after reading the update to issue 170005 i thought great i can edit netbeans.conf so my debugging variable will
be what i want it to be; but after inspecting netbeans.conf i see that the value set there is NOT the value that
shows up in the debugging variables.

i dont know how netbeans works inside -- but --- i submitted 3 attached files -- by inspecting them you can see
that com.sun.aas.installRoot is being set to c:/sun/AS82, and its set to c:/sun/glassfish-v2.1 in netbeans.conf.

so there is still and issue here
Comment 14 Quality Engineering 2009-08-07 05:43:40 UTC
Integrated into 'main-golden', will be available in build *200908070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bc55e5b64d53
User: Vince Kraemer <vkraemer@netbeans.org>
Log: #169764: do not set com.sun.aas.installRoot since it overlaps with an ant property
Comment 15 Vince Kraemer 2009-08-07 18:29:07 UTC
Based on 'Additional comments from emiddio Thu Aug 6 18:32:29 +0000 2009'... this is unlikely to be directly dependent
on issue 170005... so I will break that link.

It also seems very likely that the change that will address this is now in the nightly build... so i am going to close
this as FIXED.

Please reopen the issue with step by step instructions on how to reproduce the problem, if you still run into this with
recent nightly builds./