-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate searches in first place it finds persistence.xml?
PostPosted: Thu Jan 24, 2008 9:50 pm 
Newbie

Joined: Thu Jan 24, 2008 9:38 pm
Posts: 2
I am wondering if anyone has run into this issue, and whether they've found solution or not. I am noticing that if I put META-INF/persistence.xml in src/main/resources (note: src/main/resources also on classpath in Eclipse), when searching for the entities hibernate also searches src/main/resources. It then finds META-INF/persistence.xml, and from there it begins it's entity search. It does not obviously find any classes in src/main/resources, so no mapped entities....

Excerpt from hibernate log:
Code:
DEBUG - Searching mapped entities in jar/par: file:/D:/java/projects/test-project/model/src/main/resources


I get around this currently by storing it in another folder for maven-resource-filtering, and remove it from the classpath. But this seems not the right approach...

Hibernate version:
org.hibernate:hibernate:jar:3.2.3.ga:compile
org.hibernate:hibernate-annotations:jar:3.3.0.ga:compile
org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:compile
org.hibernate:hibernate-entitymanager:jar:3.3.1.ga:compile
org.hibernate:hibernate-tools:jar:3.2.0.beta8:compile
org.hibernate:jtidy:jar:r8-21122004:compile

Mapping documents: autodetection="class"

Name and version of the database you are using: PostgreSQL

Debug level Hibernate log excerpt: DEBUG


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

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.