Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Sam E
Error in jsp execution: exceeding the 65535 bytes limit
18 de Outubro de 2009 05:22
Resposta

Sam E

Ranking: Liferay Master

Mensagens: 660

Data de entrada: 2 de Março de 2009

Mensagens recentes

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 Outubro de 2009 00:41
Resposta

Sam E

Ranking: Liferay Master

Mensagens: 660

Data de entrada: 2 de Março de 2009

Mensagens recentes

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 Fevereiro de 2010 05:59
Resposta

Tarun S. Kayasth

Ranking: Regular Member

Mensagens: 160

Data de entrada: 8 de Junho de 2007

Mensagens recentes

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 Fevereiro de 2010 09:38
Resposta

Amos Fong

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 1898

Data de entrada: 7 de Outubro de 2008

Mensagens recentes

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 Fevereiro de 2010 20:29
Resposta

Tarun S. Kayasth

Ranking: Regular Member

Mensagens: 160

Data de entrada: 8 de Junho de 2007

Mensagens recentes

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

Kowbathullah Gnaniyar

Ranking: Liferay Master

Mensagens: 608

Data de entrada: 19 de Dezembro de 2007

Mensagens recentes

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 Fevereiro de 2010 02:14
Resposta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 3459

Data de entrada: 23 de Setembro de 2008

Mensagens recentes

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 Setembro de 2012 02:21
Resposta

Qin Dou

Ranking: New Member

Mensagens: 1

Data de entrada: 6 de Setembro de 2012

Mensagens recentes

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

Bill Hillston

Ranking: New Member

Mensagens: 4

Data de entrada: 6 de Setembro de 2012

Mensagens recentes

>10000 Views now emoticon