Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Shivam Aggarwal
Portlet has a null portlet bag in liferay when indexer class entry is made
14. August 2012 00:32
Antwort

Shivam Aggarwal

Rang: Junior Member

Nachrichten: 88

Eintrittsdatum: 17. Januar 2012

Neue Beiträge

Portlet has throws null portlet bag error when Indexer-class entry is made to liferay-portlet.xml and BaseIndexer class is extended by portlet.
Jignesh Vachhani
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
14. August 2012 00:35
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 792

Eintrittsdatum: 10. März 2008

Neue Beiträge

Could you please post server error console log here ?
Bart Simpson
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
14. August 2012 00:56
Antwort

Bart Simpson

Rang: Liferay Master

Nachrichten: 524

Eintrittsdatum: 29. August 2011

Neue Beiträge

I have had the same problems before but most of the times it's related to corrupt xml , try and check with some wrong white spaces, line breaks.If it's still there give the complete stack trace here
Shivam Aggarwal
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
14. August 2012 02:05
Antwort

Shivam Aggarwal

Rang: Junior Member

Nachrichten: 88

Eintrittsdatum: 17. Januar 2012

Neue Beiträge

The portlet in question throws this error when deployed

at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:45)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:104)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)
at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:99)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3391)
at org.apache.catalina.loader.WebappLoader.backgroundProcess(WebappLoader.java:426)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1309)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at com.liferay.portal.kernel.search.IndexerRegistryUtil.register(IndexerRegistryUtil.java:41)
at com.liferay.portlet.PortletBagFactory.newIndexer(PortletBagFactory.java:573)
at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:128)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortlet(PortletHotDeployListener.java:456)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:253)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:101)
... 18 more

and when search portlet is used for searching,this error is thrown

09:00:43,252 ERROR [PortletContextFactory:75] Portlet wantportlet_WAR_Wantportlet has a null portlet bag
09:00:43,252 ERROR [IncludeTag:231] Current URL /en_GB/web/guest/home?p_p_id=3&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=3&_3_struts_action=%2Fsearch%2Fsearch generates exception: An exception occurred processing JSP page /html/portlet/search/search.jsp at line 39

36:
37: List<Portlet> portlets = PortletLocalServiceUtil.getPortlets(company.getCompanyId(), includeSystemPortlets, false);
38:
39: portlets = ListUtil.sort(portlets, new PortletTitleComparator(application, locale));
40:
41: Iterator itr = portlets.iterator();
42:


Stacktrace:
09:00:43,252 ERROR [IncludeTag:154] java.lang.NullPointerException
at com.liferay.portlet.PortletContextFactory._create(PortletContextFactory.java:82)
at com.liferay.portlet.PortletContextFactory.create(PortletContextFactory.java:41)
at com.liferay.portlet.PortletConfigFactoryImpl.create(PortletConfigFactoryImpl.java:53)
at com.liferay.portlet.PortletConfigFactoryUtil.create(PortletConfigFactoryUtil.java:31)
at com.liferay.portal.util.PortalImpl.getPortletTitle(PortalImpl.java:2538)
at com.liferay.portal.util.PortalUtil.getPortletTitle(PortalUtil.java:774)
at com.liferay.portal.util.comparator.PortletTitleComparator.compare(PortletTitleComparator.java:52)
at com.liferay.portal.util.comparator.PortletTitleComparator.compare(PortletTitleComparator.java:1)
Chris Kühl
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
4. Januar 2013 05:04
Antwort

Chris Kühl

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 4. Januar 2013

Neue Beiträge

I seem to be having this same issue. Where you able to resolve the problem? If so could you be so kind as to explain how?
Chris Kühl
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
4. Januar 2013 05:34
Antwort

Chris Kühl

Rang: New Member

Nachrichten: 2

Eintrittsdatum: 4. Januar 2013

Neue Beiträge

Seems I'd forgotten to change the null being returned from the getClassNames method that was generated by Eclipse. Now that I'm returning the class names it works.
pooja mahajan
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
1. Februar 2013 01:19
Antwort

pooja mahajan

Rang: Junior Member

Nachrichten: 45

Eintrittsdatum: 29. Januar 2013

Neue Beiträge

Can you please explain...
i am facing same erro r while deploying my application.war on liferay 6.1 + jboss 7

7:43:55,841 INFO (MSC service thread 1-4) 07:43:55,841 ERROR [MSC service thread 1-4][PortletContextFactory:73] Portlet youraccount_WAR_clientportal has a null portlet bag

07:43:55,841 INFO (MSC service thread 1-4) 07:43:55,841 ERROR [MSC service thread 1-4][BasePortalLifecycle:45] java.lang.NullPointerException

07:43:55,841 INFO (MSC service thread 1-4) java.lang.NullPointerException

07:43:55,841 INFO (MSC service thread 1-4) at com.liferay.portlet.PortletContextFactory._create(PortletContextFactory.java:80)

07:43:55,841 INFO (MSC service thread 1-4) at com.liferay.portlet.PortletContextFactory.create(PortletContextFactory.java:39)
Laura Liparulo
RE: Portlet has a null portlet bag in liferay when indexer class entry is m
2. Februar 2013 06:00
Antwort

Laura Liparulo

Rang: Junior Member

Nachrichten: 38

Eintrittsdatum: 30. Juni 2012

Neue Beiträge

I got the same error and I've solved it. in my case it was a bug in the portlet action class, where i was taking a parameter declared as a global variable.
If you invoke it within the metod the "null portlet bag" error is fixed. if you declare and inizialize "archivePath" as a global class variable you get the null portlet bag error.
The right way is this:

public void refreshDatabase(ActionRequest actionRequest,
ActionResponse response) throws Exception {

String archivePath = getInitParameter("archive-folder");
logger.info("Refresh Database clicked");
try {
DBUtil.refreshDatabase(archivePath);
SessionMessages.add(actionRequest, "success-db");
SessionMessages.add(actionRequest, "tables-up");
} catch (Exception e) {
SessionErrors.add(actionRequest, "error-db");
}
}

I hope it helps :-)
enayath ulla
hai i am facing the same error is there any solution for this
1. August 2014 02:44
Antwort

enayath ulla

Rang: Junior Member

Nachrichten: 64

Eintrittsdatum: 15. Juli 2013

Neue Beiträge

09:10:31,642 ERROR [http-bio-8080-exec-15][PortletContextFactory:77] Portlet lmsleadcreationportlet_WAR_lmsportlet has a null portlet bag


i am working with spring mvc ,maven