ERROR ContextLoader:204 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'studentDao' defined in ServletContext resource [/WEB-INF/applicationContext-common.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dao.StudentDao]: Constructor threw exception; nested exception is java.lang.NullPointerException
Caused by: 
org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dao.StudentDao]: Constructor threw exception; nested exception is java.lang.NullPointerException
Caused by: 
java.lang.NullPointerException
at org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSession(HibernateDaoSupport.java:140)
at com.dao.StudentDao.<init>(StudentDao.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
SSH2异常

解决方案 »

  1.   

    贴spring的配置。。有bean没注入。。
      

  2.   

    找不到实例化类: com.dao.StudentDao 查看一下你的配置文件: /WEB-INF/applicationContext-common.xml是不是没有配置,或者引用地址写错
      

  3.   

    Error creating bean with name 'studentDao' defined in ServletContext resource [/WEB-INF/applicationContext-common.xml]
    studentDao 这个自己检查下 是不是没注入
      

  4.   

    实例化'studentDao失败了,
    把配置贴出来
      

  5.   

    Could not instantiate bean class [com.dao.StudentDao]
    class路径写错了吧