JBoss Problem with Overwrite Database
Question:
Hi i’m having this kind of issue:
I’m using JBOSS AS 4.0.3 and Oracle 10g Express Database. I’m preparing a test applilcation with persistance mechanism in EJB3.
The problem is that whenever I shutdown and run the server, the
database data (tables, rows etc) is overwritten with new ones, so
everything that was inserted into the tables is deleted.
The second issue is that I don’t want Jboss to create the database
each time it gets up - I’d just like to map @Entities to the existing
DB schema.
I’d be grateful for any help.
tzablock.
Answer:
Try to change the create-table in standardjaws.xml and standardjbosssmp-jdbc.xml to false
if it doesn’t work, try to open persistence.properties at
ejb3-deployer\META-INF, deactivate the
hibernate.hbm2ddl.auto=create-drop to
#hibernate.hbm2ddl.auto=create-drop
in my case it works
Sadr LM