Date: 2004-03-19T22:20:09
Editor: 208.147.1.1 <>
Wiki: DB Torque Wiki
Page: TutorialErrata
URL: http://wiki.apache.org/db-torque/TutorialErrata
no comment
Change Log:
------------------------------------------------------------------------------
@@ -81,6 +81,35 @@
java.lang.NullPointerException: There was no DataSourceFactory configured for the
connection bookstore
}}}
-Only to discovered later that I should've used the one indicated in the new tutorial
+My original '''Torque.properties''' file I used from the old tutorial
+
+{{{
+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://127.0.0.1/bookstore
+torque.database.bookstore.username = user
+torque.database.bookstore.password = password
+}}}
+
+The above '''Torque.properties''' does not work. So I tried the new one indicated in
+[Pool-config Howto|http://db.apache.org/torque/configuration-howto.html]
+
+{{{
+torque.dsfactory.bookstore.factory=
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
+torque.dsfactory.bookstore.pool.defaultMaxActive=30
+torque.dsfactory.bookstore.pool.testOnBorrow=true
+torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
+torque.dsfactory.bookstore.connection.driver = org.gjt.mm.mysql.Driver
+torque.dsfactory.bookstore.connection.url = jdbc:mysql://localhost:3306/bookstore
+torque.dsfactory.bookstore.connection.user = root
+torque.dsfactory.bookstore.connection.password = 1234
+}}}
+
+Then I could run the bookstore example
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]