db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <s...@gtsdesign.com>
Subject NPE in doDelete(Criteria)
Date Mon, 01 Mar 2004 23:27:21 GMT
Hi --

I am encountering an NPE in doDelete(Criteria).  The two following
snippets are run in an integration test.  The first one works fine, the
second one throws an NPE.

-----
        Criteria criteria = new Criteria("rc4");
	criteria.add(SessMainPeer.ID, sessionKey);
	criteria.setSingleRecord(true);
	Collection sessions = SessMainPeer.doSelect(criteria);

-----

        Criteria criteria = new Criteria("rc4");
	criteria.add(SessMainPeer.ID, sessionKey);
	SessMainPeer.doDelete(criteria);

-----

Here's the stack dump:

    [junit] java.lang.NullPointerException
    [junit]     at
org.apache.torque.util.BasePeer.doDelete(BasePeer.java:530)
    [junit]     at
org.apache.torque.util.BasePeer.doDelete(BasePeer.java:446)
    [junit]     at
xxxxxxxxxxxxxxxxxxxxxxxx.BaseSessMainPeer.doDelete(BaseSessMainPeer.java:495)
    [junit]     at
xxxxxxxxxxxxxxxxxxxxxxxx.BaseSessMainPeer.doDelete(BaseSessMainPeer.java:468)
    [junit]     at
xxxxxxxxxxxxxxxxxxxxxx.TorqueMerchantSessionDAO.activate(TorqueMerchantSessionDAO.java:32)
    [junit]     at
test.jfe.main.util.TorqueMerchantSessionDAOTest.testTorqueMerchantSessionDAO(TorqueMerchantSessionDAOTest.java:105)
    [junit]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
    [junit]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [junit]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


-------

Here's the configuration:

torque.database.rc4.adapter=mysql
torque.dsfactory.rc4.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
torque.dsfactory.rc4.jndi.path=java:comp/env/jdbc/rc4

torque.database.rc4_summary.adapter=mysql
torque.dsfactory.rc4_summary.factory=org.apache.torque.dsfactory.JndiDataSourceFactory
torque.dsfactory.rc4_summary.jndi.path=java:comp/env/jdbc/rc4_summary




I found a reference to this problem on line
(http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg13240.html)
but no solution was ever posted.

When I dump the map for the "rc4" database, it contains only the
ID_TABLE entry.

Any hints would be greatly appreciated...

	Gary

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