2 Replies Latest reply on Mar 28, 2008 9:34 AM by Marcus Spiegel

    TestNG: em.remove does nothing

    Marcus Spiegel Newbie

      I currently have a stupid simple problem, I almost don't dare to ask. It is about removing a persisted entity from the DB in a TestNG routine.


      The remove-method looks very simple:



      public void removeUser(MyUser user) {
           log.fatal("removeUser");
           em.remove(user);
           log.fatal("DONE removeUser");
           user=null;
      }





      During the test I first create the instance in the DB successfully
      and subsequently remove it again. After this operation I
      search for the record and still find it.


      In order to track down the problem, I enabled TRACE logging and get of course very much logging from JBoss, Seam, Hibernate. But for above method I only get the following:


       [testng] FATAL [com.mytest.UserManagerImpl] removeUser
       [testng] DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.interpolator
       [testng] DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.interpolator
       [testng] DEBUG [org.jboss.seam.Component] done 
       [testng] FATAL [com.mytest.UserManagerImpl] DONE removeUser




      Can anyone give me some hint whats going on or where to investigate further?



      Environment:



      • Seam 2.0.1.GA

      • HSQL (configuration from seam-gen)

      • Java 1.5.0_13