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: Exception in thread "main"
Date Tue, 02 Sep 2003 13:44:14 GMT
Hi Johan,
can you tell against which version of ant and which OS are you using ?
also if you are basically running a SQL script, it might be worthwhile to
use the <sql/> task rather than <exec/>
Also your log files seem to indicate that you are doing the following :

- starting a script or a program with the <exec/> task,
- this script or program is using the ant API to run the <java/> task,
- the java task does database operations

If this makes sense, you might want to refactor your build to :
1) generate a sql batch file containing the SQL statements you want to
execute
    insert into foo (bar, doe) values ('mybar', 'mydoe');
    ...
2) using the <sql/> task, execute the batch

Just ideas, I do not know for sure how your build is structured or what are
your constraints.

Antoine Lévy-Lambert

----- Original Message -----
From: "Johan Adelöw" <Johan.Adelow@corustechnologies.com>
To: "Ant Users List (E-mail)" <ant-user@jakarta.apache.org>
Sent: Tuesday, September 02, 2003 1:52 PM
Subject: Exception in thread "main"


Hi
Im experiencing what I think is a memory problem. I have a large build
including several scripts that has quite alot database interaction.
At the end of the run I suddenly get an Exception in thread "main" and the
build fails.
If I manualy run the scripts one by one there is no problem.

I've set up the memory parameter (-Xmx512m) to 500mb in the antscript but it
does not help.

Has anyone encountered/solved this problem?


     [exec]      [echo] Loading log4j_1.1.3.jar
     [exec]      [java] File name:
/test/ninstall/3_1/install/corus31/corus/3_1_0/lib/providers/openjms/log4j_1
.
1.3.jar
     [exec]      [java] File length: 158892

     [exec]      [java] Connected to  jdbc:oracle:thin:@elvis:1521:DB
     [exec]      [java] User          nisse
     [exec]      [java] Driver        Oracle JDBC driver
     [exec]      [java] DriverVersion 9.0.1.0.0
     [exec]      [java] IsJDBCcompl   true

      [exec]      [echo] Done installing broker!
      [exec] Exception in thread "main"

BUILD FAILED
file:/test/ninstall/3_1/bin/testenv_install_corus.xml:51: exec returned: 1

Total time: 46 minutes 49 seconds
bash-2.03$

---------------------------------------------------------------------
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