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 RE: NullPointerException BasePeer within torque-3.1.1
Date Fri, 25 Feb 2005 15:03:32 GMT
I hope the solution is that easy ... but when i change it to the correct
spelling i get the same result  :-)

-----Original Message-----
From: Brent Atkins [mailto:brent.atkins@pro-sys.biz]
Sent: vrijdag 25 februari 2005 15:59
To: Apache Torque Users List
Subject: Re: NullPointerException BasePeer within torque-3.1.1


I can tell you that you misspelled setIgnoreCase...

Robert Kromkamp wrote:

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


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

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