I am working in a custom jsp cms system, and i cosed Torque as
underlying db access, everyhting works fine in my testing server:
Torque 3.0.1
Caucho Resin as WebServer
Mysql DB
When i moved it to the deploy server, same config, i get this error:
java.lang.NullPointerException at
org.apache.torque.util.BasePeer.createQuery(BasePeer.java:1209) at
org.apache.torque.util.BasePeer.createQueryString(BasePeer.java:927) at
_jsp._home__jsp._ ...
the code throwing that exception is:
Criteria mcrit=new Criteria();
mcrit.add(ChannelPeer.PARENTID,2);
mcrit.addAscendingOrderByColumn(ChannelPeer.INNERORDER);
out.println(ChannelPeer.createQueryString(mcrit)); // <-- this code
throws the exception
List mlist=ChannelPeer.doSelect(mcrit);
If i delete that line , i get other error:
SELECT FROM Channel WHERE Channel.PARENTID=2
java.lang.NullPointerException at
org.apache.torque.util.BasePeer.createQuery(BasePeer.java:1209) at
org.apache.torque.util.BasePeer.createQueryString
now, the out.println shows the query, so the exception is throwed by the
doSelect call
the really bad thing is that the same code with the same database (a
copy) is working in my local server , but not
in deploy...
if it helps, the Torque.getConnection() returns a valid connection, and
it isnt closed
for now, this is the 7th day trying to solve this problem :-(
Daniel Rodriguez Mill�n