db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Truyen Vu <...@seattle.telecomsys.com>
Subject RE: java.lang.InstantiationException: Unknown JDBC driver: com.my sql. jdb
Date Fri, 19 Dec 2003 23:25:21 GMT
No, I'm running Ant from the DOS window.

-----Original Message-----
From: Sonu Vijay [mailto:sonupv@yahoo.com]
Sent: Friday, December 19, 2003 3:25 PM
To: Apache Torque Users List
Subject: Re: java.lang.InstantiationException: Unknown JDBC driver:
com.mysql. jdb


Are u running the Ant from within an IDE ? If yes then
try adding the Driver jar to the classpath of the IDE
or the project in the IDE.



--- Truyen Vu <tvu@seattle.telecomsys.com> wrote:
> 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)
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

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

---------------------------------------------------------------------
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