ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niels Beekman" <n.beek...@wis.nl>
Subject RE: java.lang.InstantiationException using Ibatis DAO
Date Mon, 08 Sep 2008 09:37:14 GMT
Please include the contents of
com.intient.smash.ibatis.impl.AliasesDAOImpl, this has definitely
something to do with class/member visibility.

________________________________

From: Paul Ski [mailto:paulski82@hotmail.com] 
Sent: Monday, September 08, 2008 11:31 AM
To: user-java@ibatis.apache.org
Subject: RE: java.lang.InstantiationException using Ibatis DAO

 

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(X
mlDaoManagerBuilder.java:129)
 at
com.ibatis.dao.client.DaoManagerBuilder.buildDaoManager(DaoManagerBuilde
r.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(XmlDaoMa
nagerBuilder.java:231)
 at
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.parseContext(XmlD
aoManagerBuilder.java:160)
 at
com.ibatis.dao.engine.builder.xml.XmlDaoManagerBuilder.buildDaoManager(X
mlDaoManagerBuilder.java:102)
 ... 4 more
Caused 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(XmlDaoMa
nagerBuilder.java:225)
 ... 6 more
Exception 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 DAO
Date: Mon, 8 Sep 2008 09:55:56 +0200
From: n.beekman@wis.nl
To: 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 AM
To: user-java@ibatis.apache.org
Subject: 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 DAO
Date: Mon, 8 Sep 2008 08:56:37 +0200
From: n.beekman@wis.nl
To: 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

 

________________________________

Sell your car for just $40 at CarPoint.com.au It's simple!
<http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldw
ide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F10
04813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT> 


Mime
View raw message