db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent Atkins" <Brent.Atk...@Pro-Sys.biz>
Subject trouble with Maven, MySQL & jbdc
Date Mon, 16 Feb 2004 19:38:08 GMT
Hi all,

I hate to pollute the mailing list with a stupid configuration problem, but I'm at my wits
end.  I
recently made the switch from building my Torque classes with ant to building them with Maven.
 My
application is a webapp (using Struts in case you care), and currently builds just fine. 
However,
when I try to run the Maven goal [maven torque:create-db] I get the following error.

----

$: maven torque:create-db
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

torque:init:

torque:create-db:
    [torque-data-model] Using classpath
log4j:ERROR Could not find value for key
log4j.appender.org.apache.torque.engine
log4j:ERROR Could not instantiate appender named "org.apache.torque.engine".
    [torque-data-model] Generating to file
/home/brent/develop/btp_maven/target/classes/sql/create-db.sql
2004-02-15 16:15:18,703 [main] INFO
org.apache.torque.engine.database.transform.XmlToAppData - Parsing file:
'btp-schema.xml'
2004-02-15 16:15:18,715 [main] INFO
org.apache.torque.engine.database.transform.DTDResolver - Resolver: used
database.dtd from 'org.apache.torque.engine.database.transform' package
    [echo]
          Executing the create-db.sql script ...


BUILD FAILED
File...... file:/home/brent/.maven/plugins/maven-torque-plugin-3.2/
Element... sql
Line...... 374
Column.... 44
java.sql.SQLException: No suitable Driver for jdbc:mysql//localhost:3306
Total time: 4 seconds
Finished at: Sun Feb 15 16:15:18 EST 2004

----

It would seem that the Torque plugin is looking for my jdbc driver.  So the first thing I
checked
was to make sure my project.xml had the dependency that I needed.

----

project.xml (just the good stuff)

    <dependency>
      <id>mysql:mysql-connector-java</id>
      <version>3.0.8-stable-bin</version>
      <url>http://www.mysql.com/documentation/connector-j/index.html</url>
      <properties><war.bundle>true</war.bundle></properties>
    </dependency>

----

Well, it is included as a dependency (and it when deployed it runs just fine) so my next guess
was
to check my project.properties file.

----

project.properties (just the Torque stuff)

db.user = root
db.password =

torque.database.user = ${db.user}
torque.database.password = ${db.password}
torque.database.host = localhost

torque.project = btp
torque.targetPackage = btp.torque

torque.database = mysql
torque.database.createUrl = jdbc:mysql//localhost:3306
torque.database.buildUrl = jdbc:mysql//localhost:3306/btp
torque.database.url = jdbc:mysql//localhost:3306/btp
torque.database.driver = com.mysql.jdbc.Driver


# Settings to generate torque docs in xdoc format
# and place in xdoc directory for inclusion in
# Maven site:generate goal

torque.doc.format = anakia
torque.doc.dir = xdocs/database


# Added to fix odd Torque plugin problem
# I'd like to eventually remove these

torque.basePrefix = Base
torque.addSaveMethod = true
torque.saveException = Exception

----

Based on what I know, this setup should allow me to run the create-db goal without any trouble.
 I'm
especially stumped because this worked fine with ant.  Obviously I'm just missing some
property...but I haven't found anything in the archives yet (day three!).  Has anyone else
experienced this?

As always, the maddest of props go out to whomever has the solution.



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