db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Truyen Vu <...@seattle.telecomsys.com>
Subject java.lang.InstantiationException: Unknown JDBC driver: com.mysql. jdb
Date Fri, 19 Dec 2003 23:20:54 GMT
I'm new to Torque and trying out the bookstore tutorial. I got the bookstore
project to compile, build the database and create the tables, but failed to
run the Bookstore app. Below is the error. I also include the
build-torque.xml for reference. It appears that Ant is having problem
finding com.mysql.jdb.Driver from mysql-connector-java-3.0.9-stable-bin.jar
which I'd already defined in the classpath.

thank you very much for your help.

========== build-torque.xml ==============
  <path id="run-classpath">
    <fileset dir="${torque.lib.dir}">
      <include name="**/mysql-connector-java-3.0.9-stable-bin.jar"/>
      <include name="**/stratum-1.0-b3.jar"/>
      <include name="**/commons-lang-1.0.1.jar"/>
      <include
name="**/commons-configuration-1.0-dev-3.20030607.194155.jar"/>
      <include name="**/commons-logging-1.0.3.jar"/>
      <include name="**/village-2.0-dev-20030825.jar"/>
    </fileset>
	<fileset dir="C:\torque-3.1\lib">
      <include name="**/torque-3.1.jar"/>
    </fileset>
  </path>

	<target name="run" description="run the Bookstore example">
		<echo
message="+------------------------------------------+"/>
		<echo message="|
|"/>
		<echo message="| Running Bookstore 	         |"/>
		<echo message="|
|"/>
		<echo
message="+------------------------------------------+"/>
		<java classname="com.kazmier.om.Bookstore"
			classpath="C:\torque-gen-3.1\bin\classes"
			fork="true">
			<classpath refid="run-classpath"/> 
			
		</java>
	</target>

=============== error ===============================

C:\torque-gen-3.1>ant -f build-torque.xml run
Buildfile: build-torque.xml

run:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] | Running Bookstore         |
     [echo] |                                          |
     [echo] +------------------------------------------+
     [java] Dec 19, 2003 11:49:38 AM org.apache.torque.TorqueInstance
initAdapte
rs
     [java] WARNING: Databases defined but no adapter configurations found!
     [java] Dec 19, 2003 11:49:38 AM org.apache.torque.oid.IDBroker <init>
     [java] WARNING: IDBroker is being used with db 'bookstore', which does
not
support transactions. IDBroker attempts to use transactions to limit the
possibi
lity of duplicate key generation.  Without transactions, duplicate key
generatio
n is possible if multiple JVMs are used or other means are used to write to
the
database.
     [java] Dec 19, 2003 11:49:38 AM org.apache.torque.util.BasePeer
getMapBuild
er
     [java] SEVERE: BasePeer.MapBuilder failed trying to instantiate:
com.kazmie
r.om.map.PublisherMapBuilder
     [java] java.lang.InstantiationException: Unknown JDBC driver:
com.mysql.jdb
c.Driver: Check your configuration file
     [java]     at
org.apache.torque.adapter.DBFactory.create(DBFactory.java:161
)
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:647)
     [java]     at
org.apache.torque.TorqueInstance.getDatabaseMap(TorqueInstanc
e.java:616)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:269)
     [java]     at
com.kazmier.om.map.PublisherMapBuilder.doBuild(PublisherMapBu
ilder.java:60)
     [java]     at
org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2
125)
     [java]     at
com.kazmier.om.BasePublisherPeer.<clinit>(BasePublisherPeer.j
ava:74)
     [java]     at
com.kazmier.om.BasePublisher.<clinit>(BasePublisher.java:36)
     [java]     at com.kazmier.om.Bookstore.main(Bookstore.java:25)
     [java] rethrown as org.apache.torque.TorqueException: Unknown JDBC
driver:
com.mysql.jdbc.Driver: Check your configuration file
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:657)
     [java]     at
