This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes referencedColumnNames .. no mapping to a single property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "referencedColumnNames .. no mapping to a single property" Watch "referencedColumnNames .. no mapping to a single property" New topic

referencedColumnNames .. no mapping to a single property

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
With hibernate 3.5 and Netbeans 7.2, I built an EAR project using the following database relationship

Article (1) to (m) ArticleDesc
Article (1) to (m) ArticlePointForm

When I deploy the ear project, Jboss thorwn the following error:

01:13:20,965 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-7) Creating Service {http://articledesc.service.Product/}ArticleDescServiceImplService from class Product.service.articledesc.ArticleDescService
01:13:21,056 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-7) Setting the server's publish address to be http://localhost:8080/Product-ws-web/ArticleDescServices
01:13:21,078 INFO [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-7) WSDL published to: file:/usr/local/users/jboss/jboss711Final/standalone/data/wsdl/Product-ws-ear-1.0.ear/Product-ws-web-1.0.war/ArticleDescServiceImplService.wsdl
01:13:21,077 ERROR [] (MSC service thread 1-4) MSC00001: Failed to start service jboss.persistenceunit."Product-ws-ear-1.0.ear/Product-ws-ejb-1.0.jar#ProductPU": org.jboss.msc.service.StartException in service jboss.persistenceunit."Product-ws-ear-1.0.ear/Product-ws-ejb-1.0.jar#ProductPU": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$ [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask( [rt.jar:1.6.0_07]
at java.util.concurrent.ThreadPoolExecutor$ [rt.jar:1.6.0_07]
at [rt.jar:1.6.0_07]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProductPU] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService( [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$ [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
Caused by: org.hibernate.AnnotationException: referencedColumnNames(article_id) of Product.entity.ArticleDesc.productArticle referencing Product.entity.ProductArticle not mapped to a single property
at org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(
at org.hibernate.cfg.Configuration.processEndOfQueue(
at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(
at org.hibernate.cfg.Configuration.secondPassCompile(
at org.hibernate.cfg.Configuration.buildSessionFactory(
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
... 9 more

Here is class:

and class:

What is wrong with the mapping?
Any suggestion is very appreciated
Consider Paul's rocket mass heater.
subject: referencedColumnNames .. no mapping to a single property
Similar Threads
Jboss 7 Datasource configured correctly...But unable to connect
org.hibernate.HibernateException: Specified JDBC Driver not found
No bean named 'springSecurityFilterChain' is defined
Can't map to target entity property
JBOSS 7 AS EAR error