2 Replies Latest reply on Sep 7, 2005 12:32 AM by Chris Malan

    Tables re-created with every server start-up

    Chris Malan Novice

      Finally everything works with the Articles/Author example in MySQL.
      Tables are created and entries persisted, but on restarting the server the table is empty again. No doubt the SQL code generated to create the tables check for table existence (if exists), drops them if they exist and recreates them.

      I used "create" in the relevant line in persistence.xml

      This is of course a serious problem. No-one wants to lose data. Yes, they should have backed up, but still...

      Any idea on how to fix this, or is it up to the Hibernate people to fix?

      Trying to put the table pojos into a .par archive (with the persistence.xml in META-INF), the session beans in the .ejb3 archive, the web stuff in the war archive and everything into an ear, does not work. I get a nullpointer exception telling me the factory for the session bean should not be null.

      However, putting the pojos and the session beans in an .ejb3 archive and everything else as described above in an ear, everything works fine.

      I have one project I would like to do in ejb3 already, and four others on the horizon. How long before a production-ready 4.0.3 is out and things are in a stable enough state with ejb3?