db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <step...@stephan-wiesner.de>
Subject Re: problems in Torque tutorial step 4.
Date Tue, 01 Apr 2003 11:34:01 GMT

Hi Brian,
I had the same problem and thought it was because of my MySQL
installation and transactions...
Turned out that I forgot to set a paramter in one of the configuration
files, not sure anymore which, but I think the schema file.

Stephan

brb@ofir.dk schrieb am 01.04.2003, 11:57:48:
> 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
> org.gjt.mm.mysql.Driver
> 
> C:\turbine\torque-3.0>java com.kazmier.Bookstore
> java.lang.NullPointerException: There was no DataSourceFactory configured for
> th
> e connection bookstore
>         at org.apache.torque.Torque.getConnection(Torque.java:938)
>         at
> org.apache.torque.util.Transaction.beginOptional(Transaction.java:113
> )
>         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)
> 
> C:\turbine\torque-3.0>
> 
> 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
> database.
> 
> 
> 
> 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://130.225.185.148/mysql
> torque.database.buildUrl = jdbc:mysql://130.225.185.148/bookstore
> torque.database.url = jdbc:mysql://130.225.185.148/bookstore
> torque.database.driver = org.gjt.mm.mysql.Driver
> torque.database.user = root
> torque.database.password = brorsbol
> torque.database.host = 130.225.185.148
> 
> 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://130.225.185.148/bookstore
> torque.database.bookstore.username = adminuser
> torque.database.bookstore.password = adminpassword
> 
> torque.idbroker.cleverquantity=true
> 
> torque.manager.useCache = true
> 
> 
> Thanks,
> Brian
> 
> ----------------------------------------------------
> Få din egen gratis email på http://www.mail.forum.dk
> 
> 
> ---------------------------------------------------------------------
> 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