Is this the right place to ask Torque questions?  I'm a newbie to Torque,
but very jazzed about getting it rolling.  I'm impressed with the amount of
documentation and infrastructure that is in place for it.  Unfortunately I'm
having a problem that I haven't seen mentioned in the archives or
documentation - so I must be doing something really dumb....

I'm using the latest fresh build from CVS, but I've tried other builds with
the same problem so I'm not suspecting a Torque code problem. I've also
succesfully connected to MSSQL (with the beta drivers), but my goal is to
use hsqldb for something lightweight.

My code is very simply:

        try {
            Torque.init("c:/temp/torque/Torque.properties");
        }
        catch (Exception e) {
            e.printStackTrace();
        }

        Vector users = null;
        User user = null;
        String username = "erik";
        String password = "";
        Criteria criteria = new Criteria();
        criteria.add(UserPeer.USERNAME, username.toLowerCase());
        criteria.add(UserPeer.PASSWORD, password);

        try {
            users = UserPeer.doSelect(criteria);
        }
        catch (Exception e) {
            e.printStackTrace();
        }

And I'm getting this exception (running <java> from within Ant):
     [java] java.lang.InstantiationException: Unknown JDBC driver:
org.hsqldb.jdbcDriver: Check your configuration file
     [java]     at
org.apache.torque.adapter.DBFactory.create(DBFactory.java:223
)
     [java]     at org.apache.torque.Torque.initDatabaseMap(Torque.java:542)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:518)
     [java]     at
org.apache.torque.util.Criteria.containsObjectColumn(Criteria
.java:410)
     [java]     at
org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1207)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelectVillageRec
ords(BaseUserPeer.java:275)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelectVillageRec
ords(BaseUserPeer.java:245)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelect(BaseUserP
eer.java:223)
     [java]     at Test.main(Test.java:30)
     [java] rethrown as org.apache.torque.TorqueException: Unknown JDBC
driver:
org.hsqldb.jdbcDriver: Check your configuration file
     [java]     at org.apache.torque.Torque.initDatabaseMap(Torque.java:552)
     [java]     at org.apache.torque.Torque.getDatabaseMap(Torque.java:518)
     [java]     at
org.apache.torque.util.Criteria.containsObjectColumn(Criteria
.java:410)
     [java]     at
org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1207)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelectVillageRec
ords(BaseUserPeer.java:275)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelectVillageRec
ords(BaseUserPeer.java:245)
     [java]     at
org.example.testdb.om.torque.BaseUserPeer.doSelect(BaseUserP
eer.java:223)
     [java]     at Test.main(Test.java:30)

I've most definitely got hsqldb.jar (v. 1.61) in my classpath.  I've tried
this many many ways (embedded in a webapp at first, now narrowed to a simple
main barebones example).

Why is it not finding it?   Its driving me nuts and its bound to be
something very simple I'm missing.

My Torque.properties file has this:
torque.database.default.driver = org.hsqldb.jdbcDriver
torque.database.default.url = jdbc:hsqldb:c:/temp/torque/db/testdb
torque.database.default.username = sa
torque.database.default.password =

Help!  I look forward to the answer being a RTFM or something like that, so
be gentle on me but point me in the right direction.  :)

Thanks,
    Erik



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

Reply via email to