ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Szeto <rick.sz...@sitraka.com>
Subject Re: updating jars
Date Wed, 27 Dec 2000 22:46:10 GMT
Actually, the operation does get executed as the file does end up in the jar,
but it fails on an error condition.

BUILD FAILED

D:\wfms\build.xml:46: Execute failed: java.io.IOException: CreateProcess: jar
uf D:\wfms\dist\wfms-ejb.jar
D:\wfms\src\com\sitraka\wfms\common\Messages.properti
es error=267
java.io.IOException: CreateProcess: jar uf D:\wfms\dist\wfms-ejb.jar
D:\wfms\src\com\sitraka\wfms\common\Messages.properties error=267
        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(Execute.java:390)

        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:247)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:213)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:154)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 43 seconds

I am running it on Windows2000. I also noticed that I get the same problem(I
think) with the javac task using jikes compiler.

BUILD FAILED

D:\wfms\build.xml:22: Error running Jikes compiler
java.io.IOException: CreateProcess: jikes -d D:\wfms\build -classpath
D:\wfms\build;C:\jdk1.3\lib\tools.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogic

lib\weblogicaux.jar;C:\weblogic\myserver\clientclasses;C:\weblogic\myserver\serverclasses;C:\jdk1.3\jre\lib\rt.jar;D:\wfms\lib\jta.jar;D:\wfms\lib\jms.jar;D:\w

ms\lib\jpython.jar;D:\wfms\lib\js.jar;D:\wfms\lib\xalan.jar;D:\wfms\lib\xerces.jar;D:\wfms\lib\mysql.jar;D:\wfms\lib\jdbc_sql7.jar;D:\wfms\lib\mail.jar;D:\wfms

lib\activation.jar;D:\wfms\lib\bsf.jar;D:\wfms\lib\pushlet.jar;D:\wfms\lib\junit.jar;D:\wfms\lib\JGo.jar;D:\wfms\lib\JGoLayout.jar;C:\java\ant\lib\ant.jar;C:\j

va\ant\lib\jaxp.jar;C:\java\ant\lib\optional.jar;C:\java\ant\lib\parser.jar;D:\wfms\src;D:\wfms\${dev.home}
@D:\wfms\jikes5183645179196647570 error=267
        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(Execute.java:390)

        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:247)
        at
org.apache.tools.ant.taskdefs.Javac.executeJikesCompile(Javac.java:809)
        at org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java:757)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:336)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)

Note the same error numbers on both failures. I am being to think that this is
a general problem with executing
commands then just the jar call.

Thanks for any help you can give me.

Rick

Diane Holt wrote:

> I think the <jar> task doesn't allow for the -u flag because it's trying
> to be compatible for JDKs less than 1.2, which don't have that option.
> Personally, I'd rather see it offer the option, and just have
> error-checking in place for java.version not being compatible with the
> option.
>
> What kind of error does your <exec> task result in?
>
> Diane
>
> --- Rick Szeto <rick.szeto@sitraka.com> wrote:
> > Hi,
> >     I have been encountering problems with inserting/updating files into
> > exsting
> > jars, as the Jar task replaces the exisiting one with an empty jar. Try
> > to do it
> > the hard way also fails for some reason, via exec:
> >
> >     <exec executable="${java.home}\bin\jar.exe">
> >       <arg line="uf ${dist.dir}\project-ejb.jar
> > ${src.root}\com\mycompany\project\common\filetoinsert.properties" />
> >     </exec>
> >
> > Anything wrong with the above call? Or any solution to the problem?
> > Any help would be greatly appreciated
> >
> > Rick Szeto
> >
>
> =====
> (holtdl@yahoo.com)
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/


Mime
View raw message