Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> loadjava and ant

loadjava and ant

From: Tom <beagleboythefirst_at_hotmail.com>
Date: 31 May 2002 02:34:59 -0700
Message-ID: <f3490ce0.0205310134.6c424f0b@posting.google.com>


Hi,
I was wondering if anyone has succeeded in using loadjava as a target in an ant build file.

I have added a target that uses the exec task. However when i try to run this target i get an error.

My target resembles the following:
<exec dir="C:/JavaProjects/classes/db/stored" executable="loadjava" os="Windows NT" output="dir.txt">

<arg line="-resolve -user test1/test1_at_TEST -verbose
TestStored.class"/>

<env key="PATH" path="E:\Oracle\Ora81\bin"/>
</exec>

When i execute the ant target with -verbose i get the following output:

C:\JavaProjects\MCPSI\dbloader\build.xml:204: Execute failed: java.io.IOExceptio
n: CreateProcess: loadjava -resolve -user test1/test1_at_TEST -verbose C:\JavaProje
cts\classes\db\stored\TestStored.class error= 2

        at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:247)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:177)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
--- Nested Exception ---
java.io.IOException: CreateProcess: loadjava -resolve -user MCPS2/MCPS2_at_TEST -ve
rbose C:\JavaProjects\mcpsi\dbloader\classes\com\mcpsi\db\stored\CreateInvoiceDe tails.class error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:551)
        at java.lang.reflect.Method.invoke(Native Method)
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
ute.java:564)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:384)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:250)
        at org.apache.tools.ant.taskdefs.ExecuteOn.runExec(ExecuteOn.java:227)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:177)
        at org.apache.tools.ant.Task.perform(Task.java:217)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

Total time: 1 second

Does anyone have any idea why this would be happening. I have managed to use exec to execute the cmd operation and output the contents of the C drive to a file so i dont think its the set up of my target. Perhaps ant cannot find the loadjava utility. Im not sure....All help appreciated..

Tom Received on Fri May 31 2002 - 04:34:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US