Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

hibernate3 and spring problem.

 
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
 
Ranch Hand
Posts: 265
Hibernate Spring Java
  • 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 "/":
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds almost exactly as

https://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
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic