您的位置:首页 > 其它

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: