ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Toomey <toome...@yahoo.com>
Subject Problems with <property environment="myenv"> on W2K (was: Problems with Execute on W2K)
Date Wed, 13 Feb 2002 21:36:53 GMT
Yes, I had heard that as well, the question is why.

So here's another clue, I do a simple test in my build.xml:

<target name="testpath" >
<property environment="myenv" />
<echo message="PATH = ${myenv.Path}" />
</target>

If I run my server in a command prompt, I get:

[property] Loading Environment myenv.
Setting project property: myenv.HOMEDRIVE -> c:
Setting project property: myenv.JAVA_HOME -> d:\programs\jdk1.3.1_02
.
.
.
Setting project property: myenv.Path ->
\weblogic5\bin;d:\programs\jdk1.3.1_02\bin;d:\programs\jdk1.3.1_02\jre\bin\classic;c:\winnt;c:\winnt\system32;D:\orant\bin;"d:\PROGRAM
FILES\PVCSVM671\VM\win32\bin";d:\PVCS-Tracker\Tracker\nt;"D:\Program
Files\NFSGateway\Accessories\";"D:\Program
Files\NFSGateway\NFSClient";d:\programs\jakarta-ant-1.4.1\bin
[echo] PATH =
\weblogic5\bin;d:\programs\jdk1.3.1_02\bin;d:\programs\jdk1.3.1_02\jre\bin\classic;c:\winnt;c:\winnt\system32;D:\orant\bin;"d:\PROGRAM
FILES\PVCSVM671\VM\win32\bin";d:\PVCS-Tracker\Tracker\nt;"D:\Program
Files\NFSGateway\Accessories\";"D:\Program
Files\NFSGateway\NFSClient";d:\programs\jakarta-ant-1.4.1\bin

If I run the server as a Service, I get:

Setting project property: myenv.JAVA_HOME -> d:\programs\jdk1.3.1_02
.
.
.
(all those properties from above, except for Path)

Property ${myenv.Path} has not been set
[echo] PATH = ${myenv.Path}

Any idea why a Service woiuld not have access to the system Path?

--- Paul Cody <paul.cody@lucida.com> wrote:
> AFAIK Win32Process.create error 2 exceptions are always PATH
> problems.
> Check that whatever you are launching is in the PATH.  Someone
> probably
> modified the PATH during the session that WL was started or the
> Tivoli
> installation mucked your PATH.
> 
> Paul
> 
> > -----Original Message-----
> > From: Kevin Toomey [mailto:toomeykh@yahoo.com]
> > Sent: Tuesday, February 12, 2002 5:11 PM
> > To: ant-user@jakarta.apache.org
> > Subject: Problems with Execute on W2K
> > 
> > 
> > Hello,
> > 
> > I've been banging my head against the wall on this one. Hopefully
> > someone can point me in a direction. I apologize in advance for the
> > length of the post, but I don't want to leave out what could be an
> > important detail. 
> > 
> > I've got an application that runs within WebLogic that we use to
> build
> > applications using Ant. It's an NT box running W2K, WebLogic 5.1.0
> (as
> > a service) Ant1.4.1, and Java1.3.1_02.
> > The app has a JSP interface that allows the user to choose a
> specific
> > build, update some configurable properties, and fire off the build.
> > Everything has been running fine, until this weekend. The box has
> been
> > warm-booted (Ctrl+Alt+Del) in the past, but this weekend it was
> > cold-booted due to a power shutdown. Also, Tivoli software
> (endpoint)
> > was installed on the box. In other words, something in the
> environment
> > changed.
> > The problem that I'm experiencing is if I use fork=yes attribute
> with
> > javac task, I get the following error:
> > 
> > .
> > .
> > .
> > --- Nested Exception ---
> > java.io.IOException: CreateProcess: javac -d
> > D:\BuildMeister\Kevin\classes -classpath
> > D:\BuildMeister\Kevin\classes;D:\BuildMeister\Kevin\lib\jakart
> > a-regexp-1.1.jar;D:\bea\wlserver6.1\lib\weblogic.jar
> > -sourcepath D:\BuildMeister\Kevin\java -g:none
> > @d:\weblogic5\jikes-7259966342106650854 error=2
> > at java.lang.Win32Process.create(Native Method)
> > .
> > .
> > .
> > 
> > If I don't use fork=yes, everything is fine. If I don't run the
> server
> > as a service, and run it from a command prompt, everything runs
> fine
> > whether or not I use fork=yes. I updated a copy of Execute to dump
> out
> > what values it had:
> > 
> > .
> > .
> > .
> > (messages from the javac task)
> > KHT - In the exec method of Java13CommandLauncher
> > Execute:Java13CommandLauncher: javac -d
> D:\BuildMeister\Kevin\classes
> > -classpath
> > D:\BuildMeister\Kevin\classes;D:\BuildMeister\Kevin\lib\jakart
> > a-regexp-1.1.jar;D:\bea\wlserver6.1\lib\weblogic.jar
> > -sourcepath D:\BuildMeister\Kevin\java -g:none
> > @d:\weblogic5\jikes-7259966342106650854
> > KHT - cmd [0] = javac
> > KHT - cmd [1] = -d
> > KHT - cmd [2] = D:\BuildMeister\Kevin\classes
> > KHT - cmd [3] = -classpath
> > KHT - cmd [4] =
> > D:\BuildMeister\Kevin\classes;D:\BuildMeister\Kevin\lib\jakart
> > a-regexp-1.1.jar;D:\bea\wlserver6.1\lib\weblogic.jar
> > KHT - cmd [5] = -sourcepath
> > KHT - cmd [6] = D:\BuildMeister\Kevin\java
> > KHT - cmd [7] = -g:none
> > KHT - cmd [8] = @d:\weblogic5\jikes-7259966342106650854
> > KHT - env is null
> > KHT - working dir = D:\BuildMeister\Kevin
> > KHT - Caught an InvocationTargetException
> > KHT - realexc is instanceof IOException
> > 
> > 
> > I know it's creating the jikes-7259966342106650854 file because I
> see
> > it in the directory. I tried putting a shortcut to javac in 
> > the working
> > directory, but no luck.
> > 
> > Any ideas?
> > 
> > Thanks for any help,
> > Kevin
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE Valentine eCards with Yahoo! Greetings!
> > http://greetings.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message