ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Ski <paulsk...@hotmail.com>
Subject RE: java.lang.InstantiationException using Ibatis DAO
Date Mon, 08 Sep 2008 09:31:13 GMT

com.ibatis.dao.client.DaoException: Error while configuring DaoManager.  Cause: com.ibatis.dao.client.DaoException:
Error configuring DAO.  Cause: java.lang.InstantiationException: com.intient.smash.ibatis.impl.AliasesDAOImpl
at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(XmlDaoManagerBuilder.java:129)
at com.ibatis.dao.client.DaoManagerBuilder.buildDaoManager(DaoManagerBuilder.java:59) at com.intient.smash.DaoManagerMapper.<clinit>(DaoManagerMapper.java:17)
at com.intient.smash.TestDaoManagerMapper.<init>(TestDaoManagerMapper.java:13) at com.intient.smash.TestDaoManagerMapper.main(TestDaoManagerMapper.java:39)Caused
by: com.ibatis.dao.client.DaoException: Error configuring DAO.  Cause: java.lang.InstantiationException:
com.intient.smash.ibatis.impl.AliasesDAOImpl at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseDao(XmlDaoManagerBuilder.java:231)
at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseContext(XmlDaoManagerBuilder.java:160)
at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(XmlDaoManagerBuilder.java:102)
... 4 moreCaused by: java.lang.InstantiationException: com.intient.smash.ibatis.impl.AliasesDAOImpl
at java.lang.Class.newInstance0(Class.java:340) at java.lang.Class.newInstance(Class.java:308)
at com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseDao(XmlDaoManagerBuilder.java:225)
... 6 moreException in thread "main" java.lang.ExceptionInInitializerError at com.intient.smash.TestDaoManagerMapper.<init>(TestDaoManagerMapper.java:13)
at com.intient.smash.TestDaoManagerMapper.main(TestDaoManagerMapper.java:39)Caused by: java.lang.RuntimeException:
Could not initialize DaoManager. Cause: com.ibatis.dao.client.DaoException: Error while configuring
DaoManager.  Cause: com.ibatis.dao.client.DaoException: Error configuring DAO.  Cause: java.lang.InstantiationException:
com.intient.smash.ibatis.impl.AliasesDAOImpl at com.intient.smash.DaoManagerMapper.<clinit>(DaoManagerMapper.java:22)
... 2 more

Subject: RE: java.lang.InstantiationException using Ibatis DAODate: Mon, 8 Sep 2008 09:55:56
+0200From: n.beekman@wis.nlTo: user-java@ibatis.apache.org






Can you post the complete stacktrace?
 




From: Paul Ski [mailto:paulski82@hotmail.com] Sent: Monday, September 08, 2008 9:14 AMTo:
user-java@ibatis.apache.orgSubject: RE: java.lang.InstantiationException using Ibatis DAO
 
My DAO and DAOImlp classes were generated by Ibator.  The only generated constructor for AliasesDAOImpl
is below: ---snip--- /**  * This method was generated by Abator for iBATIS. This method corresponds
to the database table aliases  * @abatorgenerated  Fri Sep 05 23:35:30 EST 2008  */ public
AliasesDAOImpl ( SqlMapClient sqlMapClient ) {  super ();  this.sqlMapClient = sqlMapClient;
}---snip---Is there a config option for abatorConfig.xml that tells Ibator to build classes
including a constructor that takes a DaoManager object? Thanks, Paul



Subject: RE: java.lang.InstantiationException using Ibatis DAODate: Mon, 8 Sep 2008 08:56:37
+0200From: n.beekman@wis.nlTo: user-java@ibatis.apache.org

Your AliasesDaoImpl should have a public constructor that takes a DaoManager as its single
argument. Can you check that this is the case?
 
Hth,
 
Niels
_________________________________________________________________
It's simple! Sell your car for just $40 at CarPoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT
Mime
View raw message