Announcement Announcement Module
Collapse
No announcement yet.
Problem in reading properties of a bean retrieved from ApplicationContext Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem in reading properties of a bean retrieved from ApplicationContext

    Dear Friends,

    I retrieved a bean from the ApplicationContext by using the ApplicationContextAware interface. The bean returned properly but it's properties were not set as expected (all of them were null ). Do you have any clue what might have gone wrong? If you need details about the application kindly read attached description.

    Thanks in advance!

    Sumith

  • #2
    Why are using the ApplicationContextAware interface - why not simply let Spring do the injection - you are using a bridge class (managed by Spring) which delegates the call to the context - why is that?
    The problem seems to be line 57 which I assume it a null Queue Poll- this might happen if you are injecting a bean definition from a different XML file or you are using quartz without the Spring support so the Queue class is created by Quartz itself (w/o any dependency set) and ran as it is - thus resulting in the NPE.

    Comment


    • #3
      Dear Costin,

      I sorted out the problem. It was not something wrong in Spring. I have done a stupid property overriding at a different place of the codeline . Sorry for the noncense trouble to you.

      Thanks for your advice in poor usage of ApplicationContextAware interface. We will consider this improvement in the next upgrade of the application.

      Regards,
      Sumith

      Comment

      Working...
      X