ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <>
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
    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" <>
To: "Ant Users List (E-mail)" <>
Sent: Tuesday, September 02, 2003 1:52 PM
Subject: Exception in thread "main"

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:
     [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
     [exec]      [java] IsJDBCcompl   true

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

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

Total time: 46 minutes 49 seconds

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message