3 Replies Latest reply on Oct 10, 2008 10:57 AM by sachin.parnami

    Ejb3 + Hypersonic

    despontao

      Dear all,
      when I do some modifications on my ejb3 classes, every time I deploy the new version I completely lost all my data in Hypersonic, although I don't clean anything.
      At the moment, my ejb3 classes auto-generate the db schema.

      What is my error? How can I solve this situation?

        • 1. Re: Ejb3 + Hypersonic
          peterj

          What is the setting for the hibernate.hbm2ddl.auto property in your persistence.xml file?

          • 2. Re: Ejb3 + Hypersonic
            despontao

            Hi Peter,
            here below my persistence file :

            <?xml version="1.0" encoding="UTF-8"?>
            <persistence>
             <persistence-unit name="duckbrain">
             <jta-data-source>java:/DefaultDS</jta-data-source>
             <properties>
             <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
             </properties>
             </persistence-unit>
            </persistence>



            • 3. Re: Ejb3 + Hypersonic

              Hi,

              I think you can give this a try

              <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
              


              Change it to
              <property name="hibernate.hbm2ddl.auto" value="create"/>
              

              OR
              <property name="hibernate.hbm2ddl.auto" value="update"/>
              


              Regards,
              Sachin Parnami