• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Instantiating abstract class - Spring in Action 2nd Edition

 
Ranch Hand
Posts: 270
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am reading Spring in Action 2nd Edition book.

The concept of method getter injection is explained like below:[page number:84]




Here the Instrumentalist class is abstract and author(craig walls) has managed to create object like below:



I am getting an exception when doing the same:

Any point to note here? Can some one throw light on this?

 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which exception ? You need CGLIB. Did you put CGLIB in your classpath ? And where did you declare the "guitar" bean ?
 
Karnati Sudhakar
Ranch Hand
Posts: 270
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:Which exception ? You need CGLIB. Did you put CGLIB in your classpath ? And where did you declare the "guitar" bean ?



Cool..It is working..

Actually i am attending Spring sessions and i was taught that we cannot do that way..[because bean will become abstract and instantiating is not possible]

Just wanted to try this..

Thanks Chris for your help..
 
It was the best of times. It was the worst of times. It was a tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic