Results 1 to 3 of 3

Thread: Java Heap Space

  1. #1
    Join Date
    Jul 2010
    Posts
    2
    Rep Power
    0

    Exclamation Java Heap Space

    Hi,

    This is JSF and SWF project. I have problem while I click command link, I get following error. I have tried running on other eclipse instance and it works fine. I have edited all eclipse.ini and also catalina.bat files but didn't work. Even newer instance of eclipse and tomcat were installed and same error. Could someone tell me what's the problem like.

    org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOfRange(Unknown Source)
    at java.lang.String.<init>(Unknown Source)
    at org.apache.tomcat.util.buf.CharChunk.toStringInter nal(CharChunk.java:500)
    at org.apache.tomcat.util.buf.StringCache.toString(St ringCache.java:330)
    at org.apache.tomcat.util.buf.CharChunk.toString(Char Chunk.java:496)
    at org.apache.catalina.core.ApplicationContext.getReq uestDispatcher(ApplicationContext.java:439)
    at org.apache.catalina.core.ApplicationContextFacade. getRequestDispatcher(ApplicationContextFacade.java :196)
    at org.apache.catalina.core.ApplicationHttpRequest.ge tRequestDispatcher(ApplicationHttpRequest.java:326 )
    at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:219)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:258)
    at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1174)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:901)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:809)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter .java:530)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.inv oke(ApplicationDispatcher.java:646)
    at org.apache.catalina.core.ApplicationDispatcher.pro cessRequest(ApplicationDispatcher.java:436)
    at org.apache.catalina.core.ApplicationDispatcher.doF orward(ApplicationDispatcher.java:374)
    at org.apache.catalina.core.ApplicationDispatcher.for ward(ApplicationDispatcher.java:302)
    at org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:240)
    at org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:258)
    at org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1174)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:901)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:809)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,182
    Rep Power
    20

    Default

    Apart from stating the obvious, that you are using more memory than the JVM has available, there's not much we can say.

    It looks like it's eating up memory on some array copy, possibly during building the view data? Is there some huge slab of data you're passing back from whatever Servlet this is?

  3. #3
    Join Date
    Jul 2010
    Posts
    2
    Rep Power
    0

    Default

    It's solved now. I had this line in my view (xhtml) at three places

    <input><img src="...."></input>

    After deleting these line, there is no heap space problem now. Looks like this was eating up a whole lot of memory...

Similar Threads

  1. OutOfMemoryError: Java heap space
    By redasu in forum New To Java
    Replies: 3
    Last Post: 04-23-2010, 01:05 PM
  2. Java heap space,
    By babyboban in forum Advanced Java
    Replies: 18
    Last Post: 01-14-2010, 01:22 PM
  3. Java heap space - OutOfMemory
    By iMemory in forum Java Applets
    Replies: 3
    Last Post: 10-13-2009, 10:51 PM
  4. Java Heap Space
    By sandeeprao.techno in forum Advanced Java
    Replies: 19
    Last Post: 10-30-2008, 12:27 PM
  5. Java heap space?
    By javanewbie in forum New To Java
    Replies: 1
    Last Post: 06-24-2008, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •