4 Replies Latest reply on Dec 14, 2001 4:35 PM by yilin

    Entity Bean bug

    yilin

      Is this the right forum to report JBoss EJB bugs?
      I have an entity bean with its own primary key class. If I remove such an entity bean, then create another bean with the same primary key, then remove it again, the second remove will fail (JBoss throws exception about "cannot remove Null"). It seems that JBoss reuses the removed bean if the new bean has the same primary key, but the reused bean is not fully re-initialized, therefore the remove() causes JBoss to think that bean has some kind of Null identity.

        • 1. Re: Entity Bean bug
          marc.fleury

          Old versions of JBoss would reuse wrappers on teh server new ones don't so try a new version (and also try to not waste our time by not including your version number :()

          marcf

          • 2. Re: Entity Bean bug
            jimboj

            Also you might want to check out this workaround posted on the EJB forum

            Creating and removing entity beans Posted: Nov 19, 2001 9:51 AM

            • 3. Re: Entity Bean bug
              sandythorne

              See "Creating and removing entity beans" posted on 19th November - this is the same problem.

              It's caused by reusing the same bean that was just deleted but the reused bean does not have the primary key set in the context.

              • 4. Re: Entity Bean bug
                yilin

                Sorry that I forgot to include the version for this bug. I use JBoss 2.4.3
                I don't quite follow the work-around in the Nov. 19 posting - yes, I can try getting the primary key object from context in ejbRemove(), but what to do after that to make the remove successful?