ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sheehan, Andrew" <AJShee...@doe.mass.edu>
Subject RE: NullPointerException coming from StandardDaoManager
Date Mon, 25 Apr 2005 17:20:59 GMT
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 <AJSheehan@doe.mass.edu> 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
> 
> <transactionManager type="JDBC">
>     <dataSource type="DBCP">
> ...
> 
> -----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
> 
> <transactionManager type="JDBC">
>     <dataSource type="DBCP">
> ...
> 
> -----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 <AJSheehan@doe.mass.edu> 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.
>

Mime
View raw message