为了账号安全,请及时绑定邮箱和手机立即绑定

导入了servlet包没有用,加了构造函数还是没用啊?

导入了servlet包没有用,加了构造函数还是没用啊?

四季花海 2023-03-18 18:14:50
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chargeoffDetailAction' defined in file [D:\apache-tomcat-6.0.26\webapps\CreditService\WEB-INF\classes\applicationContext-action.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.db.credit.loan.inloan.chargeoff.action.ChargeoffDetailAction]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: The import javax.servlet.ServletContext cannot be resolvedThe import javax.servlet.http.HttpServletRequest cannot be resolvedThe import javax.servlet.http.HttpServletResponse cannot be resolvedThe import javax.servlet.http.HttpSession cannot be resolvedHttpServletResponse cannot be resolved to a typeThe method getRequest() is undefined for the type BaseAction<T>The method getRequest() is undefined for the type BaseAction<T>The method getRequest() is undefined for the type BaseAction<T>HttpServletRequest cannot be resolved to a typeHttpServletResponse cannot be resolved to a typeHttpSession cannot be resolved to a typeServletContext cannot be resolved to a typeThe method getServletContext() is undefined for the type BaseAction<T>at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)at com.db.credit.loan.inloan.chargeoff.action.ChargeoffDetailAction.<init>(ChargeoffDetailAction.java:37)at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)at java.lang.reflect.Constructor.newInstance(Constructor.java:513)at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)... 30 more
查看完整描述

1 回答

?
慕容708150

TA贡献1831条经验 获得超4个赞

你的spring application.xml配置错误,或者加载的东西不存在,导致初始化加载失败

查看完整回答
反对 回复 2023-03-21
  • 1 回答
  • 0 关注
  • 96 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信