ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40617] New: - Sql task unable to establish connection
Date Wed, 27 Sep 2006 14:21:26 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40617>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40617

           Summary: Sql task unable to establish connection
           Product: Ant
           Version: 1.7.0Beta2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: sue.pharoah@aquilauk.co.uk
                CC: sue.pharoah@aquilauk.co.uk


I cannot get the sql task to work in 1.7.0 - Beta1 or Beta2. Running exactly 
the same script on ANT 1.6.5 works fine. - see below.
I have tried using the IP address for the port and adding the jdbc.zip to the 
ant lib. But same failure. 

Script:

 <target name="test">
  <sql driver="oracle.jdbc.driver.OracleDriver"
       url="jdbc:oracle:thin:@host:1523:DB10"
      userid="MYUSR"
      password="MYPASS">
      <classpath>
      	<pathelement location="C:\lib\ojdbc14.zip"/>
      </classpath>
      select * from dual;
  </sql>

Error:
C:\Administrator\install>ant -f sue.xml test -v
Apache Ant version 1.7.0Beta2 compiled on September 17 2006
Buildfile: sue.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_08\jre
Detected OS: Windows XP
parsing buildfile C:\Administrator\install\sue.xml with URI = 
file:/C:/Administrator/install/sue.xml
Project base dir set to: C:\Administrator\install
[antlib:org.apache.tools.ant] Could not load definitions from resource 
org/apache/tools/ant/antlib.xml. It could no
Build sequence for target(s) `test' is [test]
Complete build sequence is [test, ]

test:
      [sql] connecting to jdbc:oracle:thin:@10.35.6.66:1523:REG10
      [sql] Loading oracle.jdbc.driver.OracleDriver using AntClassLoader with 
classpath C:\Administrator\java\lib\o

BUILD FAILED
C:\Administrator\install\sue.xml:17: java.sql.SQLException: Io exception: The 
Network Adapter could not establish t
        at org.apache.tools.ant.taskdefs.JDBCTask.getConnection
(JDBCTask.java:329)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:414)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:276)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:342)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1282)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1251)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1134)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:300)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:106)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not 
establish the connection
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:125)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:162)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:274)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:319)
        at oracle.jdbc.driver.PhysicalConnection.<init>
(PhysicalConnection.java:344)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:148)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection
(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
        at org.apache.tools.ant.taskdefs.JDBCTask.getConnection
(JDBCTask.java:319)
        ... 18 more
--- Nested Exception ---
java.sql.SQLException: Io exception: The Network Adapter could not establish 
the connection
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:125)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:162)
        at oracle.jdbc.driver.DatabaseError.throwSqlException
(DatabaseError.java:274)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:319)
        at oracle.jdbc.driver.PhysicalConnection.<init>
(PhysicalConnection.java:344)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:148)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection
(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:545)
        at org.apache.tools.ant.taskdefs.JDBCTask.getConnection
(JDBCTask.java:319)
        at org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:414)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:276)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute
(DispatchUtils.java:105)
        at org.apache.tools.ant.Task.perform(Task.java:342)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1282)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1251)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1134)
        at org.apache.tools.ant.Main.runBuild(Main.java:698)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:300)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:106)

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

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


Mime
View raw message