Results 1 to 1 of 1

Thread: Error injecting resource in faces-config

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Default Error injecting resource in faces-config

    Why doesn't faces-config.xml seem to inject my beans defined in applicationContext.xml when, I think, I have all the configuration set up correctly and Glassfish indicates that Spring is OK and applicationContext is parsed correctly? El-resolver, listener-class, context-param, etc.
    I have checked out many tutorials on JSF + Spring and seen the exact same pattern with my project, so I'm just wondering what went wrong. I'm using NetBeans 6.5, Spring Framework 2.5, and GlassFish v2.


    Exception Details: javax.el.ELException
    java.lang.NullPointerException

    Possible Source of Error:
    Class Name: javax.el.BeanELResolver
    File Name: BeanELResolver.java

    etc..

    I have resorted to simply using JSF's managed-property to inject a managed-bean, which works well.


    -----


    Actually the bean being injected is a DAO with an @PersistenceContext EntityManager, and it's being injected into a Controller. I think it might actually be injected fine, just the problem with EntityManager, because when I have tried stripping the class off it and used mock data instead, it worked fine. But then I still don't see anything wrong with the way I created the EntityManager, and I have seen many tutorials on JSF + Spring do the exact same thing. Why would this work differently from DAO as a managed-bean injected via managed-property into Controller in JSF?
    Last edited by Cheerswaya; Dec 4th, 2008 at 12:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •