ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Dave" <rash...@persistent.co.in>
Subject NPE with iBATIS - queryForObject
Date Fri, 20 Jan 2006 16:02:55 GMT
We have used ABATOR to generate DAO classes for tables in Oracle. 
The SQLMap.xml generated by abator is unchanged. I have the following
daoconfig

<daoConfig>
 <context id="sqlmap">
  <transactionManager type="SQLMAP">
  <property name="SqlMapConfigResource" value=
   "com/eobone/uam/dblayer/impl/sqlmap/EOBNE_USERS_SqlMap.xml"/>
  </transactionManager>
  <dao interface="com.uam.dblayer.dao.UsersDAO"
   implementation=
   "com.uam.dblayer.dao.UsersDAOImpl"/>
 </context>
</daoConfig>



Code to call this

// TODO Auto-generated method stub
        Reader reader=
            Resources.getResourceAsReader("daoConfig.xml");
        daoManager =
            DaoManagerBuilder.buildDaoManager(reader);
		usersdao = new UsersDAOImpl(daoManager);
		UsersKey ukey = new UsersKey();
            ukey.setUserId(new BigDecimal(1));
            Users users = null;
            users = usersdao.selectByPrimaryKey(ukey);

The exception occurs at the selectByPrimaryKey. I am not sure what is wrong.
Any pointers on this please ASAP would be very helpful.

TIA

~Rashmi


Mime
View raw message