db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Kromkamp <r.kromk...@pagelink.nl>
Subject NullPointerException BasePeer within torque-3.1.1
Date Fri, 25 Feb 2005 14:34:05 GMT
Hi,
 
When I try to add setIngnoreCase(true) within the following statement I get
a NullPointerException in BasePeer.java.
 
Criteria criteria = new Criteria();
criteria.setIngnoreCase(true);
criteria.addJoin(ObjectsPeer.OBJECT_ID, Object2Peer.OBJECT_2_ID);
Criteria.criterion criterion =
criteria.getNewCriterion(Object2Peer.BOUWLAGEN, "%4%", Criteria.LIKE);
criteria.add(criterion);
objects = ObjectsPeer.doSelect(criteria);
 
I did take a look in de the BasePeer.java. The NullPointerException is
thrown because the table "OBJECT_2" is not part of the dbMap. 
When I print the contents of this Map I get the following result.
 
- ID_TABLE
- OBJECTEN
 
OBJECT_2  is not part of it but I use it in my query.
 
Because I set the ignore case it will check in the code if the column type
is equal to String. Because OBJECT_2 is not part of the dbMap it cannot get
the table description of OBJECT_2 and it it will throw a
NullPointerException. 
 
Does anyone know how to solve it?
 
Thanks for your time!
 
Kind regards,
Robert Kromkamp
 
 
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at nl.pagelink.engine.common.CommonEngine.getObjectsByCriteria(Unknown
Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
 at sun.rmi.transport.Transport$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.torque.TorqueException: java.lang.NullPointerException
 at org.apache.torque.util.BasePeer.throwTorqueException(BasePeer.java:200)
 at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1204)
 at nl.pagelink.torque.opm.BaseObjectenPeer.doSelectVillageRecords(Unknown
Source)
 at nl.pagelink.torque.opm.BaseObjectenPeer.doSelectVillageRecords(Unknown
Source)
 at nl.pagelink.torque.opm.BaseObjectenPeer.doSelect(Unknown Source)
 ... 16 more
Caused by: java.lang.NullPointerException
 at org.apache.torque.util.BasePeer.createQuery(BasePeer.java:1015)
 at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1221)
 at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1198)
 ... 19 more
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message