db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Chelimsky" <da...@chelimsky.org>
Subject java.lang.NullPointerException: There was no DataSourceFactory configured for the connection bookstore
Date Sun, 26 Oct 2003 20:45:13 GMT
Hi. I believe that I'm following the tutorial (http://db.apache.org/torque/tutorial) to the
letter, but when I get to executing the Bookstore program (java com.kazmier.Bookstore), I
get the following message:

java.lang.NullPointerException: There was no DataSourceFactory configured for the connection
        at org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:749)
        at org.apache.torque.Torque.getConnection(Torque.java:306)
        at org.apache.torque.util.Transaction.beginOptional(Transaction.java:118)
        at org.apache.torque.util.Transaction.begin(Transaction.java:100)
        at com.kazmier.om.BasePublisher.save(BasePublisher.java:490)
        at com.kazmier.om.BasePublisher.save(BasePublisher.java:471)
        at com.kazmier.Bookstore.main(Bookstore.java:26)

Note that at this point, I can see that the object model and various sql files are correctly
created AND I can see that the database and relevant tables have been created. So I think
that something is working at build time that is failing at run time.

Here's build.properties:
torque.jar = torque-3.1.jar
torque.project = bookstore
torque.database = mysql
torque.targetPackage = com.kazmier.om
torque.database.createUrl = jdbc:mysql://
torque.database.buildUrl = jdbc:mysql://
torque.database.url = jdbc:mysql://
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user =
torque.database.password =
torque.database.host =

And here's Torque.properties
log4j.rootCategory = DEBUG, default
log4j.appender.default = org.apache.log4j.FileAppender
log4j.appender.default.file = ./torque.log
log4j.appender.default.layout = org.apache.log4j.SimpleLayout

torque.database.default = bookstore
torque.database.bookstore.driver = org.gjt.mm.mysql.Driver
torque.database.bookstore.url = jdbc:mysql://
torque.database.bookstore.username = 
torque.database.bookstore.password =
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message