RE: Nullpointer exception in JSF with primefaces in liferay 7.2

Sudhanshu Kumar Shukla, modified 5 Years ago. Junior Member Posts: 35 Join Date: 8/29/16 Recent Posts
Hi I am creating JSF portlet with primefaces in Liferay 7.2 but i am getting nullpointer exception during deployment(Local).i have used Liferay 7.2 ,JSF 2.2 with primefaces.Below is my pom.xml and stacktrace for reference .pom.xml
<dependencies>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>javax.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>javax.faces-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.2</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.glassfish</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>javax.faces</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.2.19</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.ncrowd</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.ncrowd.api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.ncrowd</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.ncrowd.service</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>com.liferay.faces.bridge.api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>4.1.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.faces.bridge.ext</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>5.0.4</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.faces.bridge.impl</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>4.1.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>javax.portlet</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>portlet-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>log4j</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>log4j</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.2.14</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>com.liferay.osgi.service.tracker.collections</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.osgi</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>org.osgi.core</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>6.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay.portal</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>com.liferay.portal.kernel</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>3.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>javax.servlet</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>servlet-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.5</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>liferay-faces-util</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>4.2.5-ga6</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>com.liferay.message.boards.web</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>3.0.34</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>com.liferay.message.boards.api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>5.2.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>jsf.commentbox</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>jsf.comment.box</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.primefaces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>primefaces</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>6.2</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.atmosphere</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>atmosphere-runtime</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.5.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.atmosphere</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>atmosphere-jersey</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.5.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
<!--         <dependency>
            <groupId>com.liferay.faces</groupId>
            <artifactId>liferay-faces-bridge-impl</artifactId>
            <version>4.2.5-ga6</version>
        </dependency> -->
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<!-- <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2-20</version>
        </dependency> -->
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<!--  <dependency>
              <groupId>org.glassfish.web</groupId>
              <artifactId>el-impl</artifactId>
              <version>2.2</version>
         </dependency>     --> &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>com.sun.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>jsf-impl</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.2.9</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>javax.servlet.jsp</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>jsp-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>2.1</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.ocpsoft.prettytime</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>prettytime</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>4.0.2.Final</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<groupid>org.ocpsoft.prettytime</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<artifactid>prettytime-integration-jsf</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<version>4.0.2.Final</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;</dependencies>

Exception stracktrace
2019-12-18 12:35:49.379 ERROR [Refresh Thread: Equinox Container: 8c49123b-7e26-4a14-ab1f-753d9fa9edda][WabBundleProcessor:229] Catastrophic initialization failure! Shutting down com.ncrowd.scrum.portlet WAB due to: java.lang.NullPointerException
java.lang.RuntimeException: java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:119)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:99)
&nbsp;&nbsp; &nbsp;at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
&nbsp;&nbsp; &nbsp;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
&nbsp;&nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:498)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.registration.ListenerRegistration$EventListenerInvocationHandler.invoke(ListenerRegistration.java:143)
&nbsp;&nbsp; &nbsp;at com.sun.proxy.$Proxy953.contextInitialized(Unknown Source)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddListenerRegistration(ContextController.java:350)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.context.ContextController.addListenerRegistration(ContextController.java:303)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:67)
&nbsp;&nbsp; &nbsp;at org.eclipse.equinox.http.servlet.internal.customizer.ContextListenerTrackerCustomizer.addingService(ContextListenerTrackerCustomizer.java:1)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:943)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:903)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:487)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1004)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initListeners(WabBundleProcessor.java:623)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:216)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:179)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:101)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:114)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:67)
&nbsp;&nbsp; &nbsp;at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.addingBundle(WabFactory.java:49)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
&nbsp;&nbsp; &nbsp;at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.Module.doStart(Module.java:578)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.Module.start(Module.java:449)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:777)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:768)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:538)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:484)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:1028)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1409)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
&nbsp;&nbsp; &nbsp;at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.NullPointerException
&nbsp;&nbsp; &nbsp;at com.liferay.faces.util.product.ProductFactory.getProductInstance(ProductFactory.java:76)
&nbsp;&nbsp; &nbsp;at com.liferay.faces.util.event.internal.UtilDependencyVerifier.verify(UtilDependencyVerifier.java:36)
&nbsp;&nbsp; &nbsp;at com.liferay.faces.util.event.internal.ApplicationStartupListener.processSystemEvent(ApplicationStartupListener.java:82)
&nbsp;&nbsp; &nbsp;at com.liferay.faces.util.event.internal.ApplicationStartupListenerCompat.processEvent(ApplicationStartupListenerCompat.java:44)
&nbsp;&nbsp; &nbsp;at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
&nbsp;&nbsp; &nbsp;at com.sun.faces.application.ApplicationImpl.processListeners(Unknown Source)
&nbsp;&nbsp; &nbsp;at com.sun.faces.application.ApplicationImpl.invokeListenersFor(Unknown Source)
&nbsp;&nbsp; &nbsp;at com.sun.faces.application.ApplicationImpl.publishEvent(Unknown Source)
&nbsp;&nbsp; &nbsp;at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:739)
&nbsp;&nbsp; &nbsp;at com.sun.faces.config.ConfigManager.publishPostConfigEvent(Unknown Source)
&nbsp;&nbsp; &nbsp;... 57 mo

