• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with: org.hibernate.mappingException: Unknown entity: Person

 
Anna Udawska
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, I wanted to point out that I was looking for solutions to my problem in Google and here - but I wasn't able to find it, so I decided to write this post. (I have spend already many hours on this, and I am sooo angry...)

Here is my problem, I am trying to connect my Spring+Hibernate application with derby, but when I run tests (JUnit) I get this error:


And here are some improtant parts of code:

Class Person


Person.hbm.xml (in this same package as the class)


dao-context.xml


JUnit Test

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you running the tests? How is the classpath set?
 
Anna Udawska
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run this program in NetBeans. I test it in 'normal' way: Right click on the project -> test.


I have changed code in sessionFactory to this:



But now the test is throwing:


The strange thing is that, when I am not using this test file, and when I try to run this application, everything is working just fine (Netbeans doesn't throw any exception about this file, so it sees it)

Help...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic