Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Sam E
Error in jsp execution: exceeding the 65535 bytes limit
18 ottobre 2009 5.22
Risposta

Sam E

Punteggio: Liferay Master

Messaggi: 660

Data di Iscrizione: 2 marzo 2009

Messaggi recenti

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 ottobre 2009 0.41
Risposta

Sam E

Punteggio: Liferay Master

Messaggi: 660

Data di Iscrizione: 2 marzo 2009

Messaggi recenti

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 febbraio 2010 5.59
Risposta

Tarun S. Kayasth

Punteggio: Regular Member

Messaggi: 159

Data di Iscrizione: 8 giugno 2007

Messaggi recenti

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 febbraio 2010 9.38
Risposta

Amos Fong

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1844

Data di Iscrizione: 7 ottobre 2008

Messaggi recenti

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 febbraio 2010 20.29
Risposta

Tarun S. Kayasth

Punteggio: Regular Member

Messaggi: 159

Data di Iscrizione: 8 giugno 2007

Messaggi recenti

Thanks Amos, will try this...
Gnaniyar Zubair
RE: Error in jsp execution: exceeding the 65535 bytes limit
19 febbraio 2010 23.15
Risposta

Gnaniyar Zubair

Punteggio: Liferay Master

Messaggi: 602

Data di Iscrizione: 19 dicembre 2007

Messaggi recenti

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 febbraio 2010 2.14
Risposta

Olaf Kock

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1825

Data di Iscrizione: 23 settembre 2008

Messaggi recenti

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 settembre 2012 2.21
Risposta

Qin Dou

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 6 settembre 2012

Messaggi recenti

can we use dynamic include to replace static includeemoticon
Bill Hillston
RE: Error in jsp execution: exceeding the 65535 bytes limit
6 settembre 2012 3.48
Risposta

Bill Hillston

Punteggio: New Member

Messaggi: 4

Data di Iscrizione: 6 settembre 2012

Messaggi recenti

>10000 Views now emoticon