我正在以下环境中运行应用程序。
- GlassFish 服务器 4.0
- 莫贾拉2.2.4
- PrimeFaces 4.0 最终版
- PrimeFaces 扩展 1.1.0
- OmniFaces 1.6.3
添加OmniFaces后,服务器终端上出现以下警告。
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.filter.HttpFilter. It will not be possible to produce instances of this type!
//WARNING: Class 'javax.ejb.PostActivate' not found, interception based on it is not enabled
//WARNING: Class 'javax.ejb.PrePassivate' not found, interception based on it is not enabled
INFO: Initializing Mojarra 2.2.4 ( 20131003-1354 https://svn.java.net/svn/mojarra~svn/tags/2.2.4@12574) for context '/Project-war'
WARNING: WELD-001529 An InjectionTarget implementation is created for a class org.omnifaces.application.OmniApplicationFactory which does not have any appropriate constructor.
WARNING: WELD-001529 An InjectionTarget implementation is created for a class org.primefaces.context.PrimeFacesContextFactory which does not have any appropriate constructor.
WARNING: WELD-001529 An InjectionTarget implementation is created for a class org.omnifaces.context.OmniPartialViewContextFactory which does not have any appropriate constructor.
WARNING: WELD-001529 An InjectionTarget implementation is created for a class org.primefaces.context.PrimePartialViewContextFactory which does not have any appropriate constructor.
INFO: Running on PrimeFaces 4.0
INFO: Running on PrimeFaces Extensions null
INFO: Using OmniFaces version null
INFO: Loading application [Project#Project-war.war] at [Project-war]
INFO: Project was successfully deployed in 22,734 milliseconds.
OmniFaces 在给定环境中是否存在任何问题?
不,这些只是警告,而不是错误。 Weld 无法为抽象类或没有默认构造函数的类创建注入目标。注入目标需要能够做到Class.forName(className).newInstance()
没有任何麻烦。
这种伐木干扰已被报告为焊接问题 1547自 Weld 2.1.1 / 2.2.0 起,警告级别已降至调试级别。
应该注意的是,还有另一个错误,很可能与 GlassFish 类加载有关。 OmniFaces 有一个VetoAnnotatedTypeExtension这应该排除所有这些 OmniFaces 类,以免不必要地被扫描为 CDI 托管 bean。在 Tomcat 7 和 JBoss 6/7/8 中使用 Weld 时效果很好。 IE。对于 OmniFaces 类,这些警告根本不会出现。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)