0

I am trying to deploy an EAR which is having only one webapp (PartyWeb). This webapp has myfaces-api-2.0.1 and myfaces-impl-2.0.1 jars inside its WEB-INF/lib folder. I am using Weblogic 12c as my AS.
Although I am not an expert in Weblogic, but I think weblogic comes bundled with its own JSF implementations. So, this may cause some issues.

After some googleing, I came to know that by using prefer-application-resources and prefer-application-packages in weblogic-application.xml, we can force weblogic to load my application provided jsf classes. Although even after doing this I am experiencing the below issue,

Jul 14, 2014 6:22:40 PM GMT+05:30> <Error> <javax.faces> <BEA-000000> <Application was not properly initialized at startup, could not find Factory: 

javax.faces.applica tion.ApplicationFactory. Attempting to find backup.> <Jul 14, 2014 6:22:40 PM GMT+05:30> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.webapp.StartupServletContextListener failed: 

java.lang.Illeg alStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. . java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
        at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131)
        at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:180)
        at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1463)
        Truncated. see log file for complete stacktrace
> Jul 14, 2014 6:22:40 PM GMT+05:30> <Error> <javax.faces> <BEA-000000> <Application was not properly initialized at startup, could not find Factory: 

javax.faces.context .FacesContextFactory. Attempting to find backup.> <Jul 14, 2014 6:22:40 PM GMT+05:30> <Error> <HTTP> <BEA-101216> <Servlet: "Faces Servlet" failed to preload on startup in Web application: "PartyWeb". java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory.
        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:299)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
        Truncated. see log file for complete stacktrace
> <Jul 14, 2014 6:22:40 PM GMT+05:30> <Error> <javax.faces> <BEA-000000> <Application was not properly initialized at startup, could not find Factory: 

javax.faces.applica tion.ApplicationFactory. Attempting to find backup.> <Jul 14, 2014 6:22:40 PM GMT+05:30> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.webapp.StartupServletContextListener failed: 

java.lang.Illeg alStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. . java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
        at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131)
        at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:180)
        at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1463)
        Truncated. see log file for complete stacktrace

I have already spent a week on this. Need a quick resolution on this.
Please any kind of help will be appreciated.
Thanks,
Avijit

Avijit
  • 57
  • 5
  • possible duplicate of [Exception: could not find Factory: javax.faces.context.FacesContextFactory](http://stackoverflow.com/questions/5259145/exception-could-not-find-factory-javax-faces-context-facescontextfactory) – kolossus Jul 16 '14 at 02:38
  • @kolossus , Thanks for the reference, but this describes the problem statement in JBoss world and I am looking for a solution in Weblogic world. If you please find something for Weblogic that will help me a lot. – Avijit Jul 16 '14 at 12:10
  • It's still the same concept. Try http://stackoverflow.com/q/21040515/1530938. Bottom line is that, you have a a bit of a mess regarding the JSF jars on your classpath – kolossus Jul 17 '14 at 18:54
  • Ok thanks kolossus. Issue is now resolved. I replaced the myfaces jars with 2.1.15 version and it worked. – Avijit Jul 21 '14 at 08:52

0 Answers0