首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

BeanDefinitionStoreException错误,碰到过的帮忙看看吧,

2011-11-15 
BeanDefinitionStoreException异常,碰到过的大虾帮忙看看吧,急~各位大虾帮帮忙,小弟刚接触spring,但是在用

BeanDefinitionStoreException异常,碰到过的大虾帮忙看看吧,急~
各位大虾帮帮忙,小弟刚接触spring,但是在用SSH时候读取Spring配置文件的时候出现的错误如下:
 org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'accountDAO' defined in file [/WEB-INF/applicationContext.xml]: Bean class [import com.worthtech.billportal.dao.hibernate.AccountHibernateDAO] not found; nested exception is java.lang.ClassNotFoundException: import com/worthtech/billportal/dao/AccountDAO

java.lang.ClassNotFoundException: import com/worthtech/billportal/dao/AccountDAO
  ......

我已经写了setter,getter了啊,怎么还报错啊?谢谢哪位大哥指点迷津!
  private AccountDAO accountDAO;
public AccountDAO getAccountDAO() {
return accountDAO;
}
public void setAccountDAO(AccountDAO accountDAO) {
this.accountDAO = accountDAO;
}

[解决办法]
in file [/WEB-INF/applicationContext.xml]: 
Bean class [import.com.worthtech.billportal.dao.hibernate.AccountHibernateDAO] not found
---------------------------
没找到,确认下配置和路径之类的吧.
[解决办法]
在spring配置文件中没有bean 'accountDAO' 

[解决办法]
>_< 说错,在spring配置文件中 bean 'accountDAO' 配置错误..
多了import
[解决办法]
...那你应该把
private AccountDAO accountDAO; 
public AccountDAO getAccountDAO() { 
return accountDAO; 

public void setAccountDAO(AccountDAO accountDAO) { 
this.accountDAO = accountDAO; 

放在AccountServiceImp 里面
然后调用dao方法

热点排行