异常信息如下:
2010-3-25 18:16:12 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'seessionFactory' of bean class [cn.com.dao.impl.UserDAOImpl]: Bean property 'seessionFactory' is not writable or has an invalid setter method. Did you mean 'sessionFactory'?
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'seessionFactory' of bean class [cn.com.dao.impl.UserDAOImpl]: Bean property 'seessionFactory' is not writable or has an invalid setter method. Did you mean 'sessionFactory'?
 at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:751)
 at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:608)
 at org.springframework.beans.AbstractPropertyAccessor.setPropertyValue(AbstractPropertyAccessor.java:49)
 at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:74)
applicationContext.xml如下:
 <!-- 数据源配置 -->
  <bean id="Bean_ID"
  class="org.apache.commons.dbcp.BasicDataSource">
  <property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
  <property name="url" value="jdbc:mysql://localhost:3306/usertest?useUnicode=true&characterEncoding=gbk"></property>
  <property name="username" value="root"></property>
  <property name="password" value="123"></property>
  </bean>
  
     <!-- 会话工厂配置  Sessionfactory -->
   <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
     <property name="dataSource" ref="Bean_ID"></property>
     
     <!-- 配置方言 -->
     <property name="hibernateProperties">
        <props>
           <prop key="hibernate.dialect">
              org.hibernate.dialect.MySQLDialect
           </prop>
        </props>
     </property>
     <!-- 映射hibernate文件 -->
     <property name="mappingResources">
       <list>
         <value>cn/com/vo/User.hbm.xml</value>
       </list>
     </property>
   </bean>
   
   <!-- 配置dao -->
   <bean id="userDAO" class="cn.com.dao.impl.UserDAOImpl">
     <property name="seessionFactory" ref="sessionFactory"></property>
   </bean>
   
   <!-- 配置manager -->
     <bean id="userManager" class="cn.com.manager.impl.UserManagerImpl">
        <property name="userDAO" ref="userDAO"></property>
     </bean>
   
  <!-- 配置struts2 -->
  <bean id="userLogin" class="cn.com.action.UserAction">
    <property name="userManager" ref="userManager"></property>
  </bean> 
问题补充:struts2.xml如下:
<struts>
 <!-- 将struts2交给spring管理 -->
  <constant name="struts.objectFactory" value="spring"></constant>
  <include file="struts-default.xml"></include>       <package name="default" extends="struts-default" namespace="/">
     <action name="login" class="userLogin">
        <result name="success">/success.jsp</result>
        <result name="failed">/error.jsp</result>
     </action>
     </package>
</struts>

解决方案 »

  1.   

    我感觉是你下面这个出问题了,你这个到实现类是继承了HibernateDaoSuppport类吧
    <!-- 配置dao -->
    <bean id="userDAO" class="cn.com.dao.impl.UserDAOImpl">
    <property name="seessionFactory" ref="sessionFactory"></property>
    </bean>你这个<property name="seessionFactory" ref="sessionFactory"></property>可能有点问题
     我觉得这个 name=“sessionFactory”  你应该是多写了个“e”;
      

  2.   

    楼主可以把web.xml的代码发出来吗? 我觉得是那里的问
      

  3.   

    应该是web.xml中 filter-class 的问题吧
      

  4.   

    报错已经定位得很清楚了,检查你的cn.com.dao.impl.UserDAOImpl类里的成员属性
      

  5.   

    你web.xml的监听ContextLoaderListener
    路径是否正确
      

  6.   

    监听器的路经查看一下 spring配置文件的路径
      

  7.   

    property 'seessionFactory' ....配置DAO层写多了个e...