exception EJB is already associated with an incomplete transaction

核能气质少年 提交于 2019-12-11 16:33:41

问题


when I invoke list page I get this error ,also program running but some progresses arent working and redirect debug page ,I couldnt fix it ,anybody know this error,what does it mean

INFO: EJB5018: An exception was thrown during an ejb invocation on [EjbSynchronizations] INFO: javax.ejb.EJBException: nested exception is: java.lang.IllegalStateException: EJB is already associated with an incomplete transaction java.lang.IllegalStateException: EJB is already associated with an incomplete transaction com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) //lots of useless error info


回答1:


The error means that two threads are attempting to call the same stateful session bean instance. A stateful session bean instance can only be associated with a single transaction (which are per thread) at a time. Without more information, it's impossible to know what is wrong with the application to make this happen. One possibility is that the application injects a stateful session bean into a servlet, so all requests on all threads are attempting to use the same instance. Either each request should create its own instance of the bean, or the bean should actually be stateless.



来源:https://stackoverflow.com/questions/4385731/exception-ejb-is-already-associated-with-an-incomplete-transaction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!