Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Portlet stops showing because of previous wrong import in init.jsp
I am working with liferay-dxp-7.1.10-ga1\tomcat-9.0.6. I added the following imports in the init.jsp by mistake.
<%@ page import="com.liferay.docs.guestbook.model.Guestbook" %>
<%@ page import="com.liferay.docs.guestbook.service.EntryLocalServiceUtil" %>
<%@ page import="com.liferay.docs.guestbook.service.GuestbookLocalServiceUtil" %>
<%@ page import="com.liferay.docs.guestbook.model.Entry" %>
Then the portlet stopped showing. The error messages were:
Import-Package: com.liferay.docs.guestbook.service.permission
After I removed those imports, the portlet still did not show and I saw the same error messages. I could not work in that portlet anymore.
Does anybody know how to fix this?
<%@ page import="com.liferay.docs.guestbook.model.Guestbook" %>
<%@ page import="com.liferay.docs.guestbook.service.EntryLocalServiceUtil" %>
<%@ page import="com.liferay.docs.guestbook.service.GuestbookLocalServiceUtil" %>
<%@ page import="com.liferay.docs.guestbook.model.Entry" %>
Then the portlet stopped showing. The error messages were:
Import-Package: com.liferay.docs.guestbook.service.permission
After I removed those imports, the portlet still did not show and I saw the same error messages. I could not work in that portlet anymore.
Does anybody know how to fix this?
Robert Chen
After I removed those imports, the portlet still did not show and I saw the same error messages. I could not work in that portlet anymore.
Does anybody know how to fix this?
It's probably caching the generated .java file from the JSP servlet inside of the scratch directory ${LIFERAY_HOME}/work. You can try manually deleting the folder for your module from that scratch directory and then restarting the bundle. If that doesn't work, you might have to restart the whole bundle.