【问题标题】:Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0024: Could not configure component引起:org.jboss.as.server.deployment.DeploymentUnitProcessingException:WFLYEE0024:无法配置组件
【发布时间】:2018-06-04 13:25:20
【问题描述】:

我正在尝试在 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);
}
}

有什么想法吗?

【问题讨论】:

    标签: java web-services deployment wildfly


    【解决方案1】:

    问题很简单。

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

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

    请为您的类添加一个默认构造函数。

    public UpdateSubscriberInfoImpl() {
    
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-12
      • 2017-05-21
      • 1970-01-01
      • 2022-11-03
      • 2017-07-08
      • 1970-01-01
      相关资源
      最近更新 更多