Click here to Skip to main content
15,885,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following line in my Java code

Java
VisitContext.createVisitContext(...);


The class VisitContext is from javax.faces.component.visit

This line causes an error with following stacktrace

java.lang.IllegalStateException: Could not find backup for factory javax.faces.component.visit.VisitContextFactory.
javax.faces.FactoryFinderInstance copyInjectionProviderFromFacesContext
Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
javax.faces.FactoryFinderInstance logNoFactory
Application was not properly initialized at startup, could not find Factory: javax.faces.component.visit.VisitContextFactory. Attempting to find backup.

I have following JSF dependencies in my POM

XML
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.3.9.SP09</version>

<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.3_spec</artifactId>
<version>3.0.0.SP04</version>


How can I fix this "factory not found" problem? Is this a bug in one of the dependencies?

What I have tried:

I already tried removing or updating the dependencies to a newer version. But then I was getting "Class not found" or other compatibility issues.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900