I've been using torque a lot recently (Torque supplied with tdk-2.2-b1)
and everything was going well until I decided to investigate using the
manager's generated by torque (with option useManagers=true).
All I did was set the option, and torque generated and compiled all the
code (including the managers) successfully.
I decided to test out a little part of my app although I hadn't actually
referenced the manager's anywhere in my code yet. (cache.ccf in in
WEB-INF/classes).
I managed to succesfully log in (which is the part that really get's me
;) but when i try to execute a doSelect() in a doXXX method in one of my
action classes, I get the exception trace seen below:
Here is my code:
<code>
Criteria crit = new Criteria();
comunidades = ComunidadPeer.doSelect(sortByUniqueId(crit,
ComunidadPeer.TABLE_NAME));
</code>
The sortByUniqueId() method just applies
crit.addDescendingOrderByColumn(columnName) and returns the criteria object.
This exception didn't occur before with the same code! So I'm assuming
it must be something to do with the manager's.
I know the quick workaround ;) Don't use the managers but I'd like to
get to the bottom of this...
Now what's really strange is that, I deleted all my om code and
regenerated without the managers...and I'm still getting the same error,
even on a simple:
Criteria crit = new Criteria();
XXXPeer.doSelect(crit);
(Before generating the manager's ..I was successfully using torque no
probs..
I'm pretty stuck atm until I figure out what's going on. As far as I can
tell it's complaining about torque not been initialised but then how did
I manage to login...If I could manage to get debug info in torque.log I
could see if it's really being initialised or not...
P.S. I also cannot tell if torque has been initialised succesfully as
torque.log doesn't appear although log4j doesn't complain.
Exception trace:
Caused by: org.apache.torque.TorqueException: Torque.getPool(): pools is
null, did you call Torque.init() first?
at org.apache.torque.Torque.getDB(Torque.java:941)
at
org.apache.torque.util.BasePeer.createQueryString(BasePeer.java:1073)
at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1363)
at
org.sam.amigos.om.BaseComunidadPeer.doSelectVillageRecords(BaseComunidadPeer.java:300)
at
org.sam.amigos.om.BaseComunidadPeer.doSelectVillageRecords(BaseComunidadPeer.java:270)
at
org.sam.amigos.om.BaseComunidadPeer.doSelect(BaseComunidadPeer.java:248)
at
org.sam.amigos.modules.actions.FindSchool.doListcomunidades(FindSchool.java:146)
... 47 more
Caused by: org.apache.torque.TorqueException: Torque.getPool(): pools is
null, did you call Torque.init() first?
at org.apache.torque.Torque.getPool(Torque.java:982)
at org.apache.torque.Torque.getDB(Torque.java:937)
... 53 more
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>