db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael.Dohe...@barclayscapital.com
Subject ant classpath issue
Date Fri, 04 Apr 2003 07:43:40 GMT
Hi there,

I hope someone can help me.  I would like to use Torque as my
Java-class-generation tool for providing a persistence layer in my app.  I
have taken to approach of using a database design tool to generate the
physical data model and now I am trying to use Torque to generate its XML
equivalent by running:

ant -f build-torque.xml jdbc

This results in a sun.jdbc.odbc.Driver class not found exception as shown at
the end of the mail.  Note that I altered the TorqueJDBCTransformTask class
to dump the classpath that it is using which shows that rt.jar is available
(rt.jar contains sun.jdbc.odbc.JdbcOdbcDriver).

Can anyone offer any clues as to why the driver doesn't seem to be visible?
I am also confused by the value of the classpath returned - I would have
expected it to be the result of classpathref="torque-classpath" in the
torque-jdbc-transform taskdef in build-torque.xml.  Am I missing something?

Thanks in advance,
Michael

P.S. I am using jdk1.3 with ant1.5.1 running on NT4.0

=======================================================

Buildfile: build-torque.xml

jdbc:
     [echo] +-----------------------------------------------+
     [echo] |                                               |
     [echo] | Generating XML from JDBC connection !         |
     [echo] | Woo hoo!                                      |
     [echo] |                                               |
     [echo] +-----------------------------------------------+
     [echo] torque.lib.dir = lib
     [echo] classpath = torque-classpath
[torque-jdbc-transform] Torque - JDBCToXMLSchema starting
[torque-jdbc-transform] Your DB settings are:
[torque-jdbc-transform] driver : sun.jdbc.odbc.JdbcOdbcDriver
[torque-jdbc-transform] URL : jdbc:odbc:gnome_pub_odbc
[torque-jdbc-transform] user :
[torque-jdbc-transform] schema : ${torque.database.schema}
[torque-jdbc-transform] in generateXML!!
[torque-jdbc-transform] classpath is C:\Program
Files\jdk1.3\lib\tools.jar;F:\d
evelopment\misc\ant1.5.1\jakarta-ant-1.5.1\lib\xml-apis.jar;F:\development\m
isc
\ant1.5.1\jakarta-ant-1.5.1\lib\xercesImpl.jar;F:\development\misc\ant1.5.1\
jak
arta-ant-1.5.1\lib\optional.jar;F:\development\misc\ant1.5.1\jakarta-ant-1.5
.1\
lib\ant.jar;%CLASSPATH%;F:\development\torquetest\torque-3.0\lib\rt.jar;F:\d
eve
lopment\torquetest\torque-3.0\lib\rt.jar
[torque-jdbc-transform] dbDriver is sun.jdbc.odbc.JdbcOdbcDriver
[torque-jdbc-transform] java.lang.ClassNotFoundException:
sun/jdbc/odbc/JdbcOdbc
Driver
[torque-jdbc-transform] java.lang.ClassNotFoundException:
sun/jdbc/odbc/JdbcOdbc
Driver
[torque-jdbc-transform]         at java.lang.Class.forName0(Native Method)
[torque-jdbc-transform]         at java.lang.Class.forName(Class.java:120)
[torque-jdbc-transform]         at
org.apache.torque.task.TorqueJDBCTransformTas
k.generateXML(TorqueJDBCTransformTask.java:221)
[torque-jdbc-transform]         at
org.apache.torque.task.TorqueJDBCTransformTas
k.execute(TorqueJDBCTransformTask.java:194)
[torque-jdbc-transform]         at
org.apache.tools.ant.Task.perform(Task.java:3
19)
[torque-jdbc-transform]         at
org.apache.tools.ant.Target.execute(Target.ja
va:309)
[torque-jdbc-transform]         at
org.apache.tools.ant.Target.performTasks(Targ
et.java:336)
[torque-jdbc-transform]         at
org.apache.tools.ant.Project.executeTarget(Pr
oject.java:1306)
[torque-jdbc-transform]         at
org.apache.tools.ant.Project.executeTargets(P
roject.java:1250)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.runBuild(Main.java:
610)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.start(Main.java:196
)
[torque-jdbc-transform]         at
org.apache.tools.ant.Main.main(Main.java:235)

[torque-jdbc-transform]
[torque-jdbc-transform] Torque - JDBCToXMLSchema finished

BUILD SUCCESSFUL
Total time: 5 seconds


------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------

Mime
View raw message