500 Internal Server Error OracleJSP: code too large for try statement catch

We have an application which uses JSPs as front end and we are using Struts 1.1. When we run one of the JSP it shows the following error after executing .We are using OCJ4 server having version 9.0.4.0
500 Internal Server Error
OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:E:\oracle\product\10.1.0\AS904\j2ee\home\application-deployments\VAS3006\vas\persistence\_pages\\_Requirement .java
code too large for try statement catch( Throwable e) { 
7194
code too large for try statement catch( Exception clearException) { 
44
code too large for try statement try { 
23
code too large public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { 
The JSP/application runs okay on one machine (System Tesing machine)with OCJ4 server having version10.1.2.0 but throughs an error on other machine( Development machine)with OCJ4 server having version9.0.4.0.The question is why it is running on one machine ane giving error on other machine I am aware that there can't be more than 64kB of code between try-catch block .Total size of the generated JSP class in our case is 577KB.
Is the problem because of different version of Application server OC4J?.Is it any fix for this? Or Can anyone please suggest a work around. Or is there a method by which the JSP generated code is split between different try - catch blocks rather than a single try-catch block.Utlimately We don't know the whether is it a problem with JVM or hardware .
It would be really helpful if you would provide me with some suggestion and input.
Regards
Shyam

Sir,
I am aware of the limitations of JVM that it won't allow java code more than 64Kb in method but we are using different versions of Application server .Application is working okay with OC4J application server(10.1.2.0) but gives error on Application server with version 9.0.4.0. Is this a problem with OC4J application server 9.0.4.0. I had gone through the documentation ofOC4J 9.0.4.0.application server but it does not mention about the this bug/fixes.
Please giude me on the same.
Regards,Shyam

Similar Messages

  • Error: code too large for try statement, when compiling a big java file.

    Hi,
    I have a big java file ( around 16000 lines). When compiling it, I got following error message:
    MyMain.java:15233: code too large for try statement
    } catch ( Throwable t ) {
    In MyMain.java, I just repeat following statements about 1000 times.
    try {
    if ( year >= 2002 ) {
    System.out.println( "year: Evaluation version is not valid" );
    } else {
    System.out.println( "year: Evaluation version is still valid" );
    } catch ( Throwable t ) {
    if ( year >= 2002 ) {
    System.out.println( "year: Evaluation version is not valid" );
    } else {
    System.out.println( "year: Evaluation version is still valid" );
    I tried 1.3 and 1.4 javac compiler, there was some error.
    How to make compiler to compile this code?
    Thanks,

    Hi,
    I have a big java file ( around 16000 lines). When
    compiling it, I got following error message:
    MyMain.java:15233: code too large for try statement
    } catch ( Throwable t ) {
    I tried 1.3 and 1.4 javac compiler, there was some
    error.
    How to make compiler to compile this code?
    You don't. Each method has an absolute limit on the number of byte codes. You have reached that limit. The limit is part of the specification and JVMs will refuse to run classes that exceed the limit. So even if you could compile it, it wouldn't run.
    It is quite common for code generators to generate large monolithic blocks of code. Presumably this is how you got to this spot. Modify the code generator to break it into smaller blocks.
    If you did it manually then you did it wrong. And you will have to manually break it into smaller blocks. (And re-examine your design since it is probably wrong.)

  • Code too large for try statement

    I have a jsp that I am getting the following exception on.
    [ServletException in:/jsp/DLG_PTEN.jsp] Unable to compile class for JSP C:\Documents and Settings\ebsgam\My Documents\IBM\wsappdev51\workspace\StnWeb\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\DefaultEAR\StnWeb.war\jsp\_DLG_5F_PTEN.java:13576: code too large for try statement } catch (Throwable t) { ^ C:\Documents and Settings\ebsgam\My Documents\IBM\wsappdev51\workspace\StnWeb\.metadata\.plugins\com.ibm.etools.server.core\tmp0\cache\localhost\server1\DefaultEAR\StnWeb.war\jsp\_DLG_5F_PTEN.java:1165: code too large for try statement try { ^ 2 errors '
    I am currently running this on Websphere Aplication Developer 5. First off I'm hoping that this error will go away when it is deployed to tomcat. But I wanted to see if anyone has had this problem and knows of a tweek or work around for it.
    The jsp in question is not the longest one I have... but it has a large number of drop down list boxes .. using jstl <select><option>. and the drop downs have around 40 or 50 items in them.

    in weblogic 8.1, i've met the same error, and solved the problem by adding param to weblogic.xml , like below:
      <jsp-descriptor>
         <jsp-param>
              <param-name>noTryBlocks</param-name>
              <param-value>true</param-value>
         </jsp-param>
      </jsp-descriptor>

  • Error in jsp:Code too large for try statement

    Hi friends,
    When i try to run a jsp program i am getting error "code too large for try statement". How can i rectify it rather than truncating that jsp? is there another way?
                                                  Basha

    Basha,
    When we were implenting an e-form component which was very big, the only way we were able to achieve it was by
    "jsp includes". In the main form simply included muliple
    jsp pages, where each was a section of the e-form.
    we have not found any other better way.
    Hope this helps.
    -Venkat Malempati
    Message was edited by: Venkat Malempati
    Message was edited by: Venkat Malempati

  • How do you avoid a code too large for try statement error message while com

    i have the jsp which is having 142 fields
    i am trying to dispaly 142 fields its showing the above error
    at runtime
    i think JVM is not allowing to complie the jsp
    please any body give me the solution for it

    I've got the same error with Weblogic 8.1 .
    When I tried to visit a JSP I wrote, which had many tags, the page showed the error: code too large for try statement.
    I'v reviewed a lot of discussions through the internet and solved the problem at last by adding one parameter to weblogic.xml.
      <jsp-descriptor>
         <jsp-param>
              <param-name>noTryBlocks</param-name>
              <param-value>true</param-value>
         </jsp-param>
      </jsp-descriptor>Hope this may help you out.

  • JSPX: code too large for try statement try

    I'm migrating an application from Tomcat 5 to OC4J 10.1.3.2 and I'm getting the following error in a JSPX file.
    8770
    [jsp src:line #:931]
    code too large for try statement try { 
    This isn't an issue in Tomcat because of the way jasper creates the .java file. OC4J creates one really long _jspService method.  Is there anything I can do short of rewriting the page to fix this?  Let me know if further information is required.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I have created bug 6152265 to track this.

  • Code too large for try statement - help :(

    Please help :(
              We are migrating our project from an older technology, Kiva from netscape
              (and about time we migrate) . Kiva uses template evaluation similar to
              jakarta velocity. So the fastest way we found was to translate kiva
              templates to JSPs via perl script. All is working fine except a bunch of
              JSPs which are too large for the compiler to handle. If we were not
              migrating and instead wroking from scratch we would have simply made the
              JSP's size smaller and used jsp:include, but in this case it will involve a
              lot of effort as that means changing a lot of business code.
              Basically what we get is "code too large for try statement". Is there anyway
              we can tell weblogic to put smaller code fragments in try/catch when it
              converts a JSP into java code.
              

              Haider,
              Have you seen the following Sun Bug Parade posting
              http://developer.java.sun.com/developer/bugParade/bugs/4210912.html
              Additionally, you may want to try the '-noTryBlocks' jsp compiler switch and see
              if it makes a difference
              See the following 6.1 URL
              http://edocs.bea.com/wls/docs61/jsp/reference.html#57805
              Chuck Nelson
              DRE
              BEA Technical Support
              

  • Compilation Error Code too large for Try block

    I am getting error while jsp compilation.
              code too large for try statement.
              Can anybody help me in this. I am using WL 8.1.4
              Thanks in Advance
              Himanshu

    This article pretty much sums it up: http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20711819.html
              Your JSP_.java file will not compile to a .class file since the JSP is too large and the newer java compiler is more strict. You have to most likely break your JSP up using includes or use a more efficient design.

  • 500 Internal Server Error OracleJSP: JSP Error: Exception:java.lang.NullPoi

    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/ForecastVsActualWithProgressBarWebApp/htdocs/forecastvsactualportlet/processing.jsp
    Exception:
    java.lang.NullPointerException at java.net.URLClassLoader$1.run(URLClassLoader.java:190) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:289) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:282) at com.evermind.naming.ContextClassLoader.loadClass(ContextClassLoader.java:143) at java.lang.ClassLoader.loadClass(ClassLoader.java:235) at oracle.jsp.parse.JspUtils.loadClassJDK(JspUtils.java:256) at oracle.jsp.parse.JspUtils.loadClass(JspUtils.java:246) at oracle.jsp.parse.JspRTTag.<init>(JspRTTag.java:149) at oracle.jsp.parse.JspParseState.createTagParser(JspParseState.java:575) at oracle.jsp.parse.JspParseTag.parseNextTag(JspParseTag.java:693) at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:184) at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:154) at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:428) at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:284) at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:483) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:542) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:305) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)
    --------------------------------------------------------------------------------

    Is this related to a download from Oracle website?
    You might want to post more information and the "question" here.

  • Oracle JSP Exception code too large for try block

    My jsp is exceeding the memory limit (64KB for Oracle 10g App server i think its the JVM limit),
    so it is throwing exception ,code too large for try block,how to over come this,I cant minimize the use of logic tags because it is business requirement.please help me out.

    I think you need to give a value to the attribute buffer in the <%@ page%> directive to solve the problem.
    There will not be any need of going for pagination then.
    buffer="none | 8kb | sizekb"The buffer size in kilobytes used by the out object to handle output sent from the compiled JSP page to the client Web browser. The default value is 8kb. If you specify a buffer size, the output is buffered with at least the size you specified.
    check the documentation at
    http://java.sun.com/products/jsp/tags/11/syntaxref11.fm7.html
    Uday

  • [Solved]500 Internal Server Error- when open dialog page for LOV

    Hello
    I have developed JSF / ADF Bc application and my form has inputselect component and everything works fine in embeded OC4J, but when i deploy the application to apps server i get below error when i launch the dialog page to select a value
    500 Internal Server Error
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
    Please help
    Thanks
    Message was edited by:
    user570961

    Frank
    unfortunately nothing is reported in the log file , please see the bottom of the message to see what's in the log file
    this is all i see in the log and this is added to log when the page is loaded before i try to launch my dialog page and nothing else is added to the error i am getting. and in IE it just says page cannot be displayed and firefox reports the 500 Internal server error with the message i posted in original post
    we have QA server and there i deployed the application from jdeveloper and it works Okay , but for production , production services team deployed the application using the EAR file i am giving to them and i am getting this error. ( I am providing them with the EAR file generated when i deploy the application to QA from jdeveloper)
    I thought i try to deploy this to QA from ear file to see if i can reproduce the problem , so undeployed my application and tried to deploy using ear file in qa, but it never goes to step 2. it hangs on the screen uploading file ..... it never completes uploading and it does not fail with error either
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Short,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Short)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Byte,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Byte)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Integer,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Integer)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Long,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Long)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Float,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Float)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Double,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Double)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ValidatorRule end
    WARNING: [ValidatorRule]{faces-config/validator} Merge(javax.faces.LongRange)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end
    WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.DateTime,null)
    Oct 2, 2007 9:03:50 PM com.sun.faces.config.rules.ConverterRule end

  • Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I get this when I try to enter a record into one of our Access databases, what do I need to do to fix it, I don't know what it means

    Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I don't know what this means or how to fix it, I get it when I try to enter a ticket into one of our custom data bases in Access

    Apache Tomcat/4.0.4 - HTTP Status 500 - Internal Server Error - I don't know what this means or how to fix it, I get it when I try to enter a ticket into one of our custom data bases in Access

  • 500 Internal Server Error in BI Publisher

    Hi Guys,
    Just started to use BI publisher. When I tried to export report from BI Answer in
    Data Model >> General Setting >> Type: BI Answer
    In the DETAILS I clicked on the flash light icon.
    A new window popped up with the following Error Message:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:C:\OracleBI\oc4j_bi\j2ee\home\application-deployments\xmlpserver\xmlpserver\persistence\_pages\\_saw__popup.java
    Error: Could not find or load main class com.sun.tools.javac.Main
    The URL looks unusual too: https://localhost/xmlpserver/saw_popup.jsp?f=
    ALL I did recently was enable SSL encryption. Not sure if this mucked up the URL setting or this is something a bigger issue. I did Google around with the error code but couldn't find anyone having similar problem.
    Would be greatful if someone can shed some light on this.
    Many thanks.

    Hi JAM,
    No I didnt. I checked HTTP setting it was already set to HTTPS.
    Error says it cannot compile some "saw__popup.java" and that could not load the main class.
    when I googled the error code, other (non-BI) sites mentioned about JDK issue. I got the latest one JDK 1.7.0 so bit lost really.

  • 500 Internal Server Error - When calling LOV's

    I receiving the following error when calling a LOV.
    Both date LOV's and LOV's based on a foreign key fail.
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors compiling:D:\Oracle\oc4j\j2ee\home\application-deployments\ois\web\persistence\_pages\_jheadstart\_lovFrame.java
    error: Invalid class file format in C:\Program Files\Java\j2re1.4.0\lib\rt.jar(java/lang/Object.class). The major.minor version '48.0' is too recent for this tool to understand.
    D:\Oracle\oc4j\j2ee\home\application-deployments\ois\web\persistence\_pages\_jheadstart\_lovFrame.java:0: Class java.lang.Object not found in class com.orionserver.http.OrionHttpJspPage.
    package _jheadstart;
    ^
    2 errors

    Marcel,
    JDeveloper will not run out of the box with JDK 1.4. There is a help topic 'Configuring Support for JDK 1.4.0.01 in JDeveloper' that gives you some information.
    But you also need to verify the compatability of all the frameworks you use with JKD 1.4, including BC4J, MVC and UIX. E.g. the classes12.jar we normally use for a JHeadstart application only works with JKD 1.2/1.3.
    Having found out which versions of the frameworks you need, the next step is to validate whether the JHeadstart runtime classes will work with these versions. We have no experience ourself in this respect.
    If it is an option for you, you might consider to downgrade to JKD 1.3.
    Jan Kettenis

  • Forms : 500 Internal Server Error

    All was working well until I installed the latest Sun Java version 6 Update 16. Now, when I am
    trying to 'run form' my web browser session hangs (Morizolla Firefox). So to verify that the
    HTTP Listener is working correctly I enter the following URL in a Web browser
    http://127.0.0.1:8889/j2ee
    and I get the following error:
    500 Internal Server Error
    OracleJSP: oracle.jsp.provider.JspCompileException:
    Errors
    compiling:C:\DevSuiteHome_1\j2ee\DevSuite\application-deployments\default\defaultWebApp\persistence
    \_pages\\_index.java
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Environment
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Operating System Microsoft Windows XP Professional v 5.1.2600
    Java version 6 Update 16 [recently installed]
    Please, Please can someone help??????
    Thanks in advance!!

    hi
    ++500 Internal Server Error+OracleJSP: oracle.jsp.provider.JspCompileException:+
    Errors
    the above error is from u r Formsweb.cfg because u r sun java is not compatible please reinstall Java initiator.
    did u change anything in formsweb.cfg?if yes please check for space in that.
    sarah
    Edited by: S@R@h on Nov 3, 2009 8:36 PM

