Error trying to run JSF application

Asked

Viewed 48 times

0

Guys I’m starting to study Jboss, Maven, etc. However when I run a page I created for tests this error appears:

Could not find backup for factory javax.faces.context.FacesContextFactory

In my project I have a directory called Maven Dependencies and inside it is the . jar javax.faces-api-2. 2.jar Does anyone know what it can be? Thank you

  • 1

    First of all, if you are in Jboss, you cannot bundle with your JSF application because it is already available within the Jboss itself. In Maven, set JSF to <Scope>provided</Scope>, restart your application, and tell if the error remains the same. It would also be good if you edit the question and put your faces-config.xml, pom.xml and web.xml.

  • That’s right, I put the <Scope>provided</Scope> and it worked. Post this comment as an answer so that I mark as a solution

1 answer

2


If you are in Jboss, you cannot pack any jar related to JSF with your application because it is already available inside the Jboss itself (See this link available resources within a JEE 6 container). On Maven, set JSF to provided:

<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>2.2.0</version>
    <scope>provided</scope>
</dependency>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.