Is Liferay 7.2 has support for JSF portlet with primefaces.
Catastrophic initialization failure! Shutting down com.ncrowd.scrum.portlet WAB due to: java.lang.NullPointerException
is anyone have faced any issue or am i doing something working.Please find the faces-config and web.xml file for reference.Thanks in advance for help.
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Hi Kumar,
I think that the NullPointerException is because you are using an incorrect dependency GroupId/ArtifactId/Version (GAV):
<dependency>
&nbsp;&nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;<artifactid>liferay-faces-util</artifactid>
&nbsp;&nbsp; &nbsp;<version>4.2.5-ga6</version>
</dependency>
Instead you should be using the com.liferay.faces.util-3.2.0.jar dependency. But rather than specifying it explicitly, I think it is better for it to be included transitively since other dependencies like Liferay Faces Bridge require it. In other words, Maven will include it automatically for you.I reorganized your pom.xml dependencies and came up with the following. Note that I think you should remove the Atmosphere dependencies since PrimeFaces no longer supports PrimePush:
<dependencies>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>javax.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>javax.faces-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.2</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.glassfish</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>javax.faces</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.2.19</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>runtime</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.faces.bridge.ext</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>5.0.4</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>runtime</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay.faces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.faces.bridge.impl</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>4.1.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>runtime</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>log4j</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>log4j</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.2.14</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.primefaces</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>primefaces</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>7.0</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.ncrowd</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.ncrowd.api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.ncrowd</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.ncrowd.service</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.osgi.service.tracker.collections</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.osgi</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>org.osgi.core</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>6.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay.portal</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.portal.kernel</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>3.0.0</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>javax.servlet</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>servlet-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.5</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.message.boards.web</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>3.0.34</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>com.liferay</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>com.liferay.message.boards.api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>5.2.3</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>jsf.commentbox</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>jsf.comment.box</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>1.0.0</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.atmosphere</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>atmosphere-runtime</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.5.3</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.atmosphere</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>atmosphere-jersey</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.5.3</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>javax.servlet.jsp</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>jsp-api</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>2.1</version>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<scope>provided</scope>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.ocpsoft.prettytime</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>prettytime</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>4.0.2.Final</version>
&nbsp;&nbsp; &nbsp;</dependency>
&nbsp;&nbsp; &nbsp;<dependency>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<groupid>org.ocpsoft.prettytime</groupid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<artifactid>prettytime-integration-jsf</artifactid>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;<version>4.0.2.Final</version>
&nbsp;&nbsp; &nbsp;</dependency>
</dependencies>
Please give that a try and let me know how it works out.
Kind Regards,
Neil
Sudhanshu Kumar Shukla, modified 5 Years ago. Junior Member Posts: 35 Join Date: 8/29/16 Recent Posts
Thanks Neil I followed your guided steps now no exception but now my bundle is starting state it is not coming on started or installed state.
have you any idea about that?
And once again thanks for quick reply.
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
It's my pleasure to help. Since you are aware of the state of the bundle, I am assuming that you are using the gogo shell. If not, then here is the documentation for how to access it:
https://portal.liferay.dev/docs/7-1/reference/-/knowledge_base/r/using-the-felix-gogo-shell

