Reputation: 2233
I have a working JSF2 application which is usually run on Tomcat6/7. As it now also needs to run on weblogic, I made a few changes to the projectsetup, including the addition of el-impl-2.2.jar into WEB-INF/lib of my war.
I also added to web.xml:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>com.sun.el.ExpressionFactoryImpl</param-value>
</context-param>
The weblogic.xml deployment descriptor contains:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
While all still works perfectly in Tomcat, this setup fails in wls with:
[HTTP:101216]Servlet: "Faces Servlet" failed to preload on startup in Web application: "app.war". java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key severe.no_factory_backup_failed at
java.util.ResourceBundle.getObject(ResourceBundle.java:393) at
java.util.ResourceBundle.getString(ResourceBundle.java:353) at
javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1002) at
javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316) 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) at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57) at
weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94) at
weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82) at
weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:60) at
weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:34) at
weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:638)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:579) at
Has anyone encountered a similar issue before?
Upvotes: 0
Views: 4659
Reputation: 2233
It turns out it was a solution for me to include el-api.jar and el-impl.jar into my project. In addition, I had to specify in weblogic.xml that these packages needed to be loaded from my war first, like this:
<prefer-application-packages>
<package-name>com.sun.el.*</package-name>
<package-name>javax.el.*</package-name>
</prefer-application-packages>
Upvotes: 1
Reputation: 722
I'm not sure if this is the right way to do things. To me it seems, that you are missing the DI bindings for WLS. If you compare the deployable library in wlserver_10.3\common\deployable-libraries\jsf-2.0.war\WEB-INF\lib\ you see what you have to provide in your war to upgrade to JSF2. Most notably the DI binding is missing in your setup.
Give it a try.
Upvotes: 0