项目

一般

简介

部署springboot应用war包失败, 报CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default

陈 泽豪大约 2 年 之前添加

部署springboot应用war包失败,提示com.apusic.aas.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default

版本:20221116

应用信息:此springboot应用在WEB-INF目录下没有相关web.xml文件,是通过nacos注册中心配置的

异常信息:

[2022-11-21T14:20:55] [] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=67 _ThreadName=ApusicLogManager] [timeMillis: 1669011655687] [levelValue: 1000] [[
  Exception during lifecycle processing
com.apusic.aas.deployment.common.DeploymentException: CDI deployment failure:WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default
  at injection point [UnbackedAnnotatedField] @Inject private org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor.validator
  at org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor.validator(ValidationInterceptor.java:0)
WELD-001475: The following beans match by type, but none have matching qualifiers:
  - ValidatorBean [id=org.hibernate.validator.cdi.internal.ValidatorBean_hv]

    at com.apusic.aas.weld.WeldDeployer.event(WeldDeployer.java:215)
    at com.apusic.aas.kernel.event.EventsImpl.send(EventsImpl.java:107)
    at com.apusic.aas.internal.data.ApplicationInfo.load(ApplicationInfo.java:311)
    at com.apusic.enterprise.v10.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:475)
    at com.apusic.enterprise.v10.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:412)
    at com.apusic.enterprise.v10.server.ApplicationLoaderService$1.run(ApplicationLoaderService.java:228)
    at java.lang.Thread.run(Thread.java:750)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Validator with qualifiers @Default
  at injection point [UnbackedAnnotatedField] @Inject private org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor.validator
  at org.hibernate.validator.cdi.internal.interceptor.ValidationInterceptor.validator(ValidationInterceptor.java:0)
WELD-001475: The following beans match by type, but none have matching qualifiers:
  - ValidatorBean [id=org.hibernate.validator.cdi.internal.ValidatorBean_hv]

    at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:375)
    at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:287)
    at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:556)
    at org.jboss.weld.bootstrap.Validator.validateInterceptors(Validator.java:529)
    at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:478)
    at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:481)
    at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
    at com.apusic.aas.weld.WeldDeployer.event(WeldDeployer.java:206)
    ... 6 more

解决方案:

先通过取消勾选CDI部署方式,还是无法部署

通过研发同事调试,在ApusicAS/aas/modules目录下放入附件的aas-weld-integration.jar包,重启中间件