db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@ofir.dk>
Subject problems in Torque tutorial step 4.
Date Tue, 01 Apr 2003 09:57:48 GMT
I get the following problem trying to complete the tutorial by Steven F. Davis 
based on MySQL v. 4.0 and running on Windows 2000, JDK  j2sdk1.4.1_01 driver 

C:\turbine\torque-3.0>java com.kazmier.Bookstore
java.lang.NullPointerException: There was no DataSourceFactory configured for 
e connection bookstore
        at org.apache.torque.Torque.getConnection(Torque.java:938)
        at org.apache.torque.util.Transaction.begin(Transaction.java:97)
        at com.kazmier.om.BasePublisher.save(BasePublisher.java:420)
        at com.kazmier.om.BasePublisher.save(BasePublisher.java:401)
        at com.kazmier.Bookstore.main(Bookstore.java:26)


I have the following steps completed:
Step 1: ok
Step 2: ok
Step 3: ok
Step 4: ????

Document torque.log:

INFO - Logging has been configured by Torque.
DEBUG - Starting initAdapters
DEBUG - Starting initDSF
DEBUG - Adding a dummy entry for default, mapped onto bookstore
DEBUG - IDBroker thread was started.
WARN - IDBroker is being used with db 'bookstore', which does not support 
transactions. IDBroker attempts to use transactions to limit the possibility 
of duplicate key generation.  Without transactions, duplicate key generation 
is possible if multiple JVMs are used or other means are used to write to the 

DOCUMENT build.properties:

torque.project = bookstore
torque.database = mysql
torque.targetPackage = com.kazmier.om

torque.addGetByNameMethod = true
torque.addIntakeRetrievable = false
torque.addSaveMethod = true
torque.addTimeStamp = true
torque.basePrefix = Base
torque.complexObjectModel = true
torque.useClasspath = false
torque.useManagers = false

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 = root
torque.database.password = brorsbol
torque.database.host =

torque.sameJavaName = false

DOCUMENT Torque.properties:

torque.applicationRoot = .

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 = adminuser
torque.database.bookstore.password = adminpassword


torque.manager.useCache = true


Få din egen gratis email på http://www.mail.forum.dk

View raw message