[jboss-user] [EJB 3.0] - Better debug logging during EJB3/Hibernate automatic DDL and

hermida do-not-reply at jboss.com
Tue Jul 10 07:22:28 EDT 2007


Hi everyone,

I am a new JBoss user and please forgive me if I missed something searching in the forums or in the docs.  I looked for a while and couldn't find info on exactly my problem.  I find ways to increase Hibernate logging once everything is running but not for when I deploy my ear to JBoss.

I have written some enitty bean classes properly annotated with EJB3 annotations.  To deploy and test it I have created an ear and in the persistence.xml set the Hibernate Entity Manager property hibernate.hbm2ddl.auto = create-drop.  In my JBoss app server console I am getting this error during deployment

org.hibernate.MappingException: Foreign key (FK9967C03096D4F603:ALL_EQUIPMENT [EQUIPMENT_IDC])) must have same number of columns as the referenced primary key (EQUIPMENT [GENERIC_PROTOCOL_IDC,GENERIC_EQUIPMENT_IDC])

The error is understandable but it is not enough information to tell me where the source of the error is in my EJB3 entity bean code.  Hibernate shouldn't think that the EQUIPMENT table has a composite primary key with the above columns but I cannot find where it is interpreting this and where the possible error is in my code.

How do I get it to tell me more information?

Thanks for the help,

Leandro


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062374#4062374

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062374



More information about the jboss-user mailing list