i am also facing same problem
your persistency is configured in such a way that it creates and drops the database every time you restart the server. Somewhere in your project directory (normally under the META-INF directory you will find a file persistence.xml which contains the whole setting for your application and some hibernate properties:
... <property name="hibernate.hbm2ddl.generate_ddl" value="true" /> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> ...
If you change create-drop to UPDATE, your database will be saved and its data.
Thanq it's working