引起:org.jboss.as.server.deployment.DeploymentUnitProcessingException:WFLYEE0024:无法配置组件

时间:2018-06-04 13:25:21

标签: java web-services deployment wildfly

我试图在wildfly(JBOSS 8)中部署我的战争,但在部署时遇到此错误:

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component com.project.UpdateSubscriberInfoImpl
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0048: Could not find default constructor for class com.project.UpdateSubscriberInfoImpl\

这是我的UpdateSubscriberInfoImpl.java

@WebService(
    serviceName = "UpdateSubscriberInfo",
    portName = "UpdateSubscriberInfoSOAP",
    targetNamespace = "http://myproject.com",
    endpointInterface = "com.project.UpdateSubscriberInfo")
@SchemaValidation
@GuiceManaged(modules = {ProjectWSModule.class})
public class UpdateSubscriberInfoImpl implements UpdateSubscriberInfo {

private final WsUtils wsUtils;
private final UpdateSubscriberInfoWsDataProcessor wsDataProcessor;

@Inject
public UpdateSubscriberInfoImpl(WsUtils wsUtils, UpdateSubscriberInfoWsDataProcessor updateSubscriberInfoWsDataProcessor) {
    this.wsUtils = wsUtils;
    wsDataProcessor = updateSubscriberInfoWsDataProcessor;
}

public UpdateSubscriberInfoResponse updateSubscriberInfo(UpdateSubscriberInfoRequest updateSubscriberInfoRequest) {
    return wsUtils.executeWsProcess(updateSubscriberInfoRequest, ServiceOperation.UPDATE_SUBSCRIBER, null, wsDataProcessor);
}
}

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

问题很简单。

Could not find default constructor for class com.project.UpdateSubscriberInfoImpl

您已将@Inject注释用于UpdateSubscriberInfoImpl类的参数构造函数,但您尚未提供默认的非args结构函数。

请为您的班级添加默认构造函数。

public UpdateSubscriberInfoImpl() {

}