拜托各位了,这是报错信息的一部分。

在ssh2框架下,忽然整个userAction下的action都不可用了。之前的修改是在userAction的login方法里设置登录成功则将user对象插入httpSession;在报错后撤销修改,但是仍然不行。
报错信息如下:
exception 

Unable to instantiate Action, list, defined for 'listUser' in namespace '/'Error creating bean with name 'list' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.camp.action.UserAction]: Constructor threw exception; nested exception is java.lang.NullPointerException

root cause 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'list' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.camp.action.UserAction]: Constructor threw exception; nested exception is java.lang.NullPointerException
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:451)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:270)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

root cause 

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [cn.camp.action.UserAction]: Constructor threw exception; nested exception is java.lang.NullPointerException
在网上搜了一下相关内容,都没有这种情况。现在是其他的action都可用,就是userAction下的所有方法都不行了,不知道为什么

不负相思意
浏览 65回答 1
1回答

炎炎设计

Constructor threw exception,查看一下你的构造函数,或者你的set方法的参数
打开App,查看更多内容
随时随地看视频慕课网APP