Lev, I don't see this issue though I use "update" not "create-drop".
If the tables are dropped via a Test case that I run or through the command line or whatever they are ALL re-created on table read. In fact, the way our app is engineered right now once the App Server is fired up we send an "init" query through the system that simply reads a bunch of objects via their respective DAO's and loads them into optimized caches... if the tables had been deleted they are automagically reconstructed. Now, because we have multiple persistent units - we are using a global DB as well as shards - we had to specify the specific fully qualified class names in the persistence.xml that belong to each unit and as we add tables we need to add to that. Perhaps that makes a difference...??? As far as your exception is concerned its impossible to even begin to diagnose the issue without the full stack trace... 1 line isn't sufficient. However, I suspect your real issue is something else related to your configuration, I would guess a class or something... . Post the full trace for further help. --Nikolaos Lev wrote: > hi, > i'm using <property name="hibernate.hbm2ddl.auto" value="create-drop"/>. > > from my understanding (and playing around with small examples), > the tables are dropped and re-created at the beginning of the > deployment. > > however, it appears that that the table(s) must exist in the DB prior > to deployment. if not, it is possible that the following exception will > occur: > > javax.persistence.PersistenceException: > org.hibernate.exception.SQLGrammarException: could not execute query > > this exception occurs when the table in question does not exist > prior to deployment AND i attempt to dao.read() entries from the > table. > > however, if i first execute a dao.save(object) prior to the dao.read(), > it appears that the table is created without a problem. > > i would have thought that the table creation would occur automagically. > is there a way for me to trigger the table creation without a > dao.save(obj) call? > > thank you for your help. > > ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users