[Broker] INFO [main] org.springframework.web.struts.ContextLoaderPlugIn.init(218) | ContextLoaderPlugIn for Struts ActionServlet 'action, module '': initialization started
[Broker] INFO [main] org.apache.catalina.core.ApplicationContext.log(647) | Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
[Broker] INFO [main] org.springframework.context.support.AbstractApplicationContext.prepareRefresh(378) | Refreshing org.springframework.web.context.support.XmlWebApplicationContext@16e334a: display name [WebApplicationContext for namespace 'action-servlet']; startup date [Mon Mar 03 11:51:01 CST 2008]; root of context hierarchy
[Broker] INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(293) | Loading XML bean definitions from ServletContext resource [/WEB-INF/beans.xml]
[Broker] INFO [main] org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(393) | Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@16e334a]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1fb2ef9
[Broker] INFO [main] org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(275) | Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fb2ef9: defining beans [dataSource,sessionFactory,Factory,logindao,loginservice,/userLogin]; root of factory hierarchy
[Broker] INFO [main] org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(743) | Building new Hibernate SessionFactory
[Broker] INFO [main] org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(298) | Using context class 'org.springframework.web.context.support.XmlWebApplicationContext' for servlet 'action'
[Broker] INFO [main] org.springframework.web.struts.ContextLoaderPlugIn.init(235) | ContextLoaderPlugIn for Struts ActionServlet 'action', module '': initialization completed in 18390 ms

解决方案 »

  1.   

    折腾了半天,自己的BasicDAO有问题,static的就没问题了
    不过疑问似乎更多了
      

  2.   

    <list>
                    <value>org/lostrue/model/Logintable.hbm.xml</value>
                </list>中间是不是少了几行
      

  3.   

    看完你的代码我很晕的说~~首先:
    既然使用了Spring DAO为什么不继承HibernateDaoSupport呢?这样用Spring控制session,不是更好些吗?其次:
    你贴的1楼的log好像都是info信息。连告警都没有,怎么挑找问题的??最后:
    思路没问题的说,只是在实现上很混乱。
      

  4.   

    附上 继承HibernateDaoSupport的一些方法。首先 DAO继承HibernateDaoSupportpublic class UsersDAO extends HibernateDaoSupport {
        
        //findbyId 等DAO方法。不用考虑session
        public Users FindById(Long Id) {
          ...
        }
    }
    其次配置时注入<!-- DAO -->
    <bean id="alarmDAO" class="com.telestone.web.dao.AlarmDAO">
    <property name="entityManagerFactory"
    ref="entityManagerFactory" />
    </bean>
      

  5.   


    呵呵,楼上的有道理,其实spring对hibernate已经进行了封装
      

  6.   

    我只用Spring控制代码之间的依耐关系。
    DAO以前封装好了
    session我给filter管理了