MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » spring+ibatis+struts的一个小东西,出了个错,烦劳

spring+ibatis+struts的一个小东西,出了个错,烦劳大家看看

www.MyException.Cn  网友分享于:2013-11-28  浏览:279次
spring+ibatis+struts的一个小东西,出了个错,麻烦大家看看
先看网页上的错误信息吧:
javax.servlet.ServletException:   Error   creating   bean   with   name   'managerFacade '   defined   in   class   path   resource   [spring.xml]:   Cannot   resolve   reference   to   bean   'managerImpl '   while   setting   bean   property   'managerServiceImpl ';   nested   exception   is   org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'managerImpl '   defined   in   class   path   resource   [spring.xml]:   Cannot   resolve   reference   to   bean   'questionsDao '   while   setting   bean   property   'questionsDao ';   nested   exception   is   org.springframework.beans.factory.BeanCreationException:   Error   creating   bean   with   name   'questionsDao '   defined   in   class   path   resource   [spring.xml]:   Instantiation   of   bean   failed;   nested   exception   is   org.springframework.beans.BeanInstantiationException:   Could   not   instantiate   bean   class   [com.webexam.dao.QuestionsDao]:   Constructor   threw   exception;   nested   exception   is   com.ibatis.common.exception.NestedRuntimeException:   Error   occurred.     Cause:   com.ibatis.common.xml.NodeletException:   Error   parsing   XML.     Cause:   com.ibatis.common.exception.NestedRuntimeException:   Error   parsing   XPath   '/sqlMapConfig/sqlMap '.     Cause:   com.ibatis.common.xml.NodeletException:   Error   parsing   XML.     Cause:   com.ibatis.common.exception.NestedRuntimeException:   Error   parsing   XPath   '/sqlMap/resultMap/result '.     Cause:   com.ibatis.common.exception.NestedRuntimeException:   Error.     Could   not   set   TypeHandler.     Cause:   java.lang.ClassNotFoundException:   String
Caused   by:   java.lang.ClassNotFoundException:   String
上面的只是第一行。。。

我的spring.xml文件比较简单:
<bean   id= "questionsDao "
    class= "com.webexam.dao.QuestionsDao ">
</bean>

<bean   id= "managerImpl "           class= "com.webexam.Service.Manager.ManagerServiceImpl "       singleton= "false ">
      <property   name= "questionsDao ">
<ref   local= "questionsDao "> </ref>
      </property>
</bean>

<bean   id= "managerFacade "   class= "com.webexam.Service.Manager.ManagerServiceFacade "   singleton   = "false ">
    <property   name   =   "managerServiceImpl ">
          <ref   local= "managerImpl "/>
    </property>
</bean>

另外,ManagerServiceImpl和ManagerServiceFacade也比较简单,就是set/get方法:

ManagerServiceImpl文件:
public   class   ManagerServiceImpl   {
private   QuestionsDao   questionsDao;

public   QuestionsDao   getQuestionsDao()   {
return   questionsDao;
}

public   void   setQuestionsDao(QuestionsDao   questionsDao)   {

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有