ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: Ant Threading Problem?
Date Fri, 27 Jun 2003 16:08:59 GMT
Hi Brian,

probably it is not an ant problem.

You should write a wrapper to start ant from cron from the type :


#!/bin/ksh
. ~/.profile
. ~/.kshrc
cd build_directory
ant -f mybuild.xml

Under cron, the environment variables are not set like in an interactive
shell, the login scripts are not executed, you need to wrap in small shell
scripts everything you want to run under cron.

Cheers,

Antoine
----- Original Message -----
From: "Brian Harris" <brian.harris@optdatainc.com>
To: <user@ant.apache.org>
Sent: Friday, June 27, 2003 6:08 PM
Subject: Ant Threading Problem?


> I am using the crontab to call a shell script that starts Ant.  During
> the Ant build, it calls another shell script that calls a simple java
> application.  The log file I specified in the ant call is getting this
> error:
>
>      [exec] java.lang.NullPointerException
>      [exec]    at 0x40233e12: _Jv_ThrowSignal (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40233e46: ?? (??:0)
>      [exec]    at 0xbfffe24c: ?? (??:0)
>      [exec]    at 0x402423b4: _Jv_ResolvePoolEntry(java.lang.Class,
> int) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x402494d9:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4039e347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e307: ffi_raw_call (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249528:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4039e347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e307: ffi_raw_call (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249528:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4025c308: gnu.gcj.runtime.FirstThread.call_main()
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x402c70b1: gnu.gcj.runtime.FirstThread.run()
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40268fdc: _Jv_ThreadRun(java.lang.Thread)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4023578c: _Jv_RunMain(java.lang.Class, byte const,
> int, byte const, boolean) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x08048900: ?? (??:0)
>      [exec]    at 0x420158f7: __libc_start_main (/lib/i686/libc.so.6)
>      [exec]    at 0x080486c1: ?? (??:0)
>
> Now this only happens when it is scheduled to run on the crontab.  If
> I invoke the start up script directly from a shell, it runs fine with
> no errors.  I am trying to run this on Red Hat 8.0.  This process had
> been running previously on Red Hat 7.3 and running perfectly on the
> crontab.  I noticed that RH7 has libgcj.so.2 instead of libgcjso.3 as
> on RH8 which is where all the errors above are directed toward.  Can
> anyone tell me if this is a bug in libgcj.so.3 or anything about what
> is going on here?  Thanks in advance.
>
>
> Brian Harris
> Optdata Inc/ATRS
> brian.harris@optdatainc.com
>
> I am using the crontab to call a shell script that starts Ant.  During
> the Ant build, it calls another shell script that calls a simple java
> application.  The log file I specified in the ant call is getting this
> error:
>
>      [exec] java.lang.NullPointerException
>      [exec]    at 0x40233e12: _Jv_ThrowSignal (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40233e46: ?? (??:0)
>      [exec]    at 0xbfffe24c: ?? (??:0)
>      [exec]    at 0x402423b4: _Jv_ResolvePoolEntry(java.lang.Class,
> int) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x402494d9:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4039e347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e307: ffi_raw_call (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249528:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4039e347: ffi_call_SYSV (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e307: ffi_raw_call (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249528:
> _Jv_InterpMethod.continue1(_Jv_InterpMethodInvocation)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40249e34: _Jv_InterpMethod.run(ffi_cif, void,
> ffi_raw, _Jv_InterpMethodInvocation) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40247424: _Jv_InterpMethod.run_normal(ffi_cif,
> void, ffi_raw, void) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4039e1bc: ?? (??:0)
>      [exec]    at 0x4025c308: gnu.gcj.runtime.FirstThread.call_main()
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x402c70b1: gnu.gcj.runtime.FirstThread.run()
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x40268fdc: _Jv_ThreadRun(java.lang.Thread)
> (/usr/lib/libgcj.so.3)
>      [exec]    at 0x4023578c: _Jv_RunMain(java.lang.Class, byte const,
> int, byte const, boolean) (/usr/lib/libgcj.so.3)
>      [exec]    at 0x08048900: ?? (??:0)
>      [exec]    at 0x420158f7: __libc_start_main (/lib/i686/libc.so.6)
>      [exec]    at 0x080486c1: ?? (??:0)
>
> Now this only happens when it is scheduled to run on the crontab.  If
> I invoke the start up script directly from a shell, it runs fine with
> no errors.  I am trying to run this on Red Hat 8.0.  This process had
> been running previously on Red Hat 7.3 and running perfectly on the
> crontab.  I noticed that RH7 has libgcj.so.2 instead of libgcjso.3 as
> on RH8 which is where all the errors above are directed toward.  Can
> anyone tell me if this is a bug in libgcj.so.3 or anything about what
> is going on here?  Thanks in advance.
>
>
> Brian Harris
> Optdata Inc/ATRS
> brian.harris@optdatainc.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



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


Mime
View raw message