Fórum

6.2 MVCPortlet - JSP fails

thumbnail
Ivano Carrara, modificado 9 Anos atrás.

6.2 MVCPortlet - JSP fails

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
I'm migrating my portlets from 6.1.x to 6.2.1

My portlets are developed as MVCPortlet - the JSP fails and the the User is kick off out because the session is lost.

The runtime environment is below:
- Java 7
- MySQL 5.5
- Liferay Portal 6.2.1 CE

Below my JVM memory settings:

-Xms5632m
-Xmx5632m
-XXemoticonermSize=512m
-XX:MaxPermSize=512m

In the meatime I get the error, the memory situation is as below:

Total Memory: 5,536,481,280 Bytes
Used Memory: 2,577,022,232 Bytes

Below the sequence of the problem:

Due the fact that the first statement in the JSP is the following ...

<aui:fieldset label="do-legend-ditta-in-esame" />


... the error is relative to the "fieldset" tag, as you can see below:

18:57:53,525 ERROR [RuntimePageImpl-2][IncludeTag:129] Current URL null generates exception: File "/html/taglib/aui/fieldset/start.jsp" not found
 javax.servlet.ServletException: File "/html/taglib/aui/fieldset/start.jsp" not found
     at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
     at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
    at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
    at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
    at com.liferay.taglib.util.IncludeTag.doStartTag(IncludeTag.java:123)
    at com.liferay.taglib.aui.base.BaseFieldsetTag.doStartTag(BaseFieldsetTag.java:33)


Then there is the below code:
<liferay-ui:header title="<%= (ditta != null) ? ditta.getCodConto() + &quot; &quot; + ditta.getCodDitta() + &quot; - &quot; + ditta.getRagSociale() + &quot; - &quot; + ditta.getLocalita(): &quot;---&quot; %>" />


... and the error is related to the "header" tag, as you can see below :

8:57:53,525 ERROR [RuntimePageImpl-2][IncludeTag:129] Current URL null generates exception: File "/html/taglib/ui/header/page.jsp" not found
javax.servlet.ServletException: File "/html/taglib/ui/header/page.jsp" not found
    at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:605)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:544)
    at com.liferay.portal.servlet.DirectServletPathRegisterDispatcher.include(DirectServletPathRegisterDispatcher.java:55)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
    at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
    at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
    at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
    at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83)
    at org.apache.jsp.html.DittaScelta.view_jsp._jspService(view_jsp.java:3135)


After a serie of this kind of error, the User is kicked out from the Portal cause the User session is lost:

10:00:25,214 ERROR [RuntimePageImpl-18][IncludeTag:129] Current URL null generates exception: java.lang.IllegalStateException: Page needs a session and none is available
java.lang.IllegalStateException: Page needs a session and none is available
	at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:148)
	at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:125)
	at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:112)
	at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:65)
	at com.liferay.portal.kernel.servlet.JspFactoryWrapper.getPageContext(JspFactoryWrapper.java:63)
	at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:419)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
	at com.liferay.taglib.util.IncludeTag.include(IncludeTag.java:295)
	at com.liferay.taglib.util.IncludeTag.doInclude(IncludeTag.java:192)
	at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:83)
	at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1624)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
	at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
	at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)


thumbnail
Jan Geißler, modificado 9 Anos atrás.

RE: 6.2 MVCPortlet - JSP fails

Liferay Master Postagens: 735 Data de Entrada: 05/07/11 Postagens Recentes
You close the Fieldset right after opening it. I think that is the problem.

<aui:fieldset label="do-legend-ditta-in-esame" />


What you should do is:

<aui:fieldset label="do-legend-ditta-in-esame">
 <here the fields of fieldset>
</here></aui:fieldset>
#
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: 6.2 MVCPortlet - JSP fails

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Jan Geißler:
You close the Fieldset right after opening it. I think that is the problem.

<aui:fieldset label="do-legend-ditta-in-esame" />


What you should do is:

<aui:fieldset label="do-legend-ditta-in-esame">
 <here the fields of fieldset>
</here></aui:fieldset>
#


Thank you Jan...

In some case I use the tag only to separate a zone of the jsp from another zone showing a title to the user

In fact I was using the aui:fieldset tag since many years and until 6.1.x this worked without problems.

Can the use of this crash the JSP ?
What I have to use instead ?

Thank you in advance !
Ivano C.
thumbnail
Ivano Carrara, modificado 9 Anos atrás.

RE: 6.2 MVCPortlet - JSP fails

Expert Postagens: 345 Data de Entrada: 03/07/05 Postagens Recentes
Jan Geißler:
You close the Fieldset right after opening it. I think that is the problem.

<aui:fieldset label="do-legend-ditta-in-esame" />


What you should do is:

<aui:fieldset label="do-legend-ditta-in-esame">
 <here the fields of fieldset>
</here></aui:fieldset>
#


Moreover, I get the error of page not found also after the below code:

<liferay-ui:header title="<%= (ditta != null) ? ditta.getCodConto() + &quot; &quot; + ditta.getCodDitta() + &quot; - &quot; + ditta.getRagSociale() + &quot; - &quot; + ditta.getLocalita(): &quot;---&quot; %>" />


In fact ALL ui and aui tag produces error - Please review my initial post ...
thumbnail
Jan Geißler, modificado 9 Anos atrás.

RE: 6.2 MVCPortlet - JSP fails

Liferay Master Postagens: 735 Data de Entrada: 05/07/11 Postagens Recentes
Did overwrite any teaglib jsps with a hook or something like that? Try replacing the taglib folder with a taglib folder from a fresh install. Maybe something has corrupted your JSP files.
Also there might be a different error in the execution chain. Please try it on a fresh jsp page, maybe in a test portlet.