ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Genter" <rgen...@silverlink.com>
Subject Error establishing socket from <sql> task?
Date Wed, 07 Dec 2005 18:11:15 GMT
I'm trying to bring up our app suite on Linux (Fedora Core 4). One of
the earliest apps uses the <sql> task in its build script to initialize
the database we use. We call <sql> like this:

        <sql driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
             classpathref="jdbc.driver.path"
 
url="jdbc:microsoft:sqlserver://${test.db.host}:1433;DatabaseName=master
;ProgramName=Object API Test"
             userid="${test.db.userid}"
             password="${test.db.password}"
             src="${sql.master}/Data/sql_sysmessages.sql"
             delimiter="GO"/>

When I run the build script in verbose mode I get the following:

[rgenter@rgenter-vdt Object]$ ant -verbose sql
Apache Ant version 1.6.2 compiled on May 23 2005
Buildfile: build.xml
Detected Java version: 1.4 in: /usr/java/j2sdk1.4.2_05/jre
Detected OS: Linux
parsing buildfile /home/rgenter/src/Object/build.xml with URI =
file:///home/rgenter/src/Object/build.xml
Project base dir set to: /home/rgenter/src/Object
Build sequence for target `sql' is [sql]
Complete build sequence is [sql, local-file-test-setup,
remote-test-execute, local-test-setup, local-test-execute,
local-test-cleanup, local-test, remote-test-cleanup, compile, jar, dist,
proxy-dist, proxy-config-dist, all, remote-test-run, remote-test-setup,
local-test-run, other-projects, local-file-test-execute,
local-file-test-cleanup, local-file-test, remote-test, clean, test,
local-file-test-run, ]

sql:
     [echo] Installation system messages...
      [sql] connecting to
jdbc:microsoft:sqlserver://10.100.7.217:1433;DatabaseName=master;Program
Name=Object API Test
      [sql] Loading com.microsoft.jdbc.sqlserver.SQLServerDriver using
AntClassLoader with classpath
/opt/savvi/lib/ext/msbase.jar:/opt/savvi/lib/ext/mssqlserver.jar:/opt/sa
vvi/lib/ext/msutil.jar

BUILD FAILED
/home/rgenter/src/Object/build.xml:200: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
        at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:314)
        at
org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:347)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]Error establishing socket.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:304)
        ... 11 more
--- Nested Exception ---
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error
establishing socket.
        at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)
        at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown
Source)
        at
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
Source)
        at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
        at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
        at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
        at
org.apache.tools.ant.taskdefs.JDBCTask.getConnection(JDBCTask.java:304)
        at
org.apache.tools.ant.taskdefs.SQLExec.execute(SQLExec.java:347)
        at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at org.apache.tools.ant.Main.runBuild(Main.java:673)
        at org.apache.tools.ant.Main.startAnt(Main.java:188)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

Total time: 1 second
[rgenter@rgenter-vdt Object]$

The problem is not a basic networking error, though, because I can
telnet to the server on port 1433 just fine:

[rgenter@rgenter-vdt Object]$ telnet 10.100.7.217 1433
Trying 10.100.7.217...
Connected to rgenter-dt2.hq.silverlink.local (10.100.7.217).
Escape character is '^]'.
fdsafdsafdsa
Connection closed by foreign host.
[rgenter@rgenter-vdt Object]$ 

Any ideas? The same build script works fine on Windows, BTW...

--
Rick Genter
Principal Engineer
Silverlink Communications

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


Mime
View raw message