Hi there, I am trying to run the following target: <target name="check-invalid-obj"> <sql driver="oracle.jdbc.OracleDriver " classpath="${oracle.classpath}" url="jdbc:oracle:thin:@${db.host}:${db.port}:${db.sid}" userid="${db.user}" password="${db.pwd}" showheaders="false" print="true"> <transaction> select sysdate from dual; select owner, object_name, object_type, status from all_objects where STATUS = 'INVALID'; </transaction> </sql> </target>
--> ANT 1.7.0 With ant 1.7.0, this works fine: $ env |grep ant ANT_HOME=/cygdrive/c/apps/apache-ant-1.7.0 PATH=/cygdrive/c/apps/apache-ant-1.7.0/bin:... $ ant -verbose check-invalid-obj Apache Ant version 1.7.0 compiled on December 13 2006 Buildfile: build.xml Detected Java version: 1.4 in: c:\apps\j2sdk1.4.2_13\jre Detected OS: Windows XP parsing buildfile c:\projects\svnwcopies\dev1\code\build\build.xml with URI = file:/c:/projects/svnwcopies/dev1/code/build/build.xml Project base dir set to: c:\projects\svnwcopies\dev1\code [antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found. [property] Loading c:\projects\svnwcopies\dev1\code\build\build.properties Build sequence for target(s) `check-invalid-obj' is [check-invalid-obj] ... check-invalid-obj: [sql] connecting to jdbc:oracle:thin:@grandaddy:1521:dat1 [sql] Loading oracle.jdbc.OracleDriver using AntClassLoader with classpath C:\oracle\products\ora102010\jdbc\lib\ojdbc14.jar [sql] Executing commands [sql] SQL: select sysdate from dual ... --> ANT 1.6.5 $ env |grep -i ant ANT_HOME=/cygdrive/c/apps/apache-ant-1.6.5 PATH=/cygdrive/c/apps/apache-ant-1.6.5/bin:/cygdrive/c/apps/apache-ant-1.7.0/bin:/cygdrive/c/apps/j2sdk1.4.2_... $ ant -verbose check-invalid-obj Apache Ant version 1.6.5 compiled on June 2 2005 Buildfile: build.xml Detected Java version: 1.4 in: c:\apps\j2sdk1.4.2_13\jre Detected OS: Windows XP parsing buildfile C:\projects\svnwcopies\dev1\code\build\build.xml with URI = file:///C:/projects/svnwcopies/dev1/code/build/build.xml Project base dir set to: C:\projects\svnwcopies\dev1\code [property] Loading C:\projects\svnwcopies\dev1\code\build\build.properties Build sequence for target(s) `check-invalid-obj' is [check-invalid-obj] ... check-invalid-obj: [sql] connecting to jdbc:oracle:thin:@grandaddy:1521:dat1 [sql] Loading oracle.jdbc.OracleDriver using AntClassLoader with classpath C:\oracle\products\ora102010\jdbc\lib\ojdbc14.jar BUILD FAILED C:\projects\svnwcopies\dev1\code\build\build.xml:164: Class Not Found: JDBC driver oracle.jdbc.OracleDriver could not be loaded at org.apache.tools.ant.taskdefs.JDBCTask.getDriver(JDBCTask.java:366) Instead of C:\oracle\products\ora102010\jdbc\lib\ojdbc14.jar, I've tried the following: classes12.jar, classes12.zip, classes12dms.jar. But I wasn't successful with either them. Thanks for any feedback about the above. I'll be also interested to know if anyone has been able to use the sql task with ant 1.6.5. For info, I am currently running ant under cygwin/bash (same issue when running directly from windows command prompt) with windows xp. Best regards, Teggy --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org