gpt4 book ai didi

jsf - 警告 : Parameter 1 of type List> 来自 public void org.omnifaces.cdi.eager.EagerBeansRepository.setXxx 不可解析为具体类型

转载 作者:行者123 更新时间:2023-12-04 06:59:40 24 4
gpt4 key购买 nike

我正在使用 Omnifaces 1.8.1,每当我将应用程序部署到 Glassfish 时,我都会收到以下警告,这会导致部署过程出现一些延迟。

Warning:   WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultHttpSessionListener. It will not be possible to produce instances of this type!
Warning: WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultServletContextListener. It will not be possible to produce instances of this type!
Warning: WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.eventlistener.DefaultServletRequestListener. It will not be possible to produce instances of this type!
Warning: WELD-001519 An InjectionTarget implementation is created for an abstract class org.omnifaces.filter.HttpFilter. It will not be possible to produce instances of this type!

Warning: The following warnings have been detected:

WARNING: Parameter 1 of type java.util.List<javax.enterprise.inject.spi.Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setApplicationScopedBeans(java.util.List<javax.enterprise.inject.spi.Bean<?>>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setRequestScopedBeansViewId(java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setRequestScopedBeansRequestURI(java.util.Map<java.lang.String, java.util.List<javax.enterprise.inject.spi.Bean<?>>>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type java.util.List<javax.enterprise.inject.spi.Bean<?>> from public void org.omnifaces.cdi.eager.EagerBeansRepository.setSessionScopedBeans(java.util.List<javax.enterprise.inject.spi.Bean<?>>) is not resolvable to a concrete type.

我已经升级到 Omnifaces 2.0 并且仍然收到相同的警告,这在经常应用部署的开发过程中非常烦人。是什么导致了这些警告?

PS:开发环境:
  • Glassfish 4.1
  • Java 8
  • JSF 2.2.0 (Mojarra)
  • Primefaces 4.0
  • 网 bean 8
  • 最佳答案

    这是特定于 Weld 的。这些警告是无辜的,实际上并不会显着延迟部署。

    至于无法解析的参数警告,CDI 确实不支持带有通配符参数化参数的代理方法,例如 List<?>。 .然而,这些警告的烦恼是可以理解的。由于这些方法无论如何都是包私有(private)的,我已经按照 this commit 进行了缩减。可见性,以便 Weld 不会尝试检查它们。修复程序在 OmniFaces 2.1 SNAPSHOT 中可用.

    至于抽象类上的 WELD-001519 警告,这确实是完全没有必要的。这已经是 fixed在 Weld 2.1.1/2.2.0 中。另见重复问题:WELD-001519 An InjectionTarget implementation is created for an abstract class 'xxx'. It will not be possible to produce instances of this type .

    关于jsf - 警告 : Parameter 1 of type List<Bean<? >> 来自 public void org.omnifaces.cdi.eager.EagerBeansRepository.setXxx 不可解析为具体类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29249204/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com