At the gogo shell prompt, type "lb" in order to list the bundles. Then identify the BundleId for the JSF portlet WAB.
Then type "start <BundleId>" and let me know if there are any errors printed in the portal's console log.
Sudhanshu Kumar Shukla, modified 5 Years ago. Junior Member Posts: 35 Join Date: 8/29/16 Recent Posts
Neil Griffin:

It's my pleasure to help. Since you are aware of the state of the bundle, I am assuming that you are using the gogo shell. If not, then here is the documentation for how to access it:
https://portal.liferay.dev/docs/7-1/reference/-/knowledge_base/r/using-the-felix-gogo-shell

At the gogo shell prompt, type "lb" in order to list the bundles. Then identify the BundleId for the JSF portlet WAB.
Then type "start <BundleId>" and let me know if there are any errors printed in the portal's console log.

Hey Neil Now I am able to deploy and my bundle is starting also.
Thanks for your help.
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
Thanks for letting me know the good results, and thanks for using Liferay Faces emoticon
Sudhanshu Kumar Shukla, modified 5 Years ago. Junior Member Posts: 35 Join Date: 8/29/16 Recent Posts
Now i am able to run the portlet but my service tracker  object is empty it is not able to find the services. can you please help me in this i have tried many approaches but didn't got successBelow is my service tracker code 
public class CounterServiceTracker extends ServiceTracker<counterlocalservice, counterlocalservice>{
&nbsp;&nbsp; &nbsp;public CounterServiceTracker(BundleContext bundleContext) {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;super(bundleContext,CounterLocalService.class,null);
&nbsp;&nbsp; &nbsp;}
}</counterlocalservice,>

Here is my JSF bean class where i am trying to access services

[code]@ManagedBean(name = "sprintBean")
@ViewScoped
public class SprintBean implements Serializable {
[code]public SprintBean() {
[code] &nbsp;&nbsp;&nbsp; &nbsp;Bundle bundle=FrameworkUtil.getBundle(this.getClass());
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;BundleContext bundleContext=bundle.getBundleContext();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;serviceTracker=new CounterServiceTracker(bundleContext);
[code]}
[code]@PostConstruct
&nbsp;&nbsp; &nbsp;public void init() {
&nbsp;    &nbsp;this.sprintMap = new TreeMap&lt;&gt;();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;LOG.info("Service tracker for sprint is : "+serviceTracker.isEmpty());
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(Validator.isNotNull(serviceTracker) &amp;&amp; !serviceTracker.isEmpty()) {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;sprintLocalService=serviceTracker.getService();
[code]&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}}}

        

I am not able to figure put where i am going wrong and thanks for your guidance.
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
I find that the best way to approach these types of problems is to start with something that works, and slowly introduce changes until it breaks. I would recommend that you study (or even start with) the source code for the primefaces-users-portlet demo that we have, and in particular study the usage of the ServiceTracker in UsersBackingBean.java:
https://github.com/liferay/liferay-faces-portal/blob/master/demo/primefaces-users-portlet/src/main/java/com/liferay/faces/demos/bean/UsersBackingBean.java#L109

One thing we hope to change in the future though, is that the @PostConstruct creation of the ServiceTracker would take place in an @ApplicationScoped bean. It's really only something that should happen once in the lifespan of a portlet application. No need to do it upon every request like we do in the demo. But again, I recommend that you start with the demo and see how that works in your environment.
Kind Regards,
Neil
thumbnail
Neil Griffin, modified 5 Years ago. Liferay Legend Posts: 2655 Join Date: 7/27/05 Recent Posts
BTW I recommend that you work with the 3.x branch since that is compatible with Portlet 2.0, JSF 2.2, and Liferay 7.2:
https://github.com/liferay/liferay-faces-portal/tree/3.x
Better yet, you might want to work with the newly-released tag for version 3.0.5:https://github.com/liferay/liferay-faces-portal/tree/3.0.5
Sudhanshu Kumar Shukla, modified 5 Years ago. Junior Member Posts: 35 Join Date: 8/29/16 Recent Posts
It work&#039;s.Thanks for your help Neil.