Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 39482 invoked from network); 25 Apr 2005 17:24:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Apr 2005 17:24:46 -0000 Received: (qmail 51437 invoked by uid 500); 25 Apr 2005 17:25:17 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 51289 invoked by uid 500); 25 Apr 2005 17:25:16 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 51273 invoked by uid 99); 25 Apr 2005 17:25:15 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from terminator1.doe.mass.edu (HELO terminator1.doe.mass.edu) (134.241.180.10) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 25 Apr 2005 10:25:15 -0700 Received: from exchange1.doe.mass.edu (smtp.doe.mass.edu [134.241.180.4]) by terminator1.doe.mass.edu (Switch-3.1.2/Switch-3.1.2) with ESMTP id X3PH0Q6R700000758 for ; Mon, 25 Apr 2005 13:26:06 -0400 Received: by doe.mass.edu with Internet Mail Service (5.5.2657.72) id <282393K5>; Mon, 25 Apr 2005 13:21:02 -0400 Message-ID: From: "Sheehan, Andrew" To: "'ibatis-user-java@incubator.apache.org'" Subject: RE: NullPointerException coming from StandardDaoManager Date: Mon, 25 Apr 2005 13:20:59 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain X-MessageInspectorSig: cac1a02d19f718698b7224a3cfa409f0 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I found it. I had a copy of the dao.xml, taken from the jpetstore4.0.5 example. In that file, the type is set to type="SQLMAP">, and the allowed types are "JDBC", "JTA", and "EXTERNAL". That's why it was return null on me, I believe. Thank for the help. -Andrew -----Original Message----- From: Brandon Goodin [mailto:brandon.goodin@gmail.com] Sent: Monday, April 25, 2005 12:53 PM To: ibatis-user-java@incubator.apache.org Subject: Re: NullPointerException coming from StandardDaoManager please post your dao.xml and the code that calls the daoManager. Brandon On 4/25/05, Sheehan, Andrew wrote: > Yes, I do. I am using the iBATIS Developer Guide as a reference on this. > Would specifying this in my config file dictate something my code should > reference? > > Andrew > > > > ... > > -----Original Message----- > From: Sheehan, Andrew > Sent: Monday, April 25, 2005 11:38 AM > To: 'Brandon Goodin' > Subject: RE: NullPointerException coming from StandardDaoManager > > Yes, I do. I am using the iBATIS Developer Guide as a reference on this. > Would specifying this in my config file dictate something my code should > reference? > > Andrew > > > > ... > > -----Original Message----- > From: Brandon Goodin [mailto:brandon.goodin@gmail.com] > Sent: Monday, April 25, 2005 11:31 AM > To: ibatis-user-java@incubator.apache.org > Subject: Re: NullPointerException coming from StandardDaoManager > > do you have a transactionManager configured for your context? > > Brandon > > On 4/25/05, Sheehan, Andrew wrote: > > > > > > > > Has anyone seen this issue? > > > > > > > > I am receiving a NullPointerException within the > > [com.ibatis.dao.engine.impl.]StandardDaoManager class when It tries to > > invoke getTransaction() on my DAO. The > > > > exception is occuring below: (source is from StandardDaoManager.java) > > > > > > > > public DaoTransaction getTransaction(Dao dao) { > > > > DaoImpl impl = (DaoImpl) daoImplMap.get(dao); > > > > return impl.getDaoContext().getTransaction(); <-- > NullPointerException > > > > } > > > > > > > > In this particular case, I do not have any required transactions setup for > > this DAO; just a simple select (like 'select count(1) from dual'...) I > > have checked my DaoConfig object - it appears to be fine. I'm trying to > > figure out if it has to do with my sqlMap declaration in my > > sql-map-config.xml file, or is that my DaoConfig loaded, but incorrectly, > or > > .... > > > > > > > > Does anyone have any pointers on this? > > > > > > > > Thanks. >