当文档(行)已插入 MongoDB 集合时,尝试让 EJB 通知我的 XHTML JSF 页面。
由于我之前的问题的答案,让 JSF 2.3 工作:
然而,在将服务器端代码添加到我的 EJB 并尝试将我的 EAR 部署到 WildFly 12.0.0.Final 之后,我得到了 PushContext 的 java.lang.ClassNotFoundException:
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.notifywell.ejb.FoodsCosmeticsMedicinesEJB with ClassLoader ModuleClassLoader for Module "deployment.NOTiFYwell.ear.NOTiFYwellJAR.jar" from Service Module Loader
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: javax.faces.push.PushContext from [Module "deployment.NOTiFYwell.ear.NOTiFYwellJAR.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:199)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more
在 EJB 中使用:
@Inject
@Push
private PushContext push;
包含在:
jboss-jsf-api_2.3_spec-2.3.3.SP1.jar
当我添加@Inject
到@Push
.
WildFly 12 和/或 JSF 2.3 中的 CDI 有任何问题吗?