--Environment --Windows10 64bit version 1909 - openjdk 11 2018-09-25 - Eclipse IDE for Enterprise Java Developers Version: 2020-03 (4.15.0) - JSF 2.3.9
Dialog error
cannot Deploy app-name
deploy is failing=Error occurred during deployment:
Exception while loading the app :
CDI deployment failure:WELD-001408:
Unsatisfied dependencies for type HogeBean with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private jp.co.ç.bean
at jp.co.ponsuke.HogeController.bean(HogeController.java:0)
-- WELD-001408: Unsatisfied dependencies for type HogeBean with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private jp.co.ponsuke.HogeController.bean
at jp.co.ponsuke.HogeController.bean(HogeController.java:0).
Please see server.log for more details.
@Inject
.Classes injected with CDI must have some scope annotation. Introduction to Easy-to-understand Java EE Web System-Shuwa System
HogeController.java
/**Display bean. */
@Getter
@Inject
private HogeBean bean;
There is no scope annotation ... It doesn't even implement the Serializable interface ...
HogeBean.java
import lombok.Builder;
import lombok.Value;
@Value
@Builder
public class HogeBean {
@NonNull
Integer fileSize;
@NonNull
String extensions;
}
@Inject
I didn't have to add it in the first place, so I'll delete it.
HogeController.java
/**Display bean. */
@Getter
private HogeBean bean;
For some time ... It seems that it can be handled by adding @Model
or writing it in beans.xml
.
jsf - WELD-001408: Unsatisfied dependencies for type Customer with qualifiers @Default - Stack Overflow
Recommended Posts