Forums de discussion

RE: problem in deploying project

Mehdi MMM, modifié il y a 7 années.

problem in deploying project

New Member Envoyer: 1 Date d'inscription: 14/12/16 Publications récentes
Dear Users,
I faced with a problem which I can not solve it. I have created a "Liferay Plugin Project" and developed my personal portlet. In addition, I write some JSP TagLibs which have imported to my view.jsp of portlet. Tag lib files are placed in "WEB-INF/tags" folder of project. At first, project is deployed normally, while some problems are raised in successor deploys. In fact, in this phase, project deploy normally, but when I want to review the result in browser, an exception is introduced(The content of exception is mentioned to the end of this message).
Besides, I find a solution for this problem, but I know that this is not a standard and logical solution. If I delete war file from "liferay\osgi\war", project related file from "liferay\osgi\state\org.eclipse.osgi" folder and <project-name> folder form "liferay\work" folder, the mentioned problem is erased.
Also, I use Liferay 7, Ant builder, Eclipse Mars X64, Java 8 x64 and win 7 X64.
Could you please help me to solve this problem?
Thanks in advance.

ERROR [http-nio-8080-exec-4][PortletRequestDispatcherImpl:261] org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP__PWC6197: An error occurred at line: 6 in the jsp file: /html/reportViewer/reportDefinition/view.jsp_PWC6199: Generated servlet error:_package org.apache.jsp.tag.web.base does not exist__PWC6197: An error occurred at line: 6 in the jsp file: /html/reportViewer/reportDefinition/view.jsp_PWC6199: Generated servlet error:_package org.apache.jsp.tag.web.base does not exist__ [Sanitized]
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP__PWC6197: An error occurred at line: 6 in the jsp file: /html/reportViewer/reportDefinition/view.jsp_PWC6199: Generated servlet error:_package org.apache.jsp.tag.web.base does not exist__PWC6197: An error occurred at line: 6 in the jsp file: /html/reportViewer/reportDefinition/view.jsp_PWC6199: Generated servlet error:_package org.apache.jsp.tag.web.base does not exist__ [Sanitized]
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:399)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.service(JspServlet.java:410)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.JspServletWrapper.service(JspServletWrapper.java:70)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:50)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
at com.liferay.portal.osgi.web.wab.extender.internal.adapter.FilterExceptionAdapter.doFilter(FilterExceptionAdapter.java:46)
at org.eclipse.equinox.http.servlet.internal.registration.FilterRegistration.doFilter(FilterRegistration.java:121)
at org.eclipse.equinox.http.servlet.internal.servlet.FilterChainImpl.doFilter(FilterChainImpl.java:45)
at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:70)
at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:117)
at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:252)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:102)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:556)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.include(MVCPortlet.java:572)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:157)
at org.samfad.base.controller.BaseController.doView(BaseController.java:107)
at org.samfad.report.reportViewer.controller.ReportDefinitionController.doView(ReportDefinitionController.java:70)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:302)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:471)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.render(MVCPortlet.java:291)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:57)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
.
.
.
.
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: problem in deploying project

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Mehdi MMM:
Tag lib files are placed in "WEB-INF/tags" folder of project.


So Liferay actually uses it's own copy of the Jasper JSP compiler for compiling JSP files from OSGi war files. Unfortunately it is not necessarily the best version, just one that works. Another example, JSP compilation will fail if you use Java 8's Lambdas; I traced that one to a reported bug in Jasper that was fixed to allow Lambdas but the fix did not make it into Liferay's version.

I would definitely report this as a bug on issues.liferay.com.

But that won't help you right now. Fortunately you have a solution - just like I removed the Lambda code to leverage legacy working code, you too can discard the use of the unpacked tags in WEB-INF/tags with tag library jar/TLD pair that the container should accept.

Besides, I find a solution for this problem, but I know that this is not a standard and logical solution. If I delete war file from "liferay\osgi\war", project related file from "liferay\osgi\state\org.eclipse.osgi" folder and <project-name> folder form "liferay\work" folder, the mentioned problem is erased.


Deleting the war file is basically undeploying the web app out of OSGi.

Deleting the osgi/state/org.eclipse.osgi folder alone is not a good idea (it's like removing part of your memory that you then have to refill); if you're going to whack the state, just delete the whole osgi/state folder and let Liferay rebuild it at startup (you're not doing this while the container is running, right?).

The $LIFERAY_HOME/work folder is where Liferay's Jasper has the compiled JSP classes. By deleting this folder you force Liferay to recompile your JSP files again.

So your fix basically boils down to removing all traces of the war file so on redeployment Liferay has to recreate it all.
thumbnail
David Bougearel, modifié il y a 7 années.

RE: problem in deploying project

Junior Member Publications: 54 Date d'inscription: 30/06/16 Publications récentes
Hi David,

I'm facing the same issue : https://web.liferay.com/fr/community/forums/-/message_boards/message/88695151 this time with Liferay DXP.
Is there any solution to solve that ? Besides i do not understand what was the alternate solution waiting the fix.

Thanks for your support.

Best regards,
David.