-
1. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
norman.richards Nov 2, 2005 4:29 PM (in response to drapierwim)I personally haven't investigated very far, but this appears to be a bug in 4.0.3SP1. My guess is that 4.0.3SP1 includes a version of Hibernate for which import.sql is broken, but I guess only one of the hibernate guys can answer for sure. I've gone back to using 4.0.3 for Seam stuff.
-
2. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
christian.bauer Nov 2, 2005 4:51 PM (in response to drapierwim)Hibernate RC2 has a disabled import.sql, unfortunately. It's fixed in CVS.
-
3. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
norman.richards Nov 2, 2005 5:05 PM (in response to drapierwim)I guess we have to wait for 4.0.3SP2 then. :)
-
4. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
christian.bauer Nov 2, 2005 5:09 PM (in response to drapierwim)Actually, I'm wrong. SP1 contains a Hibernate3 snapshot. Just replace the hibernate3.jar with one built from Hibernate3 CVS -> http://www.hibernate.org/ to got Downloads, follow instructions.
-
5. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
jjarkko Nov 2, 2005 5:36 PM (in response to drapierwim)Not directly related to the subject, but my 2 cents worth about disappearing row contents,
I think there should be no default value for hibernate.hbm2ddl.auto in deploy/ejb3.deployer/META-INF/persistence.properties. I was just wondering what happened to rows of my 18 GB database ;)
Plus i see a problem having hibernate.hbm2ddl.auto=update also because it's just confusing to see your Oracle DATE columns to change to something else (like varchar(10) ).
How about adding hibernate.hbm2ddl.auto=no as one of the choice?
- jarkko -
6. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
jjarkko Nov 2, 2005 5:38 PM (in response to drapierwim)This was with reverse engineered EJB3 POJOs.
-
7. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
gavin.king Nov 2, 2005 6:21 PM (in response to drapierwim)"jarkko@jab.fi" wrote:
Not directly related to the subject, but my 2 cents worth about disappearing row contents,
I think there should be no default value for hibernate.hbm2ddl.auto in deploy/ejb3.deployer/META-INF/persistence.properties. I was just wondering what happened to rows of my 18 GB database ;)
Agreed, this was JBoss EJB3 overriding the sensible default behavior of Hibernate. We already fixed this, i believe. -
8. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
rabbiaqaswar Jan 17, 2007 12:51 AM (in response to drapierwim)hello
i am using JBoss jboss-4.0.5 and as suggested i commented the default value of hibernate.hbm2ddl.auto = create and set it in the persistence.xml file as hibernate.hbm2ddl.auto = update.
My tables already exist in the database. Now when i deploy my application on JBoss with the value of hibernate.hbm2ddl.auto set to 'update' i get the following exception:09:54:18,483 WARN [JDBCExceptionReporter] SQL Error: 1031, SQLState: 42000 09:54:18,483 ERROR [JDBCExceptionReporter] ORA-01031: insufficient privileges 09:54:18,483 ERROR [SchemaUpdate] could not complete schema update org.hibernate.exception.SQLGrammarException: could not get table metadata: CUSTOMERS at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29) at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:100) at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:878) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:688) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)
Please help! -
9. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
gavin.king Jan 17, 2007 1:44 PM (in response to drapierwim)So give your database user the needed permissions. What are you posting here for?
-
10. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
rabbiaqaswar Feb 1, 2007 5:59 AM (in response to drapierwim)User got the permissions, must be some other thing. Solved the issue now.
Anyways there is also another setting which can be useful if your database tables already exist and you dont want to clear your tables everytime the application is redeployed.
Here it is: -
11. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
rabbiaqaswar Feb 1, 2007 6:00 AM (in response to drapierwim) -
12. Re: Deploying in 4.0.3SP1 AS results in empty tables, how to
rabbiaqaswar Feb 1, 2007 6:00 AM (in response to drapierwim)property name="hibernate.hbm2ddl.auto" value="validate"