• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate3 and spring problem.

 
Bjorn Stove
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi! Just dont get it!
Cant get it to work! What am I missing.
Please help me out.

My applicationContext.xml



And my BWReference.hbm.xlm



Then some code just to test..


I also get the entity "BWReference" when I check:
final String entityName = classMetadata.getEntityName();

And output gives me following...



Thankfull for any hint.
/Bjorn
 
Stevi Deter
Ranch Hand
Posts: 265
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bjorn,

The exception message is Hibernate telling you it cannot find a mapping for the BWReference class. Which would indicate there's an issue with where Spring is trying to find the mappingResources you've configured.

I suspect your problem is in the syntax you used for the value of the hbm.xml file. Try removing the leading "/":
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds almost exactly as

http://www.coderanch.com/t/218323/ORM/java/ClassNotFound-Compass-Spring

I know you aren't using COmpass, but it looks like the same exception. See my reply there.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic