• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the method addannotatedclass is undefined for the type configuration

 
numan ali
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, would appreciate some help with this, I got a basic configuration nearly completed, but I keep getting the above error, I looked online and it was not much help. Here is my class
Line 14 is where the error occurs. I had set up the project using XML mappings then converted it to annotations.

 
numan ali
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, in the cfg.xml file, in line 2 below, the "sampleDB" DB does not exist, the project will create that for me correct? The Tutorial I am following does not mention I should create it in the DB.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please cut and paste the text of the error exactly. The subject cannot be the actual error message as the case does not match.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Hibernate are you using?
 
numan ali
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had to get a Hibernate3 Jar for the project
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect to use addAnnotatedClass() you need 3.6.
 
numan ali
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, the guy in the tutorial used the hibernate3 jar also
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65342
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can argue, or you can fix the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic