在成功安装和使用了我们的一个web应用程序之后,我尝试重新启动应用程序(通过集成解决方案控制台),但结果并不如我所期望的那样。SystemOut.log文件立即被异常淹没。我只想强调最相关的几点:
java.lang.ClassCastException: pt.sibs.epms.persistence.entity.EpmsDebugParameters incompatible with pt.sibs.epms.persistence.entity.EpmsDebugParameters
at pt.sibs.epms.ecc.ApplicationManager.init(ApplicationManager.java:100) ~[classes/:na]
java.lang.IllegalArgumentException: Object: x.EccAudit[ eccAuditPK=x.EccAuditPK[ eventUsername=system, eventTimestamp=Thu Jul 14 17:20:04 BST 2016, eventModule=ECC ] ] is not a known Entity type.
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4229) ~[com.ibm.ws.jpa.eclipselink.jar:na]
CWOWB2001E: A POST_CONSTRUCT lifecycle inteceptor threw an exception: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void pt.sibs.epms.ecc.ThreadPoolManager.init() on pt.sibs.epms.ecc.ThreadPoolManager@7878f48b
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "init" on bean "BeanId(EpmsControlCenter-v2#EpmsControlCenter.war#NotificationEventGenerator, null)". Exception data: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void pt.sibs.epms.ecc.ThreadPoolManager.init() on pt.sibs.epms.ecc.ThreadPoolManager@7878f48b
at org.jboss.weld.injection.producer.DefaultLifecycleCallbackInvoker.invokeMethods(DefaultLifecycleCallbackInvoker.java:100)
CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "fireScheduledEvent". Exception data: javax.ejb.NoSuchEJBException: An error occurred during initialization of singleton session bean EpmsControlCenter-v2#EpmsControlCenter.war#NotificationEventGenerator, resulting in the discarding of the singleton instance.; nested exception is: javax.ejb.EJBException: See nested exception; nested exception is: org.jboss.weld.exceptions.WeldException: WELD-000049: Unable to invoke public void pt.sibs.epms.ecc.ThreadPoolManager.init() on pt.sibs.epms.ecc.ThreadPoolManager@7878f48b
at com.ibm.ejs.container.util.ExceptionUtil.NoSuchEJBException(ExceptionUtil.java:540)
SRVE0293E: [Servlet Error]-[Faces Servlet]: java.lang.IllegalArgumentException: Unknown Entity bean class: class pt.sibs.epms.persistence.entity.EpmsOtherSystemParameters, please verify that this class has been marked with the @Entity annotation.
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.find(EntityManagerImpl.java:718)
应用程序不再工作,我必须重新启动服务器才能使它再次工作。一点也不酷。
有什么想法吗?
编辑#1
这似乎只有在重新部署之后才会发生。
发布于 2016-07-22 13:59:21
您需要在重新部署之后重新启动应用程序,因为CDI不支持动态更新场景。
https://stackoverflow.com/questions/38379776
复制相似问题