I have the following ant build.xml
:
<path id="antclasspath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<property name="pathvar" refid="antclasspath" />
<echo message="Classpath is ${pathvar}"/>
<sql
driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@myserver.hu:1521:dbid"
userid="myuserid"
password="mypassword"
print="yes"
classpathref="antclasspath">
select * from table
</sql>
There is an Oracle JDBC driver in the lib directory. Echo prints it out correctly:
Classpath is E:\MyDir\lib\ojdbc14-10_2_0_3.jar
Somehow sql ant task is still not able to load the Oracle driver:
E:\MyDir\build.xml:100: Class Not Found: JDBC driver oracle.jdbc.driver.OracleDriver could not be loaded
What is the problem with this build.xml? It is quite strange that it was working few times yesterday, but never again.
Using classpath="E:\MyDir\lib\ojdbc14-10_2_0_3.jar"
in the task gives the same error message.
I'm using ant 1.7.1 (built in Netbeans 6.5)