Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Having 'exceeding the 65535 bytes limit' error after upgrading to Java 8  RSS feed

 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I know that this is old issue - and that the proper solution for this is to minimize the code in JSP - but still, I'm stuck with it

Moreover, what surprises me is - this issue never came before - until I upgraded to Java 8. So - isn't it backward compatibility issue from Java side (the thing which worked till Java 7 is not working in Java 8).

Anyways - for now, I'm concerned about how to fix this issue. That is - is there any generic solution for this (because I'm having a very large number of such jsp files and as mentioned above - the issue came only after upgrading to Java 8).

I'm using RedHat Linux and WebLogic server.

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anayonkar Shivalkar wrote:
I know that this is old issue - and that the proper solution for this is to minimize the code in JSP

No. The proper solution is to eliminate Java code from JSPs.

Moreover, what surprises me is -[b] this issue never came before - until I upgraded to Java 8

Likely, the limit was close to being reached, and the differing byte code generated by Java 8 got pushed over the edge.

Sorry, there is no magic bullet that I know of other than restructuring the code until it no longer exceeds the limit. Try refactoring some of the code out into beans and such if wholesale conversion to JSTL/EL isn't possible.

Take note everyone who is still putting Java code in their JSPs 14 years (14 years!) after that has been obsoleted. Sooner or later, one way or another, it's gonna come and bite you in the keester.
 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear!

Now - I have a bit different question (though related to same issue).

I've decided (for now) to split the method into multiple methods - however, the problem is - I'm having a large number of such methods (and it is very difficult to execute all flows to identify which methods are having this issue).

So - is there any way with which I can check the size of method (e.g. I have compiles class of the jsp - so if I can check the size of method by reflection etc)?

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65828
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know of no way to do that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!