0

Can anybody tell me why when i declare a managed bean in some additional faces-config, EJB in this bean is not initialized, i.e. it's null without any errors, just null?
web.xml has following lines:

<context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config-navigation.xml, /WEB-INF/faces-config-custom.xml</param-value>
</context-param>

So, when i put my bean in faces-config-custom.xml EJB is not initialized but when i put it to main faces-config.xml everything works fine. Note that managed bean itself works properly: it's seen by the page, its methods are called without problems, but i can't use EJB in it because it's always null.
P.S. i inject EJB with @EJB annotation.

mykola
  • 1,736
  • 5
  • 25
  • 37
  • you might want to add some more forensic information. also, does the EJB in question inject properly in other managed beans? also, what container are you using (maybe known issue with that container?)? – him Jul 27 '12 at 18:45
  • Which application server and version are you using? – Brett Kail Jul 27 '12 at 19:48
  • @him Yes, EJBs are injected properly in other managed beans and in this too, if these managed beans are declared in faces-config.xml, they aren't initialized only when i declare managed bean in some other faces-config (in this example it's faces-config-custom.xml). I'm using weblogic 10.3 – mykola Jul 30 '12 at 14:29

0 Answers0