Foren

error on leaning path

Juan Miguel Beraza, geändert vor 6 Jahren.

error on leaning path

New Member Beiträge: 4 Beitrittsdatum: 06.10.17 Neueste Beiträge
Hello, I'm doing the liferay learning path i'm developing the web app and i'm in the last step of refactoring all together. When i deploy it error appears on the console:

I've done eveything as it says, except on the resources folder, i've created a guestbookportlet except guestbookwebportlet.
I attach all my liferay workspace, thank you!!

com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/liferay/docs/guestbook/model/Guestbook
08:20:21,150 ERROR [http-nio-8080-exec-2][status_jsp:903] com.liferay.portal.kernel.portlet.PortletContainerException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/liferay/docs/guestbook/model/Guestbook
08:20:21,193 ERROR [liferay/monitoring-2][ParallelDestination:55] Unable to process message {destinationName=liferay/monitoring, response=null, responseDestinationName=null, responseId=null, payload=[{displayName=Guestbook, portletId=com_liferay_docs_guestbook_portlet_GuestbookPortlet, requestType=RENDER, {attributes=null, companyId=20116, groupId=20143, description=null, duration=0, name=com_liferay_docs_guestbook_portlet_GuestbookPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=null, stopWatch=0:00:00.332, timeout=0, user=20156}}, {displayName=Product Menu, portletId=com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet, requestType=RENDER, {attributes=null, companyId=20116, groupId=20143, description=null, duration=8, name=com_liferay_product_navigation_product_menu_web_portlet_ProductMenuPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=SUCCESS, stopWatch=0:00:00.008, timeout=0, user=20156}}, {displayName=User Personal Bar, portletId=com_liferay_product_navigation_user_personal_bar_web_portlet_ProductNavigationUserPersonalBarPortlet, requestType=RENDER, {attributes=null, companyId=20116, groupId=20143, description=null, duration=2, name=com_liferay_product_navigation_user_personal_bar_web_portlet_ProductNavigationUserPersonalBarPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=SUCCESS, stopWatch=0:00:00.002, timeout=0, user=20156}}, {displayName=Search, portletId=com_liferay_portal_search_web_portlet_SearchPortlet, requestType=RENDER, {attributes=null, companyId=20116, groupId=20143, description=null, duration=63, name=com_liferay_portal_search_web_portlet_SearchPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=SUCCESS, stopWatch=0:00:00.063, timeout=0, user=20156}}, {displayName=Navigation, portletId=com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet, requestType=RENDER, {attributes=null, companyId=20116, groupId=20143, description=null, duration=14, name=com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet, namespace=com.liferay.monitoring.Portlet, requestStatus=SUCCESS, stopWatch=0:00:00.014, timeout=0, user=20156}}, {referer=http://localhost:8080/, remoteAddr=127.0.0.1, requestURL=http://localhost:8080/c/portal/status.jsp_display, statusCode=500, userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36, {attributes=null, companyId=20116, groupId=20143, description=Portal Request, duration=277, name=/c/portal/status, namespace=com.liferay.monitoring.Portal, requestStatus=SUCCESS, stopWatch=0:00:00.277, timeout=-1, user=20156}}, {referer=http://localhost:8080/, remoteAddr=127.0.0.1, requestURL=, statusCode=500, userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36, {attributes=null, companyId=20116, groupId=20143, description=null, duration=318, name=/c/portal/status, namespace=com.liferay.monitoring.Portal, requestStatus=SUCCESS, stopWatch=0:00:00.318, timeout=-1, user=20156}}, {referer=http://localhost:8080/, remoteAddr=127.0.0.1, requestURL=, statusCode=500, userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36, {attributes=null, companyId=20116, groupId=20143, description=null, duration=456, name=/c/portal/update_layout, namespace=com.liferay.monitoring.Portal, requestStatus=SUCCESS, stopWatch=0:00:00.456, timeout=-1, user=null}}], values={defaultLocale=en_US, companyId=20116, groupId=0, principalName=20156, permissionChecker=com.liferay.portal.kernel.util.TransientValue@14c913c3, siteDefaultLocale=en_US, themeDisplayLocale=en_US}}
com.liferay.portal.kernel.messaging.MessageListenerException: java.lang.NullPointerException
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.liferay.portal.monitoring.internal.statistics.portlet.PortletStatistics.processDataSample(PortletStatistics.java:106)
at com.liferay.portal.monitoring.internal.statistics.portlet.CompanyStatistics.processDataSample(CompanyStatistics.java:209)
at com.liferay.portal.monitoring.internal.statistics.portlet.ServerStatistics.processDataSample(ServerStatistics.java:117)
at com.liferay.portal.monitoring.internal.statistics.portlet.ServerStatistics.processDataSample(ServerStatistics.java:35)
at com.liferay.portal.monitoring.internal.messaging.MonitoringMessageListener.processDataSample(MonitoringMessageListener.java:93)
at com.liferay.portal.monitoring.internal.messaging.MonitoringMessageListener.doReceive(MonitoringMessageListener.java:120)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
... 5 more
thumbnail
Andrew Jardine, geändert vor 6 Jahren.

RE: error on leaning path

Liferay Legend Beiträge: 2416 Beitrittsdatum: 22.12.10 Neueste Beiträge
Hi Juan.

I think I see the issue. In your guestbook-web project, you have a GuestbookPortletKeys class that is referencing ...

public class GuestbookPortletKeys {

	public static final String GUESTBOOK =
	         "com_liferay_docs_guestbook_portlet_GuestbookPortlet";

}


.. but the package name for your portlet is showing --

package com.liferay.docs.guestbook.portlet.portlet;


I removed the second "portlet" package and moved the portlet class up one level, ran a clean and build and redeployed. That made the error go away for me and the guestbook is showing up now.