You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2010/12/16 13:34:56 UTC

DO NOT REPLY [Bug 50484] New: Multiple calls to Ant script task fail with ojdbc5.jar

https://issues.apache.org/bugzilla/show_bug.cgi?id=50484

           Summary: Multiple calls to Ant script <sql> task fail with
                    ojdbc5.jar
           Product: Ant
           Version: 1.7.1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: keith@octavia-scot.co.uk


We are using an Ant script to apply SQL scripts to a database.  This is done
using the core <sql> task within a macro passing the script as a parameter, ie

<sql driver="oracle.jdbc.driver.OracleDriver" url="@{url}" userid="@{user}"
password="@{password}" classpathref="database.drivers" >
                                <transaction src="@{script}" />
                        </sql>

A controlling shell script calls several Ant targets (each with a new instance
of Ant).  We have reproduced the problem just calling Ant several times from
the shell.

The first call works fine but subsequent calls report

BUILD FAILED
.../build.xml:106: The following error occurred while executing this line:
.../build.xml:29: java.sql.SQLException: IO Error: Connection reset

After some delay (several minutes) running the same script works fine.

This does not seem related to the content of the SQL script - even simple
select statements show this problem.

We have recently updated to use the newer Oracle ojdbc5.jar reverting back to
the ojdbc14.jar fixes the problem.

We are using Ant 1.7.1 (but have reproduced the problem with 1.8.1)

Running on an Ubuntu server:
2.6.24-28-generic #1 SMP Wed Nov 24 09:30:14 UTC 2010 i686 GNU/Linux

Java version:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)

The Oracle ojdbc5.jar reports its version as:
Oracle 11.2.0.2.0 JDBC 3.0 compiled with JDK5 on Sat_Aug_14_12:16:40_PDT_2010

The Oracle ojdbc14.jar fails to report its version - ie there is no manifest in
that jar file.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 50484] Multiple calls to Ant script task fail with ojdbc5.jar

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50484

--- Comment #1 from Oleg <oa...@gmail.com> 2011-08-18 13:19:58 UTC ---
We experienced the same problem when upgrading oracle drivers from 10.x to
11.2.0.2.

Issue could be resolved by adding -Djava.security.egd=file:///dev/urandom to
jvm system properties by doing
export ANT_OPTS="-Djava.security.egd=file:///dev/urandom"
prior to running ant.

It is not specific to ant, but to jdbc driver which is now using /dev/random
which doesn't have enough entropy on servers.
More info could be found in:
https://forums.oracle.com/forums/thread.jspa?messageID=3793101
http://www.usn-it.de/index.php/2009/02/20/oracle-11g-jdbc-driver-hangs-blocked-by-devrandom-entropy-pool-empty/

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.