org.hibernate.MappingException: Foreign key (FK6771BFAA1845E8B:CardField [])) must have same number of columns as the referenced primary key (Card [project_id])

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Hibernate JIRA by Pierre Fourès, 1 year ago
Foreign key (FK6771BFAA1845E8B:CardField [])) must have same number of columns as the referenced primary key (Card [project_id])
via Hibernate JIRA by Pierre Fourès, 1 year ago
Foreign key (FK6771BFAA1845E8B:CardField [])) must have same number of columns as the referenced primary key (Card [project_id])
via Hibernate JIRA by Tim Smith, 1 year ago
Foreign key (FK76A5E7CBCC5EDAA3:CLIENT [])) must have same number of columns as the referenced primary key (CLIENTAPPRC98BF18C [OBJECTID])
via Hibernate JIRA by Tim Smith, 1 year ago
Foreign key (FK76A5E7CBCC5EDAA3:CLIENT [])) must have same number of columns as the referenced primary key (CLIENTAPPRC98BF18C [OBJECTID])
via Stack Overflow by user3824049
, 2 years ago
Foreign key (FK6D56043A4415BDB5:student [userrole])) must have same number of columns as the referenced primary key (student_details [VALUE,DESCRIPTION])
via Google Groups by Mafalda, 1 year ago
Foreign key (FK637007E11D64F93:muxes [location_id])) must have same number of columns as the referenced primary key (locations [name,network_name,network_type_id,country_id])
org.hibernate.MappingException: Foreign key (FK6771BFAA1845E8B:CardField [])) must have same number of columns as the referenced primary key (Card [project_id])
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:90)
at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:73)
at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1182)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1089)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:302)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1015)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:751)
at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:350)
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.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:107)
at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:100)
at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:582)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79)
at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:91)
at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:626)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:475)
at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:460)
at org.jboss.ejb3.embedded.EJB3StandaloneBootstrap.scanClasspath(EJB3StandaloneBootstrap.java:291)
at fr.ifis.Main.main(Unknown Source)

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 1 year ago
Once, 5 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.