-
1. Re: when breakpoint @In attribute requires non-null value: myBean.entityManager
jones.kong83.gmail.com Aug 1, 2011 2:22 PM (in response to jones.kong83.gmail.com)Ok, it seems not the entityManager in my bean is the problem, i split up the statement, and i think that the error is not because of my bean. (thats how i configured it)
@In protected EntityManager entityManager;
<persistence:managed-persistence-context auto-create="true" entity-manager-factory="#{projectEntityManagerFactory}" name="entityManager" persistence-unit-jndi-name="java:/projectEntityManagerFactory"/> <persistence:entity-manager-factory name="projectEntityManagerFactory" persistence-unit-name="project"/>
On the first run, i get no exception.
After setting some parameter (that shouldn't be a problem)
When i break at some sysouts at the begin of the message no exception there, when i step forward the first line triggering the exception is
Component.getInstance("projectHome") but when i set the break point in the middle of the method somewhere, no exception is thrown until i do the first step.Is there a possibility that the entityManager is unset by something?
-
2. Re: when breakpoint @In attribute requires non-null value: myBean.entityManager
jones.kong83.gmail.com Aug 1, 2011 3:18 PM (in response to jones.kong83.gmail.com)ok, it seems that it was due to concurrent requests. I had in a form a request 2 sec after typing and on enter. And the second one in the same conversation triggered the exception i think.
one time i got a concurrent access timeout exception. Thats also the reason of the 10 seconds wait until the exception dropped, because of timeout. Don't know why i got the inject entity error most of the time.