-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Configure Hibernate Perspective with Dependency Projects
PostPosted: Thu Feb 11, 2010 9:12 am 
Newbie

Joined: Thu Feb 11, 2010 8:49 am
Posts: 2
Hi Folks!!
How are you?

I have a question and maybe someone can help me with this =]
I've already configurated my Hibernate perspective and it has worked perfect, but since that I migrated my project and created a core (common to all projects), the developers could not configure the Hibernate perspective to execute HQL query's, because the principal project has dependencies, like the core for exemple, and it is mapped with Entities that exists only on the dependencies, so he throws me an error like that :

"@ManyToOne on com.entity.X references and unknown entity: com.entity.Y"

But these entities exists in the core, i did add the core project in the classpath of the configuration, but didn't solve the problem.. the error still the same.

Any idea?

Thanks

Daniel

_________________
Never consider your studies as an obligation but as an enviable opportunity to get to know the liberating influence of beauty in the realm of spirit, for your own personal enjoyment and benefit of the community that will belong your future work.


Top
 Profile  
 
 Post subject: Re: Configure Hibernate Perspective with Dependency Projects
PostPosted: Thu Feb 11, 2010 12:48 pm 
Senior
Senior

Joined: Mon Jul 07, 2008 4:35 pm
Posts: 141
Location: Berlin
Hi danielfigueiredoc,

danielfigueiredoc wrote:
How are you?
Fine, thanks!

danielfigueiredoc wrote:
"@ManyToOne on com.entity.X references and unknown entity: com.entity.Y"
This looks very much like your mapping does not work properly. Have you checked the log to see if the entity was actually recognized by Hibernate?

CU
Froestel

_________________
Have you tried turning it off and on again? [Roy]


Top
 Profile  
 
 Post subject: Re: Configure Hibernate Perspective with Dependency Projects
PostPosted: Fri Feb 12, 2010 8:22 am 
Newbie

Joined: Thu Feb 11, 2010 8:49 am
Posts: 2
Thanks for help!

Look, i did solve the problem putting this on persistence.xml and i didn't need to add any projects neither folders or jars in the classpath configuration:

Code:
<jar-file>file:/eclipse-workspace/Core/WEB-INF/class</jar-file>


The funny is that the hibernate could recognize the entity, but only on the seam perspective, where i did add the Core to the classpath of my current project, so it maybe has lost to follow the path.

Daniel

_________________
Never consider your studies as an obligation but as an enviable opportunity to get to know the liberating influence of beauty in the realm of spirit, for your own personal enjoyment and benefit of the community that will belong your future work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.