Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.InstantiationException

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in my spring example animal is abstract class.dos is concrete class.
here is my xml file.


here is the main class.

i cant understand why it gives error when i am going to instatiate a dog class.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is my animal class


here is my dog class

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check you bean definition for 'dog'. The error is apparent.
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is that mena? what is mean by apparent
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no, i need to extend's abstract animal class and make dog concrete class.but what is the erroe.dog class is not abstract.
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't have 'class' attribute for you 'dog' bean definition in bean.xml?
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Vishal Pandya.I nedd to get abstract clas method and nedd to practise inheritance working on spring.
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're Welcome Aruna.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic