Message Boards

Upgrading to 7.2 - dependency problems with Faces

thumbnail
Clint Wilde, modified 3 Years ago.

Upgrading to 7.2 - dependency problems with Faces

Junior Member Posts: 39 Join Date: 3/5/13 Recent Posts
Hello,

We are upgrading from LR 6.2 to LR 7.2 and have many custom portlets. One of them uses Primefaces, and when we deploy it we get this stack trace. I have a few questions below that are numbered to keep them organized.

2020-06-01 16:29:05.788 ERROR [Refresh Thread: Equinox Container: 7f42304d-fc69-43c3-8628-8c36a85c6156][WabBundleProcessor:244] Catastrophic initialization failure! Shutting down
xxxx-portal-portlet WAB due to: java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:315)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
at jdk.internal.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:143)
at com.sun.proxy.$Proxy460.contextInitialized(Unknown Source)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:67)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:625)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:231)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:159)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:88)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:113)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:66)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:48)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.doStart(Module.java:578)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NullPointerException
at javax.el.CompositeELResolver.add(CompositeELResolver.java:76)
at com.sun.faces.el.DemuxCompositeELResolver.addRootELResolver(DemuxCompositeELResolver.java:142)
at com.sun.faces.el.ELUtils.addEL3_0_Resolvers(ELUtils.java:336)
at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:258)
at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:503)
at com.sun.faces.application.ApplicationImpl.performOneTimeELInitialization(ApplicationImpl.java:1405)
at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:529)
at javax.faces.application.ApplicationWrapper.getELResolver(ApplicationWrapper.java:621)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:256)
... 56 more

I believe this is caused by an invalid dependency version in our pom, specifically related to el.

Here's what we've done so far:
I went to the Liferay Faces page, here: https://faces.liferay.dev/home/-/archetype-portlet/liferay-portal-version/7.2/jsf-version/2.2/component-suite/jsf/build-tool/maven

I plugged in (our environment):

- LR: 7.2
- JSF: 2.2
- Component: PrimeFaces

It generated these dependencies below. Due to some internal restrictions, we are only allowed to use approved versions, so we are using the versions in comments to the side:

<dependencies>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.2</version><!-- we are using 2.3 -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.20</version><!-- we are using 2.3.8 -->
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.ext</artifactId>
<version>5.0.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.impl</artifactId>
<version>4.1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version><!-- we are using 2.7 -->
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>7.0</version>
</dependency>
</dependencies>

----------------------

We have the following OLD dependencies from LR 6.2.

1. For Faces, are these now outdated?

<!-- NOTE: This may no longer be needed -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.20</version>
</dependency>
<!-- NOTE: This may no longer be needed -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.20</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.3.8</version>
<scope>runtime</scope>
</dependency>
<!-- NOTE: This may no longer be needed -->
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.api</artifactId>
<version>4.1.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.ext</artifactId>
<version>5.0.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.bridge.impl</artifactId>
<version>4.1.4</version>
<scope>runtime</scope>
</dependency>
<!-- NOTE: This may no longer be needed -->
<dependency>
<groupId>com.liferay.faces</groupId>
<artifactId>com.liferay.faces.portal</artifactId>
<version>4.0.0</version>
</dependency>

2. Which version of el do we need to support this version of Faces?

<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
</dependency>

3. As a general question, what's the relationship between com.sun.faces and com.liferay.faces? I see com.sun.faces in our pom, but not in the Liferay Faces site at all. However we do have a reference in our code.

Any hints to why I am getting this stack trace is much appreciated.
thumbnail
Neil Griffin, modified 3 Years ago.

RE: Upgrading to 7.2 - dependency problems with Faces

Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Hi Clint,
Thanks so much for reaching out. I'd be happy to help you through this upgrade as best I can.
First, I would direct your attention to the Liferay Faces Version Scheme. Perhaps that will help provide clarity around some of your questions. Although the version scheme doesn't mention it, the liferay-faces-bridge-api master branch (think of it as 6.x) and liferay-faces-bridge-impl master branch target the JSF 2.3 API and Mojarra 2.3. However, the com.liferay.faces.bridge.api-6.0.0.jar and com.liferay.faces.bridge.impl-6.0.0.jar artifacts have not yet been released, which means JSF 2.3 is not yet supported.
The main reason is because we haven't yet finished the work for JSR 378, which is the Portlet 3.0 Bridge for JSF 2.2. Once that work is complete, and the com.liferay.faces.bridge.api-5.0.0.jar and com.liferay.faces.bridge.impl-5.0.0.jar artifacts are released, we will do our best to get the master branch working with JSF 2.3. This will probably be done without doing a Portlet 3.0 Bridge for JSF 2.3 follow-on JSR. In other words, the amount of work to make it work with JSF 2.3 probably doesn't justify a follow-on JSR.
Having said that, support for JSF 2.3 might not happen in 2020 -- it might be 2021 before that happens.
Is it possible for you to use JSF 2.2? That's the only production-ready option we have to support you at this time. If you strictly follow the dependency information found at liferayfaces.org (like you mentioned above) then things should work and we should be able to support you.

Finally, the artifacts that you mentioned as "may no longer be needed" are indeed, not needed:
<!-- NOTE: This may no longer be needed -->
<dependency>
<groupid>com.sun.faces</groupid>
<artifactid>jsf-api</artifactid>
<version>2.2.20</version>
</dependency>
<!-- NOTE: This may no longer be needed -->
<dependency>
<groupid>com.sun.faces</groupid>
<artifactid>jsf-impl</artifactid>
<version>2.2.20</version>
</dependency>


The reason why, is because they are redundant with the following dependencies that you already have specified:
<dependency>
<groupid>javax.faces</groupid>
<artifactid>javax.faces-api</artifactid>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupid>org.glassfish</groupid>
<artifactid>javax.faces</artifactid>
<version>2.2.20</version>
<scope>runtime</scope>
</dependency>


Kind Regards,Neil
thumbnail
Clint Wilde, modified 3 Years ago.

RE: Upgrading to 7.2 - dependency problems with Faces

Junior Member Posts: 39 Join Date: 3/5/13 Recent Posts
Thanks Neil.  We were able to make more progress.However, we are getting this NPE when we deploy:
2020-06-30 14:54:08.931 ERROR [Refresh Thread: Equinox Container: 402a09bd-b355-472a-9a4e-609d3120ea9d][PortletBagFactory:214] java.lang.NullPointerException
java.lang.NullPointerException
        at javax.portlet.faces.GenericFacesPortlet.getBridgeClassName(GenericFacesPortlet.java:193)
        at javax.portlet.faces.GenericFacesPortlet.getBridge(GenericFacesPortlet.java:762)
        at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java:448)
        at com.liferay.portlet.internal.InvokerPortletImpl.init(InvokerPortletImpl.java:248)
        at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.init(MonitoringInvokerPortlet.java:151)
        at com.liferay.portlet.internal.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:278)
        at com.liferay.portlet.internal.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:181)
        at com.liferay.portal.kernel.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:48)
        at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:210)
        at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:108)
        at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:923)
        at jdk.internal.reflect.GeneratedMethodAccessor828.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
        at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
        at com.sun.proxy.$Proxy54.initWAR(Unknown Source)
        at com.liferay.portal.kernel.service.PortletLocalServiceUtil.initWAR(PortletLocalServiceUtil.java:457)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:232)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:97)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:229)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:189)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:179)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:75)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:57)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:55)
        at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:141)
        at com.liferay.portal.kernel.servlet.SecurePluginContextListener.contextInitialized(SecurePluginContextListener.java:152)
        at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
        at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
        at jdk.internal.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:143)
        at com.sun.proxy.$Proxy433.contextInitialized(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:71)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:625)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:231)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:159)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:88)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:113)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:66)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:48)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.doStart(Module.java:578)
        at org.eclipse.osgi.container.Module.start(Module.java:449)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
        at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
2020-06-30 14:54:08.934 ERROR [Refresh Thread: Equinox Container: 402a09bd-b355-472a-9a4e-609d3120ea9d][PortletBagFactory:214] java.lang.NullPointerException
java.lang.NullPointerException
        at javax.portlet.faces.GenericFacesPortlet.getBridgeClassName(GenericFacesPortlet.java:193)
        at javax.portlet.faces.GenericFacesPortlet.getBridge(GenericFacesPortlet.java:762)
        at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java:448)
        at com.liferay.portlet.internal.InvokerPortletImpl.init(InvokerPortletImpl.java:248)
        at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.init(MonitoringInvokerPortlet.java:151)
        at com.liferay.portlet.internal.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:278)
        at com.liferay.portlet.internal.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:181)
        at com.liferay.portal.kernel.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:48)
        at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:210)
        at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:108)
        at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:923)
        at jdk.internal.reflect.GeneratedMethodAccessor828.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.liferay.portal.spring.aop.AopMethodInvocationImpl.proceed(AopMethodInvocationImpl.java:50)
        at com.liferay.portal.spring.aop.AopInvocationHandler.invoke(AopInvocationHandler.java:49)
        at com.sun.proxy.$Proxy54.initWAR(Unknown Source)
        at com.liferay.portal.kernel.service.PortletLocalServiceUtil.initWAR(PortletLocalServiceUtil.java:457)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:232)
        at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:97)
        at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:229)
        at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
        at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:27)
        at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:189)
        at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:179)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:75)
        at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:57)
        at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:55)
        at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:141)
        at com.liferay.portal.kernel.servlet.SecurePluginContextListener.contextInitialized(SecurePluginContextListener.java:152)
        at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
        at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
        at jdk.internal.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:143)
        at com.sun.proxy.$Proxy433.contextInitialized(Unknown Source)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
        at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:71)
        at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:625)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:231)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:159)
        at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:88)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:113)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:66)
        at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:48)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.doStart(Module.java:578)
        at org.eclipse.osgi.container.Module.start(Module.java:449)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
        at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
        at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
        at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
        at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
        at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
        at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Here are the dependencies in our pom file:
<javax.faces.faces-api.version>2.2</javax.faces.faces-api.version>
<org.glassfish.javax.faces.version>2.2.20</org.glassfish.javax.faces.version>
<com.liferay.faces.bridge.ext.version>5.0.5</com.liferay.faces.bridge.ext.version>
<!-- Not needed, but still in our pom - should we remove these? -->
<com.sun.faces.version>2.2.20</com.sun.faces.version>
<com.liferay.faces.bridge.api.version>4.1.0</com.liferay.faces.bridge.api.version>
<com.liferay.faces.portal.version>4.0.0</com.liferay.faces.portal.version>
I looked at the source, here: https://github.com/liferay/liferay-faces-bridge-api/blob/master/bridge-api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
and see this comment above  getBridgeClassName()
/**
* Returns the className of the bridge implementation this portlet uses. Subclasses override to alter the default
* behavior. Default implementation first checks for a portlet context init parameter:
* javax.portlet.faces.BridgeImplClass. If it doesn't exist then it looks for the resource file
* "META-INF/services/javax.portlet.faces.Bridge" using the current threads classloader and extracts the classname
* from the first line in that file.
*
* @return the class name of the Bridge class the GenericFacesPortlet uses. <code>null</code> if it can't be
* determined.
*/
public String getBridgeClassName() {
 So it appears we need to set up the className in a config file.  Unfortunately, I don't know what class name it should have.  Also, can you point me to some documentation that explains how to set that up? 
Thanks,Clint
thumbnail
Neil Griffin, modified 3 Years ago.

RE: Upgrading to 7.2 - dependency problems with Faces

Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Clint Wilde, modified 3 Years ago.

RE: Upgrading to 7.2 - dependency problems with Faces

New Member Posts: 2 Join Date: 9/23/20 Recent Posts
Hi Neil,Do you have an estimated time when JSF 2.3 will be available?  We are  currently upgrading to JSF 2.2, per your recommendations and I wanted to see if you have an updated timeline for releasing 2.3?

Thanks,
Clint