Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Sam E
Error in jsp execution: exceeding the 65535 bytes limit
18 de octubre de 2009 5:22
Respuesta

Sam E

Ranking: Liferay Master

Mensajes: 660

Fecha de incorporación: 2 de marzo de 2009

Mensajes recientes

Hi,

I dont' kown whether this is memory issue or my jsp file is too large to be delt with by the java compiler.
Here is the error I got when the jsp pages executed:

 1
 223:13:07,401 ERROR [IncludeTag:79] Current URL /web/guest generates exception: Unable to compile class for JSP:
 3
 4An error occurred at line: 417 in the generated java file
 5The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
 6
 7Stacktrace:
 823:13:07,471 ERROR [IncludeTag:165] org.apache.jasper.JasperException: Unable to compile class for JSP:
 9
10An error occurred at line: 417 in the generated java file
11The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
12
13Stacktrace:
14        at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
15        at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
16        at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
17        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
18        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
19        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
20        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
21        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
22        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
23        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
24        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
25        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
26        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
27        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
28        at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
29        at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
30        at com.liferay.taglib.util.IncludeTag.doEndTag(IncludeTag.java:67)
31        at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:3516)
32        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
33        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


My server has only not enough 1GB memory. Is this the problem?

Thanks
Sam
Sam E
RE: Error in jsp execution: exceeding the 65535 bytes limit
19 de octubre de 2009 0:41
Respuesta

Sam E

Ranking: Liferay Master

Mensajes: 660

Fecha de incorporación: 2 de marzo de 2009

Mensajes recientes

Had anyone solved the similar problem?
I would very appreciate for any suggestion and help.

Thanks
Sam
Tarun S. Kayasth
RE: Error in jsp execution: exceeding the 65535 bytes limit
16 de febrero de 2010 5:59
Respuesta

Tarun S. Kayasth

Ranking: Regular Member

Mensajes: 160

Fecha de incorporación: 8 de junio de 2007

Mensajes recientes

Hi Sam,

I am facing same problem. Did you get any solution for it?

Thanks,

Tarun Kayasth
Amos Fong
RE: Error in jsp execution: exceeding the 65535 bytes limit
17 de febrero de 2010 9:38
Respuesta

Amos Fong

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1898

Fecha de incorporación: 7 de octubre de 2008

Mensajes recientes

Hi Guys,

This looks like a bug that was fixed here:

http://issues.liferay.com/browse/LPS-7003

The fix is to change the .jspf file to a .jsp file (and changing some variables).
Tarun S. Kayasth
RE: Error in jsp execution: exceeding the 65535 bytes limit
18 de febrero de 2010 20:29
Respuesta

Tarun S. Kayasth

Ranking: Regular Member

Mensajes: 160

Fecha de incorporación: 8 de junio de 2007

Mensajes recientes

Thanks Amos, will try this...
Kowbathullah Gnaniyar
RE: Error in jsp execution: exceeding the 65535 bytes limit
19 de febrero de 2010 23:15
Respuesta

Kowbathullah Gnaniyar

Ranking: Liferay Master

Mensajes: 608

Fecha de incorporación: 19 de diciembre de 2007

Mensajes recientes

Hi Tarun and Sam,


Hope content size of jsp file is exceeded. just split that jsp file and include one inside another.


- Gnaniyar Zubair
Olaf Kock
RE: Error in jsp execution: exceeding the 65535 bytes limit
20 de febrero de 2010 2:14
Respuesta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 3464

Fecha de incorporación: 23 de septiembre de 2008

Mensajes recientes

Even without the fix - keep in mind, that a jsp is compiled into a java servlet class that outputs all the HTML code that you had in your jsp and also contains all the code that you wrote in the scriptlets on that jsp.

This servlet class will be compiled by javac to bytecode, loaded by the classloader and executed as if you wrote a servlet with loads of
1pageContext.getOut().write("<div>some HTML stuff</div>");


There's a java limit for a single method to contain only 2^16 bytes. So if you hit this limit you almost always have too a very complicated jsp and can work around this by externalizing parts of it to proper java classes and just call them from the jsp, shrinking your jsp dramatically. I've seen this more with generated jsps than hand written ones, as writing (and maintaining) such a beast will be a lot of pain...

Now that you understand the root cause, you might be able to work around it without applying a patch. Note: I've not taken a deeper look at the linked (fixed) issue - might be that you need the patch nevertheless, but you'll figure that out...
Qin Dou
RE: Error in jsp execution: exceeding the 65535 bytes limit
6 de septiembre de 2012 2:21
Respuesta

Qin Dou

Ranking: New Member

Mensajes: 1

Fecha de incorporación: 6 de septiembre de 2012

Mensajes recientes

can we use dynamic include to replace static includeemoticon
Bill Hillston
RE: Error in jsp execution: exceeding the 65535 bytes limit
6 de septiembre de 2012 3:48
Respuesta

Bill Hillston

Ranking: New Member

Mensajes: 4

Fecha de incorporación: 6 de septiembre de 2012

Mensajes recientes

>10000 Views now emoticon