org.apache.torque.TorqueInstance.getDatabaseMap(TorqueInstanc
e.java:616)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:269)
     [java]     at
com.kazmier.om.map.PublisherMapBuilder.doBuild(PublisherMapBu
ilder.java:60)
     [java]     at
org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2
125)
     [java]     at
com.kazmier.om.BasePublisherPeer.<clinit>(BasePublisherPeer.j
ava:74)
     [java]     at
com.kazmier.om.BasePublisher.<clinit>(BasePublisher.java:36)
     [java]     at com.kazmier.om.Bookstore.main(Bookstore.java:25)
     [java] Caused by: java.lang.InstantiationException: Unknown JDBC
driver: co
m.mysql.jdbc.Driver: Check your configuration file
     [java]     at
org.apache.torque.adapter.DBFactory.create(DBFactory.java:161
)
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:647)
     [java]     ... 7 more
     [java] Dec 19, 2003 11:49:39 AM org.apache.torque.oid.IDBroker <init>
     [java] WARNING: IDBroker is being used with db 'bookstore', which does
not
support transactions. IDBroker attempts to use transactions to limit the
possibi
lity of duplicate key generation.  Without transactions, duplicate key
generatio
n is possible if multiple JVMs are used or other means are used to write to
the
database.
     [java] Dec 19, 2003 11:49:39 AM org.apache.torque.util.BasePeer
getMapBuild
er
     [java] SEVERE: BasePeer.MapBuilder failed trying to instantiate:
com.kazmie
r.om.map.PublisherMapBuilder
     [java] java.lang.InstantiationException: Unknown JDBC driver:
com.mysql.jdb
c.Driver: Check your configuration file
     [java]     at
org.apache.torque.adapter.DBFactory.create(DBFactory.java:161
)
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:647)
     [java]     at
org.apache.torque.TorqueInstance.getDatabaseMap(TorqueInstanc
e.java:616)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:269)
     [java]     at
com.kazmier.om.map.PublisherMapBuilder.doBuild(PublisherMapBu
ilder.java:60)
     [java]     at
org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2
125)
     [java]     at
com.kazmier.om.BasePublisherPeer.getMapBuilder(BasePublisherP
eer.java:58)
     [java]     at com.kazmier.om.BasePublisher.save(BasePublisher.java:471)
     [java]     at com.kazmier.om.Bookstore.main(Bookstore.java:27)
     [java] rethrown as org.apache.torque.TorqueException: Unknown JDBC
driver:
com.mysql.jdbc.Driver: Check your configuration file
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:657)
     [java]     at
org.apache.torque.TorqueInstance.getDatabaseMap(TorqueInstanc
e.java:616)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:269)
     [java]     at
com.kazmier.om.map.PublisherMapBuilder.doBuild(PublisherMapBu
ilder.java:60)
     [java]     at
org.apache.torque.util.BasePeer.getMapBuilder(BasePeer.java:2
125)
     [java]     at
com.kazmier.om.BasePublisherPeer.getMapBuilder(BasePublisherP
eer.java:58)
     [java]     at com.kazmier.om.BasePublisher.save(BasePublisher.java:471)
     [java]     at com.kazmier.om.Bookstore.main(Bookstore.java:27)
     [java] Caused by: java.lang.InstantiationException: Unknown JDBC
driver: co
m.mysql.jdbc.Driver: Check your configuration file
     [java]     at
org.apache.torque.adapter.DBFactory.create(DBFactory.java:161
)
     [java]     at
org.apache.torque.TorqueInstance.initDatabaseMap(TorqueInstan
ce.java:647)
     [java]     ... 7 more
     [java] java.lang.NullPointerException
     [java]     at com.kazmier.om.BasePublisher.save(BasePublisher.java:471)
     [java]     at com.kazmier.om.Bookstore.main(Bookstore.java:27)

BUILD SUCCESSFUL
Total time: 3 seconds
C:\torque-gen-3.1>

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


Mime
View raw message