2 Replies Latest reply: Jun 17, 2013 3:09 AM by MJaro RSS

    Getting OutOfMemoryError with REST webservice


      I need some help with my configuration regarding
      the listener (version as stand alone with Application Express

      I consume (via $.ajax(...)) a REST-Webservice for request a clob value.

      Configuration of my Ressource Handler:
      method: GET
      Requires Secure Access: No
      source type: "Query one Row"
      Pagination Size: 1
      Source: select id, col3 from csvloader where id = :ID

      This works as excepted until I want to load a value that is bigger then 65 kb.
      In my cmd box, where the listener is stated, I noticed the following error:

      22.03.2013 14:18:49 oracle.dbtools.rt.web.WebErrorResponse internalError
      SCHWERWIEGEND: Java heap space
      java.lang.OutOfMemoryError: Java heap space

      ("SCHWERWIEGEND" means "fatal" in german)

      In order to avoid this error, I tried to increase the heap space:

      java -Xms500m -Xmx1024m -jar apex.war

      -> no change, still getting OutOfMemoryError (HTTP 500 Errorcode)

      Any suggestions, hints?

      Thanks for your help!

        • 1. Re: Getting OutOfMemoryError with REST webservice

          In order to find a workaround for this problem, I choose to install glassfish-3.0.1 (Open Source Edition).
          Unfortunately, this is not a solution, I still get the the following error:

          "Caused by: java.lang.OutOfMemoryError: Java heap space"

          Thanks for your suggestions!

          • 2. Re: Getting OutOfMemoryError with REST webservice




            I'm still working on this topic. I updated the listener to the newest version

            but this is not a solution for my problem.



            Steps I've done:

            - raised JVM-Memory: GlassFish -> JVM configuration -> JVM options: add/set "-Xmx1024m" and "-XX:MaxPermSize=256m"

            - raise "-Xmx1024m" to "-Xmx1224m" -> glassfish doesn-'t start



            Maybe I have a problem with my os: I use windows XP (32bit) in a virtual machine. Seems that JVM don't get enough

            memory. On the other hand, I just want to get about 65 - 72,5 KB from a blob-field to my browser....



            Any suggestions for me?



            Thanks a lot!