Trying the below code:
<sql
classpath="postgresql-8.4-701.jdbc3.jar"
driver="org.database.jdbcDriver"
url="devtest"
userid="uid"
password="pass">
select * from tab where tname = 'GR_DOCUMENT_PRINT_DFV';
</sql>
Getting the below error:
BUILD FAILED
C:\Program Files\Java\apache-ant-1.8.1\build.xml:62: Class Not Found: JDBC driver
org.database.jdbcDriver could not be loaded
Total time: 1 second
Please help.
Now I have updated the code. Add classpath to the previous code. Also add mysql-connector-java-3.0.8-stable-bin.jar and postgresql-8.4-701.jdbc3.jar file to ANT_HOME/lib but still getting the same error.
You should specify class path to your driver
And define your class path
does the jar containing
org.database.jdbcDriver
is in the classpath? you probably need to add a classpath attributeIf you're using Oracle, can you try
If you still have the same error, run ant with the -v switch. That will direct the sql task to print out the classpath it's using and you can verify.