Maybe you are looking for

  • What is the best solution these days for running PC software on my intel iMac?

    I have some special software that only runs on Windows operating system.  Can I use a PC emulator software package or can I partition my hard drive and install Windows? I have a 3.06 GHz Intel Core 2 Duo processor with 4 GB 1067 MHz DDR3 memory. I am

  • Airport Utility fails to see Airport Extreme Only an Older Base Station no longer connected

    Very weird what's happened... earlier this morning there was a power failure (none of my 2 computers were ON, and they are plugged in thru UPS with power surge/outage capabilities). I turned my old Macbook Pro (2007) and everythign is fine. My Mac Pr

  • MacBookPro suddenly stopped linking to my home network by Wi-Fi.

    Without me making any system updates or changes, my MacbookPro today put up the following message "Another device on the network is using your computer's IP address (192.168.0.5). Try connecting again later. If you continue to have problems, change t

  • Magic Mouse tracking problem

    OK...it's all pretty and shiny so I bought it. Installed the mouse software update to Snow Leopard and though it appears to be installed just fine, the tracking rate is SLOWWWWWWW, even though I have it set to the highest tracking setting. With my Wi

  • Data Grid Dynamic Cell Colors

    I would like to create a Data Grid where the individual cell colors change based on the number in the cell. For example, numbers between 0 and 1 would be green, between 1 and 2 would be yellow, and between 3 and 4 would be red. I am wondering if this