NoSuchMethodException <init>()
2016-03-24 18:03
295 查看
1. Question Description:
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/newppms] threw exception [Request processing failed;
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cdv.ppms.web.model.PpmsUser]:
No default constructor found; nested exception is java.lang.NoSuchMethodException: com.cdv.ppms.web.model.PpmsUser.<init>()] with root cause
java.lang.NoSuchMethodException: com.cdv.ppms.web.model.PpmsUser.<init>()
at java.lang.Class.getConstructor0(Class.java:2902)
at java.lang.Class.getDeclaredConstructor(Class.java:2066)
2. Analysis:
As the error message say , default constructor not found.
It must be create Constructor with parameters but not create the Constructor with no parameters,
so the default Constructor was covered.
3. Solution:
Add the default Constructor with no parameters.
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/newppms] threw exception [Request processing failed;
nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.cdv.ppms.web.model.PpmsUser]:
No default constructor found; nested exception is java.lang.NoSuchMethodException: com.cdv.ppms.web.model.PpmsUser.<init>()] with root cause
java.lang.NoSuchMethodException: com.cdv.ppms.web.model.PpmsUser.<init>()
at java.lang.Class.getConstructor0(Class.java:2902)
at java.lang.Class.getDeclaredConstructor(Class.java:2066)
2. Analysis:
As the error message say , default constructor not found.
It must be create Constructor with parameters but not create the Constructor with no parameters,
so the default Constructor was covered.
3. Solution:
Add the default Constructor with no parameters.
相关文章推荐
- vlookup使用案例
- 健康1
- CentOS最小化安装系统开启网卡
- 抄书问题2 (复制书稿) 单调性优化dp + 序列划分模型
- Linux日志文件与syslog函数介绍
- iOS 真机Could not find Developer Disk Image
- arm 指令集
- iOS —— Attributes文字的操作,TextFiel框内文字颜色大小等改变
- Android五大基本组件
- 【嵌入式开发板学习分享】2016年最新迅为4412开发板手册
- 绘制路径
- 4.8资源和限制
- 不错的文章
- 如何查看.class文件的JDK编译版本
- 改变Android状态栏字体颜色和实现沉浸式状态栏
- Android 仿iOS时间选择器自定义WheelView
- android学习——AndroidManifest.xml清单文件的重要性
- 对HDFS的底层实现原理认识
- 机器学习-CrossValidation交叉验证
- Eclipse卸载插件SpringSoource-tool-suite