-
1. Re: geam-gen generate-entities error
gaboo Dec 6, 2006 11:47 AM (in response to gaboo)There's an error in the topic title. Editing a post is disabled ?
-
-
3. Re: geam-gen generate-entities error
pmuir Dec 7, 2006 3:48 PM (in response to gaboo)Put a comma between the two @UniqueConstraints. You should also report to the hibernate-tools guys I think as it is an error in the templates.
-
4. Re: geam-gen generate-entities error
maxandersen Dec 9, 2006 7:17 AM (in response to gaboo)yes, this was a bug in the build of hibernatetools used in seamgen. i have fixed it in hibernatetools svn and is about to commit a fixed build to seamgen.
-
5. Re: geam-gen generate-entities error
gaboo Dec 27, 2006 2:52 PM (in response to gaboo)I tried with latest CVS seam version and seam gen did not worked :
20:50:13 gaboo@muadib:~/workspace/jboss-seam$ ./seam setup Buildfile: build.xml BUILD FAILED /home/gaboo/workspace/jboss-seam/seam-gen/build.xml:15: taskdef class org.jboss.seam.tool.PathFilenameTask cannot be found Total time: 0 second
I also tried with seam 1.1GA and replace its hibernate-tools.jar with the one from my CVS checkout : same errors as before.
Any idea on how to get a working fixed version of seam ?
Thank you ! -
6. Re: geam-gen generate-entities error
norman.richards Dec 27, 2006 3:06 PM (in response to gaboo)Try building clean - it is there.
-
7. Re: geam-gen generate-entities error
gaboo Dec 27, 2006 9:22 PM (in response to gaboo)Indeed, it works :)
But, I found another problem, maybe it is configurable :
generate-entities works, but crashes once deployed if there is a column which type is char(X) with X > 1.
It works with X=1.
For example, it works with the above abocc table if I change ty and lb columns to be varchar instead of char. -
8. Re: geam-gen generate-entities error
norman.richards Dec 27, 2006 10:05 PM (in response to gaboo)For database? I tried with mysql. A column of type char(255) mapped was reverse engineered to a String.
If it looks like a hibernate bug, please report it to the hibernate tools team. If it is a seam-gen issue, feel free to open up a JIRA case here. (or post more info so I can) -
9. Re: geam-gen generate-entities error
gaboo Dec 28, 2006 5:32 AM (in response to gaboo)Dunno If it's related to hibernate ot not, maybe. Please tell me if so and I will report the problem to hibernate.
Here is more information : if I have a char(X) column in a mysql table which is reverse engineered using generate-entities (which runs successfully) I get these errors in my jboss as output :11:25:23,740 INFO [SchemaValidator] Running schema validator 11:25:23,740 INFO [SchemaValidator] fetching database metadata 11:25:23,763 INFO [TableMetadata] table found: lrb.abocc 11:25:23,763 INFO [TableMetadata] columns: [dt_bgn_test, dp_rglt_post, dp_use, dt_end_test, nb_div, nb_ren, dt_end, dt_creat, dt_bgn, nb_ofs, tx_tva, mt_ht, dt_modif, ct_pers, ct_ref, ty, lb, ct] 11:25:23,765 WARN [ServiceController] Problem starting service persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698) 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) at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
and then at the end :11:25:26,212 INFO [StartupServletContextListener] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory 11:25:26,250 INFO [EARDeployer] Started J2EE application: file:/home/gaboo/progs/jboss-4.0.5.GA/server/default/deploy/lrbseamtest.ear/ 11:25:26,251 ERROR [URLDeploymentScanner] Incomplete Deployment listing: --- MBeans waiting for other MBeans --- ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest State: FAILED Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) I Depend On: jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: persistence.units:ear=lrbseamtest.ear,unitName=lrbseamtest State: FAILED Reason: javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: ty, expected: varchar(4) I Depend On: jboss.jca:service=DataSourceBinding,name=lrbseamtestDatasource
-
10. Re: geam-gen generate-entities error
gaboo Dec 28, 2006 5:34 AM (in response to gaboo)one more note : I tried with a char(255) and i get the same error.
-
11. Re: geam-gen generate-entities error
maxandersen Dec 28, 2006 7:59 AM (in response to gaboo)report to hibernate tools jira with the (minimal) schema that reproduces the error - thank you.
-
12. Re: geam-gen generate-entities error
norman.richards Dec 28, 2006 8:53 AM (in response to gaboo)In the meantime you can turn schema validation off in your persistence.xml.
-
13. Re: geam-gen generate-entities error
gaboo Dec 29, 2006 9:08 AM (in response to gaboo)It workd if I use
<property name="hibernate.hbm2ddl.auto" value="update"/>
.
Thanks!
Anyway, I'll experiment a bit more and I will probably report this to hibernate.