db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@mankin.org.uk
Subject TorqueException fetching all records
Date Mon, 22 Mar 2004 20:06:33 GMT
I am trying to fetch all the records from a table and am getting a
TorqueException. In fact, there is only one record to fetch. This is code that
has not been looked at for a while; it was working, and I tend to leave
sleeping dogs alone.

Any suggestions?

Here is the code:

92      System.out.println("initAcl: read from DB");
93      // Put in the first level real permissions
94      Criteria crit2 = new Criteria(PermissionPeer.DATABASE_NAME);
95      List l = PermissionPeer.doSelect(crit2); // Get all the perms in the DB


and here is the stack trace

initAcl: read from DB
TorqueException in initAcl: org.apache.torque.TorqueException:
uk.org.mankin.erms.Permission
java.lang.InstantiationException: uk.org.mankin.erms.Permission
        at java.lang.Class.newInstance0(Class.java:291)
        at java.lang.Class.newInstance(Class.java:259)
        at
uk.org.mankin.erms.BasePermissionPeer.row2Object(BasePermissionPeer.java:256)
        at
uk.org.mankin.erms.BasePermissionPeer.populateObjects(BasePermissionPeer.java:39
7)
        at
uk.org.mankin.erms.BasePermissionPeer.doSelect(BasePermissionPeer.java:310)
        at uk.org.mankin.erms.Permission.initAcl(Permission.java:95)



and here is the DB table:

mysql> select * from Permission;
+--------+---------+--------+----------+
| PermID | Subject | Object | PermMask |
+--------+---------+--------+----------+
|      1 |       3 |      0 | 16777215 |
+--------+---------+--------+----------+
1 row in set (0.00 sec)

I have tried it both with and without the database_name argument to the
Criteria constructor.

-- 
                               Unfortunately, most programmers like to
                               program. Some of them would rather
                               program than eat or bathe.
                               - Larry Constantine


Raphael Mankin
E-Mail: raph@panache.demon.co.uk
----------------------------------

---------------------------------------------------------------------
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