You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by th_wm <th...@gmx.de> on 2008/06/26 22:40:27 UTC

Ant hangs up while loading com.ibm.db2.jcc.DB2Driver using AntClassLoader

Hello,

after trying to run an Ant task (with -v option) on a Windows XP Prof. SP2
OS containing a statement according to following pattern:

   <sql driver="${db.driver}" url="${db.url}" userid="${db.user}" 
        password="${db.password}" classpath="${db.lib}">
       <transaction src="${db.dir}/sqlfile1.sql" />
       <transaction src="${db.dir}/sqlfile2.sql" />
       ...
   </sql>


Ant hang up after following output (meaning Ant seems to be still running,
but no further message is returned):

   [sql] connecting to jdbc:db2://localhost:50000/XYZ
   [sql] Loading com.ibm.db2.jcc.DB2Driver using AntClassLoader with
classpath mylibdir\db2jcc.jar;mylibdir\db2jcc_license_cu.jar


It's no problem to connect to the (local) database (DB2/NT 9.1.4) and to run
the SQL files manually in the DB2 command console or with an SQL editor
using the same JDBC connection and DB2 driver; the SQL statements of the
files are executed successfully.
The DB2 connection and login parameters as well as the driver classpath of
the Ant script are correct.
The DB2 driver, used, is com.ibm.db2.jcc.DB2Driver of db2jcc.jar (2096050
B); the DB2Driver.class file has 10605 B and is dated to 2007-09-28 11:42.
The Ant jars, used, are bsf.jar (175.348 B) and bsh-1.3.0.jar (242.154 B),
created by Ant 1.4.1. There is no firewall blocking ports.


What may be the reason for this hang-up?
How can this problem be avoided/resolved?


Thanks for all good hints.


th_wm

-- 
View this message in context: http://www.nabble.com/Ant-hangs-up-while-loading-com.ibm.db2.jcc.DB2Driver-using-AntClassLoader-tp18142361p18142361.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Ant hangs up while loading com.ibm.db2.jcc.DB2Driver using AntClassLoader

Posted by th_wm <th...@gmx.de>.
> I havent heard of this before. What happens if you run ant -diagnostics ?

I attached the ant diagnostics report below.
I've changed the infos for user.dir, the corresponding entry in
java.class.path into 'projectdir' as well as user.home and user.name into
'myusername' to make them anonymous.

th_wm


