WELD-001408 Unsatisfied dependencies for type [Validator]

前端 未结 2 1191
孤街浪徒
孤街浪徒 2021-01-13 17:13

I\'m unable to deploy my project after migrating it from Java EE 6 to Java EE 7.

I already have CDI enabled (beans.xml with bean-discovery-mode=\"all\" for backward

2条回答
  •  无人共我
    2021-01-13 17:57

    I'm seeing this as well, plus a very similar problem with Guava 14.0.1.

    The root cause of this seems to be that the default behaviour of CDI changed from 1.0 to 1.1. In 1.0, CDI didn't do anything with an archive unless a beans.xml was present. In 1.1, a missing beans.xml is equivalent to one with bean-discovery-mode=annotated.

    In other words, if you have any libraries in your archive that make use of CDI injection annotations but contain no beans.xml, these will now trigger injection attempts.

提交回复
热议问题