I am having even more fundamental problems. I get a NullPointerException in the 
following line in my DaoBase:





    public Object create(final int transform, final 
com.sapient.trade.Trade trade)

    {

        if (trade == null)

        {

            throw new 
IllegalArgumentException(

                "Trade.create - 'trade' 
can not be null");

        }

        Object identifier = 
this.getHibernateTemplate&#40;&#41;.save&#40;trade&#41;; <-- 
NullPointerException here

&nbsp; &nbsp; &nbsp; &nbsp; 
trade.setId&#40;&#40;java.lang.Long&#41;identifier&#41;;

&nbsp; &nbsp; &nbsp; &nbsp; return this.transformEntity&#40;transform, 
trade&#41;;

&nbsp; &nbsp; &#125;





Here's my simple test which tries to call the Dao:





&nbsp; &nbsp; public void testCreateTrade&#40;&#41; throws Exception

&nbsp; &nbsp; &#123;

&nbsp; &nbsp; &nbsp; &nbsp; TradeDao tradeDao = new TradeDaoImpl&#40;&#41;;

&nbsp; &nbsp; &nbsp; &nbsp; tradeDao.create&#40;this.trade&#41;;

&nbsp; &nbsp; &#125;





What could I be doing wrong?
_________________________________________________________
Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=3448#3448
Posting to http://forum.andromda.org/ is preferred over posting to the mailing 
list!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Andromda-user mailing list
Andromda-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to