------- Ant diagnostics report -------
Apache Ant version 1.6.5 compiled on June 2 2005
-------------------------------------------
Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.5
optional tasks : 1.6.5
-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5
ant-antlr.jar (5746 bytes)
ant-apache-bcel.jar (8816 bytes)
ant-apache-bsf.jar (12696 bytes)
ant-apache-log4j.jar (3213 bytes)
ant-apache-oro.jar (48110 bytes)
ant-apache-regexp.jar (3948 bytes)
ant-apache-resolver.jar (4279 bytes)
ant-commons-logging.jar (4051 bytes)
ant-commons-net.jar (34933 bytes)
ant-icontract.jar (9823 bytes)
ant-jai.jar (21488 bytes)
ant-javamail.jar (6876 bytes)
ant-jdepend.jar (8217 bytes)
ant-jmf.jar (6811 bytes)
ant-jsch.jar (22758 bytes)
ant-junit.jar (73586 bytes)
ant-launcher.jar (9340 bytes)
ant-netrexx.jar (10019 bytes)
ant-nodeps.jar (417290 bytes)
ant-starteam.jar (35143 bytes)
ant-stylebook.jar (2541 bytes)
ant-swing.jar (6896 bytes)
ant-trax.jar (68785 bytes)
ant-vaj.jar (49418 bytes)
ant-weblogic.jar (14480 bytes)
ant-xalan1.jar (4657 bytes)
ant-xslp.jar (2454 bytes)
ant.jar (1025984 bytes)
-------------------------------------------
Tasks availability
-------------------------------------------
image : Missing dependency com.sun.media.jai.codec.FileSeekableStream
sshexec : Missing dependency com.jcraft.jsch.UserInfo
scp : Missing dependency com.jcraft.jsch.UserInfo
jdepend : Missing dependency jdepend.xmlui.JDepend
junit : Missing dependency junit.framework.TestListener
-------------------------------------------
org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/
-------------------------------------------
XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location:
C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\xml.jar
-------------------------------------------
System properties
-------------------------------------------
java.assistive : ON
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\bin
java.vm.version : 1.4.2
ant.library.dir :
C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib
java.vm.vendor : IBM Corporation
java.vendor.url : http://www.ibm.com/
path.separator : ;
java.vm.name : Classic VM
file.encoding.pkg : sun.io
user.country : DE
sun.os.patch.level : Service Pack 2
java.vm.specification.name : Java Virtual Machine Specification
user.dir : projectdir\xy
java.runtime.version : 1.4.2
java.fullversion : J2RE 1.4.2 IBM Windows 32 build cn142-20060421 (SR5) (JIT
enabled: jitc)
java.awt.graphicsenv : sun.awt.Win32GraphicsEnvironment
java.endorsed.dirs :
C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\endorsed
os.arch : x86
com.ibm.vm.bitmode : 32
java.io.tmpdir : C:\Temp\
line.separator :
java.vm.specification.vendor : Sun Microsystems Inc.
user.variant :
java.awt.fonts :
os.name : Windows XP
ant.home : C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5
sun.java2d.fontpath :
java.library.path :
C:\Programme\IBM\SDP70\jdk\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Intel\Wireless\Bin\;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\DEUTSCH;C:\Programme\Gemeinsame
Dateien\GTK\2.0\bin;F:\CommandFiles;C:\Programme\OpenSSH\bin;C:\Programme\QuickTime\QTSystem\;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\PROGRA~1\IBM\SQLLIB\SAMPLES\REPL;C:\Programme\IBM\SDP70\configuration\org.eclipse.osgi\bundles\1143\1\.cp
java.specification.name : Java Platform API Specification
java.class.version : 48.0
ibm.system.encoding : Cp1252
java.util.prefs.PreferencesFactory :
java.util.prefs.WindowsPreferencesFactory
invokedviajava :
os.version : 5.1
user.home : C:\Dokumente und Einstellungen\myusername
user.timezone : Europe/Berlin
java.awt.printerjob : sun.awt.windows.WPrinterJob
java.specification.version : 1.4
file.encoding : Cp1252
user.name : myusername
java.class.path :
C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-antlr.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-bcel.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-bsf.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-log4j.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-oro.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-regexp.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-apache-resolver.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-commons-logging.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-commons-net.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-icontract.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-jai.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-javamail.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-jdepend.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-jmf.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-jsch.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-junit.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-launcher.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-netrexx.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-nodeps.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-starteam.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-stylebook.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-swing.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-trax.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-vaj.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-weblogic.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-xalan1.jar;C:\Programme\IBM\SDP70Shared\plugins\org.apache.ant_1.6.5\lib\ant-xslp.jar;C:\Programme\IBM\SDP70\configuration\org.eclipse.osgi\bundles\789\1\.cp\lib\remoteAnt.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\lib\tools.jar;projectdir\lib\ant\bsh-1.3.0.jar;projectdir\lib\ant\bsf.jar;C:\Programme\IBM\SDP70Shared\plugins\org.eclipse.swt.nl1_3.2.1.v200609270227.jar;C:\Programme\IBM\SDP70Shared\plugins\org.eclipse.swt.win32.win32.x86_3.2.3.v3236c.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 32
java.home : C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre
java.specification.vendor : Sun Microsystems Inc.
user.language : de
awt.toolkit : sun.awt.windows.WToolkit
java.vm.info : J2RE 1.4.2 IBM Windows 32 build cn142-20060421 (SR5) (JIT
enabled: jitc)
java.version : 1.4.2
java.ext.dirs : C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ext
sun.boot.class.path :
C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\core.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\graphics.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\security.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\server.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\xml.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\charsets.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmcertpathprovider.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjaasactivelm.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjaaslm.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjcefw.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjgssprovider.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjssefips.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmjsseprovider.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmorb.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmorbapi.jar;C:\Programme\IBM\SDP70\runtimes\base_v6\java\jre\lib\ibmpkcs.jar
java.vendor : IBM Corporation
file.separator : \
java.vendor.url.bug :
java.compiler : jitc
sun.io.unicode.encoding : UnicodeLittle
Total time: 531 milliseconds


-- 
View this message in context: http://www.nabble.com/Ant-hangs-up-while-loading-com.ibm.db2.jcc.DB2Driver-using-AntClassLoader-tp18142361p18159141.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: Ant hangs up while loading com.ibm.db2.jcc.DB2Driver using AntClassLoader

Posted by Steve Loughran <st...@apache.org>.
th_wm wrote:
> Hello,
> 
> after trying to run an Ant task (with -v option) on a Windows XP Prof. SP2
> OS containing a statement according to following pattern:
> 
>    <sql driver="${db.driver}" url="${db.url}" userid="${db.user}" 
>         password="${db.password}" classpath="${db.lib}">
>        <transaction src="${db.dir}/sqlfile1.sql" />
>        <transaction src="${db.dir}/sqlfile2.sql" />
>        ...
>    </sql>
> 
> 
> Ant hang up after following output (meaning Ant seems to be still running,
> but no further message is returned):
> 
>    [sql] connecting to jdbc:db2://localhost:50000/XYZ
>    [sql] Loading com.ibm.db2.jcc.DB2Driver using AntClassLoader with
> classpath mylibdir\db2jcc.jar;mylibdir\db2jcc_license_cu.jar
> 
> 
> It's no problem to connect to the (local) database (DB2/NT 9.1.4) and to run
> the SQL files manually in the DB2 command console or with an SQL editor
> using the same JDBC connection and DB2 driver; the SQL statements of the
> files are executed successfully.
> The DB2 connection and login parameters as well as the driver classpath of
> the Ant script are correct.
> The DB2 driver, used, is com.ibm.db2.jcc.DB2Driver of db2jcc.jar (2096050
> B); the DB2Driver.class file has 10605 B and is dated to 2007-09-28 11:42.
> The Ant jars, used, are bsf.jar (175.348 B) and bsh-1.3.0.jar (242.154 B),
> created by Ant 1.4.1. There is no firewall blocking ports.
> 

I havent heard of this before. What happens if you run ant -diagnostics ?

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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