2 Replies Latest reply on Mar 10, 2009 3:13 PM by Marco Santos

    Component.getInstance(): No application context active

    Marco Santos Newbie

      Hello there.


      I'm having some problems instantiating a Seam Component on a class that is not Seam Component. I try to get the seam component with the following code:



      PartnerHandlerBean partnerHandler=(PartnerHandlerBean) Component.getInstance(PartnerHandlerBean.class, true)

      I also tryed with the component name



      PartnerHandlerBean partnerHandler=(PartnerHandlerBean) Component.getInstance("partnerHandler", true)

      But when this line is executed i get the follow execption.



      java.lang.IllegalStateException: No application context active

      Does anyone knows what am i missing, and how to solve it?


      Thanks a lot