Hi,

I've tried to get the example application bookstore as described at 
http://jakarta.apache.org/turbine/torque/tutorial.html to work.

The following is the output from running the application using the test 
class Bookstore.

----------- snip -----------------
java.lang.NullPointerException: There was no DataSourceFactory 
configured for the connection bookstore
        at org.apache.torque.Torque.getConnection(Torque.java:924)
        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:428)
        at com.kazmier.om.BasePublisher.save(BasePublisher.java:412)
        at com.kazmier.Bookstore.main(Bookstore.java:26)
Process terminated with exit code 0
------------ snip -----------------

The database exists with the required tables.

I've copied the code and properties directly from the web-page, but 
include my Torque.properties anyway.

----------- snip -----------------
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 = myusr
torque.database.bookstore.password = mypasswd
------------ snip -----------------

, and the last section of my build.properties file

----------- snip -----------------
torque.project = bookstore
torque.database = mysql
torque.targetPackage = com.kazmier.om
torque.database.createUrl = jdbc:mysql://127.0.0.1/mysql
torque.database.buildUrl = jdbc:mysql://127.0.0.1/bookstore
torque.database.url = jdbc:mysql://127.0.0.1/bookstore
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = myusr
torque.database.password = mypasswd
torque.database.host = 127.0.0.1
----------- snip -----------------


Regards,
Stein Inge Morisbak


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to