This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
FacesContext is instantiated and destroyed on each JSF HTTP request. It doesn't linger between requests, and it is only created by the Faces Servlet, so if an Http URL request doesn't get routed through the Faces Servlet, you won't have a FacesContext. That specifically means non-faces servlet requests and page requests made to stand-alone JSPs that aren't JSF JSPs.
Usually, if you're attempting to explicitly access a session inside a JSF managed bean, you're doing something wrong. That's because the JSF bean management framework should probably be injecting what you need instead of coding the bean to be explicitly dependent on running inside JSF.
An IDE is no substitute for an Intelligent Developer.