2 Replies Latest reply on Aug 1, 2011 3:18 PM by Hong Kong

    when breakpoint @In attribute requires non-null value: myBean.entityManager

    Hong Kong Newbie

      i have a problem when i step through the code with eclipse, without breakpoint no exception occures, but with breakpoints i get the exception when a query is executed. Any idea?


      14:00:48,999 WARN  [ExceptionFilter] exception root cause
      org.jboss.seam.RequiredException: @In attribute requires non-null value: myBean.entityManager



        • 1. Re: when breakpoint @In attribute requires non-null value: myBean.entityManager
          Hong Kong Newbie

          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
            Hong Kong Newbie

            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.