Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Sam E
Error in jsp execution: exceeding the 65535 bytes limit
18. Oktober 2009 05:22
Antwort

Sam E

Rang: Liferay Master

Nachrichten: 660

Eintrittsdatum: 2. März 2009

Neue Beiträge

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. Oktober 2009 00:41
Antwort

Sam E

Rang: Liferay Master

Nachrichten: 660

Eintrittsdatum: 2. März 2009

Neue Beiträge

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. Februar 2010 05:59
Antwort

Tarun S. Kayasth

Rang: Regular Member

Nachrichten: 160

Eintrittsdatum: 8. Juni 2007

Neue Beiträge

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. Februar 2010 09:38
Antwort

Amos Fong

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 1898

Eintrittsdatum: 7. Oktober 2008

Neue Beiträge

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. Februar 2010 20:29
Antwort

Tarun S. Kayasth

Rang: Regular Member

Nachrichten: 160

Eintrittsdatum: 8. Juni 2007

Neue Beiträge

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

Kowbathullah Gnaniyar

Rang: Liferay Master

Nachrichten: 608

Eintrittsdatum: 19. Dezember 2007

Neue Beiträge

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. Februar 2010 02:14
Antwort

Olaf Kock

LIFERAY STAFF

Rang: Liferay Legend

Nachrichten: 3472

Eintrittsdatum: 23. September 2008

Neue Beiträge

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. September 2012 02:21
Antwort

Qin Dou

Rang: New Member

Nachrichten: 1

Eintrittsdatum: 6. September 2012

Neue Beiträge

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

Bill Hillston

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 6. September 2012

Neue Beiträge

>10000 Views now emoticon