Java Heap not clearing

All,
We have weblogic running on a sun ultra 450. The general design of the
system is we have jsp pages that have session variables that are instances
of java classes that we use to hold our business logic. My current issue is
that as the system is scaling, the java heap is not clearing. And when I
say scaling I only mean up to 10 - 20 users. We normally run with the heap
size at 64 mg, but we have pushed it up to 128 and it only it only delays
the inevitable of the heap filling up. We have also let the system set idle
after the heap fills up for 20 mins and it never clears. I have only worked
on this system for two weeks, is it possible that the original developers
missed something oblivious and aren't freeing something up? Is there any
tools that can help me find out what is filling up the heap?
Thanks
Jeff

Profilers like Jprobe should be of help here in detecting the memory leak.
Srikant.
Jeff Krueger wrote:
Weblogic 4.51, JDK 1.1.7
Jeff Krueger
Jeff Krueger wrote:
All,
We have weblogic running on a sun ultra 450. The general design of
the
system is we have jsp pages that have session variables that areinstances
of java classes that we use to hold our business logic. My currentissue is
that as the system is scaling, the java heap is not clearing. And whenI
say scaling I only mean up to 10 - 20 users. We normally run with theheap
size at 64 mg, but we have pushed it up to 128 and it only it onlydelays
the inevitable of the heap filling up. We have also let the system setidle
after the heap fills up for 20 mins and it never clears. I have onlyworked
on this system for two weeks, is it possible that the originaldevelopers
missed something oblivious and aren't freeing something up? Is thereany
tools that can help me find out what is filling up the heap?
Thanks
Jeff
Srikant, [email protected], http://www.weblogic.com/, etc.

Similar Messages

  • Java heap not decreasing properly

    We’re using Weblogic Server 8.1.3 in our applications and having a trouble.
    Our server’s main specifications are :
    IBM Server
    Intel Xeon EM64T supported 3.2 Ghz CPU
    5 GB physical RAM
    Fedora Linux Core 3
    70 GB hard disk
    We set 2 GB Ram as max java heap.We almost made all the tuning in jrockit, jdbc,Linux parameters etc as you mentioned in performance tuning guide from your site.
    The heap goes well during the all week with well garbage connected , but after 8-9 days, the heap does not decrease to its main level after gc (for example 400mb.) even the app. is not used as the graph shown.We’re using jt400 as jdbc driver connecting to As/400. If we restart the server, the problem is solved.But as you desire, restarting server every week is not a healthy solution for us.
    What can be done for this problem?!!
    Thans for your great support.

    You have a memory leak. I suggest you purchase one of the popular memory profilers and have at it. I've successfully used OptimizeIt to analyze and deduce memory leaks in WebLogic applications. Alternatively, I believe JRockit has memory profiling capabilities built into it, although I'm not familiar with it.

  • 1) OutOfMemoryError: Java heap space 2) Could not create the JVM

    Hi guys!
    I'm having a lot of memory problems with the java virtual machine and I really need to fix them as soon as I can :(
    I was running an heavy application on Eclipse and at the end it stopped saying:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space so I tried to enlarge the memory heap space in various ways... editing eclipse.ini (but I cannot go over a certain quantity), trying to change some parameters as:
    -vmargs -XX:MaxPermSize=<memory size>or to launch a jar of my application using :
    Java –jar –Xms1024M –Xmx3000M jarnameAnd now the error I got is:
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.I just don't know what to do!
    I'm using a workstation but I don't have it right now in front of me... it should be a 4 core xeon-64bit having 8 giga of ram, under windows vista.
    do you have any suggestions?
    many many thanks!
    lou

    loucat wrote:
    I don't know if it requires 3GB, I just know the default memory is not enough... I have to load an index (a Lucene-based one) made up of almost 4 GB of images... I cannot change anything of the code about it :(
    Should I have to install a new java version downloading it from this page?
    http://www.java.com/en/download/faq/java_win64bit.xml
    I would download the 64 bit version from this page:
    [http://java.sun.com/javase/downloads/widget/jdk6.jsp]
    .. but you should probable be able to find it on java.com as well.

  • 'java': "Could not reserve enough space on heap" on 48G Linux machine

    I have installed the 64bit version of jdk-1.6.0-17 from java.sun.com on my RedHat Linux machine with 48G internal memory.
    All the java commands return :
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    strace shows that java is trying to allocate 25% of my memory, ie 12G, and my virtual memory limit is 6G.
    The 32bit 1.6.0-16 did not expose this behaviour. I haven't tried the 32bit version of 1.6.0-17, sorry, but I do need those 64 bits. And I haven't tried the 64bit 1.6.0-16 either, should I?
    After finally finding out how to pass -Xmx4096M to jar,javah,javac,java many programs compile fine, but when I compile an app (containing main):
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError: Java heap space
    at com.sun.tools.javac.util.ListBuffer.append(ListBuffer.java:110)
    at com.sun.tools.javac.util.ListBuffer.appendList(ListBuffer.java:120)
    at com.sun.tools.javac.parser.Parser.classOrInterfaceBody(Parser.java:2408)
    at com.sun.tools.javac.parser.Parser.classDeclaration(Parser.java:2253)
    at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(Parser.java:2191)
    at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2180)
    at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2126)
    at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:509)
    at com.sun.tools.javac.main.JavaCompiler.complete(JavaCompiler.java:646)
    at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1869)
    at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777)
    at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
    at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:758)
    at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951)
    at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:842)
    at com.sun.tools.javac.comp.Resolve.findGlobalType(Resolve.java:901)
    at com.sun.tools.javac.comp.Resolve.findType(Resolve.java:961)
    at com.sun.tools.javac.comp.Resolve.findIdent(Resolve.java:986)
    at com.sun.tools.javac.comp.Resolve.resolveIdent(Resolve.java:1162)
    at com.sun.tools.javac.comp.Attr.visitIdent(Attr.java:1714)
    at com.sun.tools.javac.tree.JCTree$JCIdent.accept(JCTree.java:1547)
    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
    at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390)
    at com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:607)
    at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691)
    at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
    at com.sun.tools.javac.comp.MemberEnter.signature(MemberEnter.java:350)
    at com.sun.tools.javac.comp.MemberEnter.visitMethodDef(MemberEnter.java:560)
    at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:639)
    at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
    at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399)
    at com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:410)
    make: *** [Sample.class] Error 3
    Running without the 6G limit and setting Xmx12000M doesn't help.
    I hope someone can shed some light into what's going on here. Why on earth would Java think it needs 12G memory to run? And why, when it gets it, is it still not enough?
    Thanks,
    Calle

    tschodt wrote:
    Cramgo wrote:
    strace shows that java is trying to allocate 25% of my memory, ie 12G, and my virtual memory limit is 6G.Maybe you have found a bug, the default max heap size calculation is supposed to cap it at 1G.
    [http://java.sun.com/performance/reference/whitepapers/tuning.html#section4.1.1]
    So should I report it somewhere or what?
    After finally finding out how to pass -Xmx4096M to jar,javah,javac,java many programs compile fine
    Are you setting one of [_JAVA_OPTIONS|http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html] or [JAVA_TOOLS_OPTIONS|http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#tooloptions] for all shells?
    No, passing -Xmx4096m to java, and -J-Xmx4096m to javac, javah and jar. Is JAVA_OPTIONS or JAVA_TOOLS_OPTIONS better, how do I use those?
    but when I compile an app (containing main):
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError: Java heap space
    make: *** [Sample.class] Error 3Running without the 6G limit and setting Xmx12000M doesn't help.Forgot to specify -Xms and-Xmx?Promise not to laugh. Seems like I somehow got rid of that m.... running with a heap size of 12000 bytes might be a bit sparse, admittedly. ;) Caught it when I added -Xms...
    I hope someone can shed some light into what's going on here. Why on earth would Java think it needs 12G memory to run? And why, when it gets it, is it still not enough?OK so I now can compile again, great. Would be lovely to get rid of the -Xmx but I can live with that...

  • Example not clear  +java magazine JANUARY/FEBRUARY 2012

    In java magazine JANUARY/FEBRUARY 2012 , they are interested subjects which discuss " Using JLayer in Your
    Swing Applications",
    there are one java example about Drawing components into a temporary
    image ,but it is not clear because some Variables not define like img,px
    kindly can any one know that write complete example .
    @Override
    public void paint(Graphics g, JComponent c) {
    //draw regular
    super.paint(g,c);
    //draw into buffer
    Graphics2D g2 = img.createGraphics();
    int ih = *img*.getHeight();
    int iw = img.getWidth();
    //fill with white
    g2.setPaint(Color.WHITE);
    g2.fillRect(0, 0, img.getWidth(), img.getHeight());
    //render view component scaled and translated
    Graphics2D g3 = (Graphics2D) g2.create();
    g3.translate(-*pt*.x + iw, *-pt*.y + ih*2);
    g3.scale(2, 2);
    g3.translate(-pt.x/2 - iw/4, -pt.y/2 - ih/4);
    super.paint(g3,c);
    g3.dispose();
    //draw black border
    g2.setPaint(Color.BLACK);
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.
    VALUE_ANTIALIAS_ON);
    g2.setStroke(new BasicStroke(3));
    g2.draw(new Ellipse2D.Double(0,0,iw,ih));
    g2.drawRect(0,0, iw-1, ih-1);
    g2.dispose();
    //draw image to screen
    Shape oldClip = g.getClip();
    int mx = pt.x-img.getWidth()/2;
    int my = pt.y-img.getHeight();
    g.setClip(new Ellipse2D.Double(mx,my,iw,ih));
    g.drawImage(img, mx, my, null);
    g.setClip(oldClip);
    }Thanks
    Sameer
    Edited by: sabre150 on Feb 17, 2012 9:45 PM
    Added code tags

    The online article has an embedded link you can use to download the complete source code.
    http://www.oraclejavamagazine-digital.com/javamagazine/20120102?folio=37#pg38
    The second column from the right on the page above says:
    >
    NOTE: The source code for the examples described in this article can be downloaded here.
    >
    The word 'here' is a link you can click to download the complete source code.

  • How do I stop "Exception in thread "main" java.lang.OutOfMemoryError.java heap space

    I'm trying to rebuild my iPhone app, with hires graphics etc, using CS6 Flash Pro. However, I get this now,
    Exception in thread "main" java.lang.OutOfMemoryError.java heap space .....  followed by a lot of location information related to the error.
    Now, how do I increase the java memory allowances if that's the problem. I've already upp the jvm.ini file from 128 to 512. No difference.
    I'm based on
    Win8, 8GB RAM, x64
    I'm obviously asking it to load a lot of resources - but hey, Flahs should be able to handle it right?
    thanks if anyone can help

    Hmmm. Maybe I was doing something wrong with images, and icons. I'm not sure, as it's not at all clear really.
    This is the Icons screen from CS6, can't see the files above 512x512unless scrolling up - 29x29,57x57,114x114.  no matter.
    So - after reading and rereading the Apple specs and directions, I removed the 512x512 and the 1024x1024 images from the Icons list that get pulled in during build.
    Next, I again re-read the Apple directives, and put the required files for the build into the base directory of the build, as per this image.
    In actual fact - I can probably leave out the last two. iTunesArtwork.xxx But I don't know, because it is entirely unclear on that point. I can find no directive regarding this at all.
    Do I upload them myself? Probably? I don't know.
    HOWEVER.
    The build now completes. Java, or something, was very confused about finding that file called 1024x1024.png in the build list, and would not do it.
    Take it out of icons, built fine. Put it in the icons directory, and crash...
    Now - with the setup I am using, it all builds fine for ipad and iphone, in all resolutions.
    I don't know what the problem is with what Java is seeing, but this fixes it it seems.
    Hope that helps anyone else.
    cheers

  • Experiencing a 32-bit Java heap barrier on a 64-bit JVM

    We are attempting to run a Java application on a Sun Fire V440 with Solaris 9 and 16GB RAM. We are using the 5.0 JRE.
    We are starting the application with the -d64 and -server options, and 6g of heap space with the max/min settings the same.
    We have queried the Runtime object to confirm that the heap is what we expect it to be, and have plotted our heap usage.
    Our full data matrix requests about 3.4GB of memory at one point in the code. We are unable to analyse the full matrix and encounter an OutOfMemoryError on array allocation. What we notice is that when we scale down the matrix so that heap usage is just under the 32 bit barrier (4.3GB) it runs, but as soon as we cross it we error.
    We have checked that we are using the 64-bit JVM via the sun.arch.data.model system property and the java.version property. The Runtime object also clearly shows that the free memory is available.
    What we see is that before allocation we are using 1,3GB of heap.
    Adding about 3.4GB, on array allocation, to this puts us over the 32-bit threshold and we error. Any input would be greatly appreciated.

    Thank you for the replies. It has helped significantly! As was suggested, the problem seems to be a young and old generation heap problem. Unfortunately, it's too late to change the subject heading. The barrier was just an artifact of a number of coincidences.
    We are closer to solving the issue, but we're not there yet. We tried an experiment with 8GB of heap split 50/50 for young and old using:
    java -d64 -server -Xms8000m -Xmx8000m -Xmn4000m
    resulting in settings of:
    -XX:MaxHeapSize=8388608000
    -XX:MaxNewSize=4194304000
    -XX:NewSize=4194304000
    -XX:+UseParallelGC
    Then we manually GC'd before the array allocation just to make sure the young generation heap was cleared out. Prior to this most of the young generation cycling is due to a BufferedReader readline() command.
    After System.gc(), we read in an matrix of 900K x 300 double values = 2.1GB of data. We still run out of heap space. Our manual GC is invocation #3 and clears out the young heap, and even promotes an insignificant amount of data to the old heap, but leaves both generations largely empty:
    {Heap before gc invocations=1:
    PSYoungGen      total 3584000K, used 3072000K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 100% used [0xfffffffe3d400000,0xfffffffef8c00000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
      to   space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a718,0xfffffffd3fc00000)
    0.000: [GCAdaptiveSizePolicy::compute_survivor_space_size_and_thresh:  survived: 1032296  promoted: 0  overflow: falseAdaptiveSizeStart: 0.016 collection: 1
    AdaptiveSizePolicy::compute_generation_free_space:  minor_time: 0.000157 major_cost: 0.000000 mutator_cost: 0.999843 throughput_goal: 0.990000 live_space: 277243776 free_space: 7340032000 old_promo_size: 4194304000 old_eden_size: 3145728000 desired_promo_size: 4194304000 desired_eden_size: 3145728000
    AdaptiveSizeStop: collection: 1
    [PSYoungGen: 3072000K->1008K(3584000K)] 3072000K->1008K(7680000K), 0.0162566 secs]
    Heap after gc invocations=1:
    PSYoungGen total 3584000K, used 1008K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8cfc068,0xffffffff18000000)
    to space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    PSOldGen total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a718,0xfffffffd3fc00000)
    {Heap before gc invocations=2:
    PSYoungGen      total 3584000K, used 2952191K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 96% used [0xfffffffe3d400000,0xfffffffef1603f40,0xfffffffef8c00000)
      from space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8cfc068,0xffffffff18000000)
      to   space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7596K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6b3d8,0xfffffffd3fc00000)
    88.203: [GCAdaptiveSizePolicy::compute_survivor_space_size_and_thresh:  survived: 999520  promoted: 0  overflow: falseAdaptiveSizeStart: 88.212 collection: 2
    AdaptiveSizeStop: collection: 2
    [PSYoungGen: 2952191K->976K(3584000K)] 2952191K->976K(7680000K), 0.0096021 secs]
    Heap after gc invocations=2:
    PSYoungGen total 3584000K, used 976K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff180f4060,0xffffffff37400000)
    to space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7596K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6b3d8,0xfffffffd3fc00000)
    {Heap before gc invocations=3:
    PSYoungGen      total 3584000K, used 976K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff180f4060,0xffffffff37400000)
      to   space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7596K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6b3d8,0xfffffffd3fc00000)
    88.213: [Full GCAdaptiveSizeStart: 88.392 collection: 3
    AdaptiveSizeStop: collection: 3
    [PSYoungGen: 976K->0K(3584000K)] [PSOldGen: 0K->874K(4096000K)] 976K->874K(7680000K) [PSPermGen: 7596K->7596K(24576K)], 0.1788788 secs]
    Heap after gc invocations=3:
    PSYoungGen total 3584000K, used 0K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    to space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen total 4096000K, used 874K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd434da8c0,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7596K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6b3d8,0xfffffffd3fc00000)
    java.lang.OutOfMemoryError: Requested array size exceeds VM limit
    So next we reduced our data to 890K x 300 double values = 2.14GB of data, not a lot less, and it allocates fine. In fact in GC #4 it has even promoted the signal matrix to the old generation:
    {Heap before gc invocations=1:
    PSYoungGen      total 3584000K, used 3072000K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 100% used [0xfffffffe3d400000,0xfffffffef8c00000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
      to   space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    0.000: [GCAdaptiveSizePolicy::compute_survivor_space_size_and_thresh:  survived: 1048656  promoted: 0  overflow: falseAdaptiveSizeStart: 0.017 collection: 1
    AdaptiveSizePolicy::compute_generation_free_space:  minor_time: 0.000281 major_cost: 0.000000 mutator_cost: 0.999719 throughput_goal: 0.990000 live_space: 277260224 free_space: 7340032000 old_promo_size: 4194304000 old_eden_size: 3145728000 desired_promo_size: 4194304000 desired_eden_size: 3145728000
    AdaptiveSizeStop: collection: 1
    [PSYoungGen: 3072000K->1024K(3584000K)] 3072000K->1024K(7680000K), 0.0170110 secs]
    Heap after gc invocations=1:
    PSYoungGen total 3584000K, used 1024K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8d00050,0xffffffff18000000)
    to space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    PSOldGen total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    {Heap before gc invocations=2:
    PSYoungGen      total 3584000K, used 2891377K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 94% used [0xfffffffe3d400000,0xfffffffeeda9c6d8,0xfffffffef8c00000)
      from space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8d00050,0xffffffff18000000)
      to   space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    37.161: [GCAdaptiveSizePolicy::compute_survivor_space_size_and_thresh:  survived: 1015880  promoted: 0  overflow: falseAdaptiveSizeStart: 37.171 collection: 2
    AdaptiveSizeStop: collection: 2
    [PSYoungGen: 2891377K->992K(3584000K)] 2891377K->992K(7680000K), 0.0098960 secs]
    Heap after gc invocations=2:
    PSYoungGen total 3584000K, used 992K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff180f8048,0xffffffff37400000)
    to space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    {Heap before gc invocations=3:
    PSYoungGen      total 3584000K, used 992K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff180f8048,0xffffffff37400000)
      to   space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen        total 4096000K, used 0K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd43400000,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    37.172: [Full GCAdaptiveSizeStart: 37.352 collection: 3
    AdaptiveSizeStop: collection: 3
    [PSYoungGen: 992K->0K(3584000K)] [PSOldGen: 0K->874K(4096000K)] 992K->874K(7680000K) [PSPermGen: 7593K->7593K(24576K)], 0.1802284 secs]
    Heap after gc invocations=3:
    PSYoungGen total 3584000K, used 0K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    to space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen total 4096000K, used 874K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd434da8c0,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7593K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6a768,0xfffffffd3fc00000)
    {Heap before gc invocations=4:
    PSYoungGen      total 3584000K, used 3072000K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 100% used [0xfffffffe3d400000,0xfffffffef8c00000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
      to   space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen        total 4096000K, used 874K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 0% used [0xfffffffd43400000,0xfffffffd434da8c0,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7611K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6eeb0,0xfffffffd3fc00000)
    54.054: [GC-- [PSYoungGen: 3072000K->3072000K(3584000K)] 3072874K->5158809K(7680000K), 23.1725940 secs]
    Heap after gc invocations=4:
    PSYoungGen total 3584000K, used 3072000K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 100% used [0xfffffffe3d400000,0xfffffffef8c00000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    to space 512000K, 1% used [0xfffffffef8c00000,0xfffffffef947a490,0xffffffff18000000)
    PSOldGen total 4096000K, used 2086809K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 50% used [0xfffffffd43400000,0xfffffffdc29e6578,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7611K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6eeb0,0xfffffffd3fc00000)
    {Heap before gc invocations=5:
    PSYoungGen      total 3584000K, used 3072000K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
      eden space 3072000K, 100% used [0xfffffffe3d400000,0xfffffffef8c00000,0xfffffffef8c00000)
      from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
      to   space 512000K, 1% used [0xfffffffef8c00000,0xfffffffef947a490,0xffffffff18000000)
    PSOldGen        total 4096000K, used 2086809K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
      object space 4096000K, 50% used [0xfffffffd43400000,0xfffffffdc29e6578,0xfffffffe3d400000)
    PSPermGen       total 24576K, used 7611K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
      object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6eeb0,0xfffffffd3fc00000)
    77.227: [Full GCAdaptiveSizeStart: 81.903 collection: 5
    AdaptiveSizePolicy::compute_generation_free_space limits: desired_promo_size: 5310531271 promo_limit: 4194304000 free_in_old_gen: 2048607488 max_old_gen_size: 4194304000 avg_old_live: 4746786511456829440
    AdaptiveSizePolicy::compute_generation_free_space limits: desired_eden_size: 5454285546 old_eden_size: 3145728000 eden_limit: 3145728000 cur_eden: 3145728000 max_eden_size: 3145728000 avg_young_live: 524328
    AdaptiveSizePolicy::compute_generation_free_space:  minor_time: 0.289393 major_cost: 0.104945 mutator_cost: 0.605662 throughput_goal: 0.990000 live_space: 2422441472 free_space: 7340032000 old_promo_size: 4194304000 old_eden_size: 3145728000 desired_promo_size: 4194304000 desired_eden_size: 3145728000
    AdaptiveSizeStop: collection: 5
    [PSYoungGen: 3072000K->0K(3584000K)] [PSOldGen: 2086809K->2095406K(4096000K)] 5158809K->2095406K(7680000K) [PSPermGen: 7611K->7611K(24576K)], 4.6758162 secs]
    Heap after gc invocations=5:
    PSYoungGen total 3584000K, used 0K [0xfffffffe3d400000, 0xffffffff37400000, 0xffffffff37400000)
    eden space 3072000K, 0% used [0xfffffffe3d400000,0xfffffffe3d400000,0xfffffffef8c00000)
    from space 512000K, 0% used [0xffffffff18000000,0xffffffff18000000,0xffffffff37400000)
    to space 512000K, 0% used [0xfffffffef8c00000,0xfffffffef8c00000,0xffffffff18000000)
    PSOldGen total 4096000K, used 2095406K [0xfffffffd43400000, 0xfffffffe3d400000, 0xfffffffe3d400000)
    object space 4096000K, 51% used [0xfffffffd43400000,0xfffffffdc324bad0,0xfffffffe3d400000)
    PSPermGen total 24576K, used 7611K [0xfffffffd3e400000, 0xfffffffd3fc00000, 0xfffffffd43400000)
    object space 24576K, 30% used [0xfffffffd3e400000,0xfffffffd3eb6eeb0,0xfffffffd3fc00000)
    Apologies for the long trace information, but it's not clear yet what is going on. We even tried to add:
    -XX:PretenureSizeThreshold=1000m
    to try to force the signal matrix into old generation first upon allocation. This is where it should be, and would save the heap from having to promote it later. So question is: Is there something we're missing w.r.t. eden/from/to space ? Clearly, there is!
    Thanks again!

  • Reset, empty, clean java heap space

    Hello!
    I am actually not a Java user but an R (statistical programming language) user. I use an R package which writes output
    to Excel sheets. The package uses Java to link between R and Excel. When we used the package to write our data to Excel
    R recently started to throw errors which after doing several tests we traced back to the java heap space.
    Our question is now whether it is possible to clear/empty/reset the java heap space using java on the command line or by
    starting an external programme? It is possible to start external programmes within R. So in case it would be possible to
    clean up the java heap space we basically could write a little script which we could start from R to fix our problem.
    Any help is very much appreciated.
    Best,
    Jo

    Hi,
    the problem is a bit tricky to describe. R provides packages u can use but you do not see the underlying code.
    In the manual of the package it says it's using java to write the data from R to excel spreadsheet. We currently
    writing objects which 20000 rows and 6-10 columns. It works fine for the first 2 or 3 files and then R
    throws an error. To figure out where the error comes from I created a dummy data set with 3000 rows and 6 columns
    and used the package to write the output to the excel sheet again and again in differently named tabs.
    As more output you write to the excel sheet as slower it gets and then at some point R throws an error.
    I tried different data set sizes and deleted excel sheets, created new ones to test different cases but the outcome
    was always the same... R does not directly say something like: java out of heap space but to us it is pretty clear
    when the heap space is reaching its limit something gets screwed up. If you write to the same excel sheet again and again
    but with breaks in between so the heap space has some time to empty itself it works fine. If you restart R and write to the same file
    it works.

  • Java Heap error for BI Publisher

    Hi all,
    We get 'Java Heap Error' while running a report in BI Publisher. Any suggestions on how we can resolve the issue?
    Thanks for your help!
    Nan

    user12088414 wrote:
    Hi all,
    We get 'Java Heap Error' while running a report in BI Publisher. Any suggestions on how we can resolve the issue?
    Is BI Publisher a product? Does the title of this forum include Do Not Post Product-Related Questions Here?
    Please look at the forum list and find [url https://forums.oracle.com/forums/forum.jspa?forumID=245]BI Publisher.

  • Java does not work at all upon using the update manager to update to firefox 3.6.10 for Ubuntu 9.0.4

    OS: Ubuntu 9.0.4
    Browser: Firefox 3.6.10
    upon updating to firefox 3.6.10, java does not work at all.
    websites that use java do not work at all anymore, when they worked just fine before the updating thru update manager. e.g. hulu website cannot play any of the shows.
    i can give the folder of bookmarked pages i tried.
    how to do that on here, i've yet to see if possible.
    i can even give saved text from the terminal concerning certain attempts.
    when i updated thru update manager, it gave some weird java plugin that wasn't there before "The IcedTea Web Browser Plugin IcedTea6 Java Web Browser Plugin (execution of applets on webpages)".
    i uninstalled this as instructed by an answer found in one of the pages i saved, cuz it was conflicting w/another java program the updater said i needed. right now, i don't remember for sure what it was. it perhaps was realplayer flash or Java itself. w/all the hours/days of searching i put in, it's difficult if not downright impossible for me to remember all the specifics of what i tried.
    i've searched throughout many webpages (including many searches on mozilla, ubuntu, java, etc) for instruction in fixing the problem.
    oh, and incidentally, on the Java site, when i try the verify test of Java, firefox pops up with that yellow bar right below the slew of tabbed website windows, giving the statement "additional plugins are required to display all the media on this page. (w/link to) install missing plugins ." which is what i do, go thru the requesting plugin installation. it comes up with, guess what, the IcedTea Java Plugin. i click on the 'next' in the "Plugin Finder Service" box that pops up, & all it gives me is "No plugins were installed. IcedTea ...Plugin failed. and the link 'find out more about plugins or manually find missing plugins'". the link takes me to some of the very things/plugins that wouldn't install in the first place. the Java test failure is a LOL funny, as what plugin it is saying is required (IcedTea) is a recommended alternate program to display the very test in the first place.
    i followed the given instructions on those many searched pages, in every case (barring what i may have just plain missed), but to no avail.
    i've even gone to the point of trying to reinstall the previous 3.5.13 firefox version, from mozilla site. even that wouldn't install.
    i've tried installing Java for my sys direct from it's site. nada.
    now it's time for me to post the problem & perhaps someone will come up with some kind of "dummy" way to fix it.
    until then many sites a regularly use are totally useless to me on this fast puter.
    the only way i can get to use such sites, are two choices: 1. use a dinosaur laptop, which is slower than molasses & cannot handle to any streaming stuff, or 2. use an available internet access puter at the library. but useage for ea person per day is limited to only one hour a day. and one can end up waiting for an hour or more ( in the busiest periods) to even get to use one.
    so, is there anyone at all, who knows any for-sure working fix for this problem?
    thanks muchly :^D
    p.s. i can't pay anybody any money for such help, as is required in certain sites (e.g. Java website), cuz i don't have any.
    i can pay in labor tho, if there is someway to find someone who can physically be at this puter w/me, taking me step-by-step
    sorry for the 20-pg essay. i hope it was all clearly understood. if, not, well, clear communication is always what is needed, ask away.

    Your above posted system details show outdated plugin(s) with known security and stability risks.
    *Shockwave Flash 9.0 r999
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    In Firefox 3.6 and later versions you need the Next-Generation Java™ Plug-In present in Java 6 U10 and later (Linux: libnpjp2.so; Windows: npjp2.dll).
    http://java.com/en/download/faq/firefox_newplugin.xml
    See also http://java.sun.com/javase/6/webnotes/install/jre/manual-plugin-install-linux.html

  • Java is not working with Firefox (but is working with Safari)

    My computer is showing that Java is not enabled via Firefox. When I try to go into Tools/Add-ons, I see that there is no Java plug-in on that list (though I previously had no problem with Java). When I run software update on my Mac, it tells me my software is all up to date. Not sure what else to do. Java is working in Safari, so the problem is clearly with Firefox. I've tried disabling all my plug-ins, and clearing my cache. Nothing has helped.

    Apple has removed support for the Java Plugin2 with the latest Java Update 10 for OS X 10.5 Java version, so the Java plugin is no longer available for Firefox versions and other browsers like Google Chrome that require the Java Plugin2.
    There will be fix for this in Firefox 6 or in Firefox 5.0.1 if that version will be released, so that Firefox will find the plugin again.
    I don't know if all Java applets will still be working on OS X 10.5 with this fix (Apple recommends updating to OS X 10.6).
    * [/questions/844734]
    * [/forums/contributors/707078]

  • "java.lang.OutOfMemoryError: Java heap space"  while trying to read Excel.

    Hi Experts,
    Here is my query. I'm trying to upload excel data into database table. This excel contains more than 20000 records. I'm storing this data in a vector after reading it & passing this vector as a parameter to another method(not mentioned in the below code) which writes into the database. The code works for records <4000, but fails to read beyond that & throws exception as below.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Java heap space
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:433)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    javax.servlet.ServletException: Java heap space
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
         org.apache.jsp.readexcelsap_jsp._jspService(readexcelsap_jsp.java:365)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.OutOfMemoryError: Java heap space
    Below is the code for reference. Kindly Help me in getting this heap space error rectified or suggest me alternate ways.
    I tried increasing Heap space as googled but in vain.
    <%!
    private Vector readExcelSheet(String uploadedFilePath, int sheetNo) throws IOException
         Vector allRowInfo = null;
            try
                HSSFSheet sheet= getWorkSheet(uploadedFilePath,sheetNo);
                //System.out.println(uploadedFilePath);
                //System.out.println(sheetNo);
                //System.out.println("--Sheet--"+sheet);
                //System.out.println("--Sheet--"+sheet.getLastRowNum());
                if(sheet!=null)
                allRowInfo = new Vector();
                for(int i=0;i<=sheet.getLastRowNum();i++)
                    HSSFRow row= sheet.getRow(i);
                    Vector eachRowInfo = new Vector();
                    for(short j=0;j<row.getLastCellNum();j++)
                        eachRowInfo.add(getCellContents(row.getCell(j)));
                        //System.out.println("--"+row.getCell(j));
                    allRowInfo.add(eachRowInfo);
                else
                     allRowInfo = null;
                //return allRowInfo;
            catch (FileNotFoundException ex)
                 System.out.println("-- Error in reading--getWorkSheet -- 1--"+ex);
                 allRowInfo = null;
            catch (IOException ex)
                 System.out.println("-- Error in reading--getWorkSheet-- 2 --"+ex);
                 allRowInfo = null;
            catch (IndexOutOfBoundsException ex)
                 System.out.println("-- Error in reading--getWorkSheet-- 2 --"+ex);
                 allRowInfo = null;
            catch (NullPointerException ex)
                 System.out.println("-- Error in reading--getWorkSheet --"+ex);
                 allRowInfo = null;
            catch(Exception e)
                System.out.println(e.getMessage());
                e.printStackTrace();
                 allRowInfo = null;
            return allRowInfo;
    %>
    <%!
    private HSSFSheet getWorkSheet(String uploadedFilePath, int sheetNo) throws IOException
            HSSFSheet sheet = null;
            try
                FileInputStream inputStream=new FileInputStream(uploadedFilePath);
                POIFSFileSystem poisFile=new POIFSFileSystem(inputStream);
                HSSFWorkbook workBook= new HSSFWorkbook(poisFile);
                sheet = workBook.getSheetAt(sheetNo);
            catch (FileNotFoundException ex)
                 System.out.println("-- Error in reading--getWorkSheet --"+ex);
                 sheet = null;
            catch (IOException ex)
                 System.out.println("-- Error in reading--getWorkSheet --"+ex);
                 sheet = null;
            catch (IndexOutOfBoundsException ex)
                 System.out.println("-- Error in reading--getWorkSheet --"+ex);
                 sheet = null;
            catch (NullPointerException ex)
                 System.out.println("-- Error in reading--getWorkSheet --"+ex);
                 sheet = null;
            catch(Exception e)
                System.out.println(e.getMessage());
                e.printStackTrace();
                sheet = null;
             return sheet;
    %>
    <%!
    public String getCellContents(HSSFCell cell)
            String cellValue="";
            String cellValue1="";
            if(cell!=null)
                 int cellType= cell.getCellType();
                if(cellType==HSSFCell.CELL_TYPE_NUMERIC)
                    cellValue=(float)cell.getNumericCellValue()+"";           
                if(cellType==HSSFCell.CELL_TYPE_STRING)
                     cellValue1=cell.getStringCellValue();
                     StringBuffer sb = new StringBuffer();
                     for(int i = 0; i < cellValue1.length(); i++)
                            sb.append(cellValue1.charAt(i));
                         if(cellValue1.charAt(i)=='\'')
                              sb.append('\'');
                     cellValue = sb.toString();
           return cellValue;
    %>
    <html>
    <body>
    <%
         String file_Name="Myexcel.xls";
         String path = "D://Test Upload//"+file_Name;
         Vector list = readExcelSheet(path,0);
    </html>
    </body>Regards
    Venky
    Edited by: Venky_86 on Jun 17, 2009 6:05 AM

    HOW did you increase the heap space? As that is the only solution you have in this case really.
    It is a known fact that POI can use up a lot of memory for big spreadsheets. If at all possible, I would try to switch to plain text comma separated files / tab delimited files. If you cannot do that, I would try to put a size restriction on the sheets that your application will process to get rid of the heap space risk. A sheet can contain 20000 records, or four sheets can contain 5000 records; in both cases you process the exact same data, but at only 25% of the total memory usage.

  • BI XML Publiser Issue java langOutOfMemoryError Java heap space

    Hi
    I am getting 'java.lang.OutOfMemoryError: Java heap space' error in XML publisher report. Just i am running 15MB data report still its giving OutOfmemory issue.
    Please help on this.
    [5/22/12 9:08:00 AM] [98639:RT12903275] XML Publisher post-processing action complete.
    [5/22/12 9:08:01 AM] [98639:RT12903275] Completed post-processing actions for request 12903275.
    [5/22/12 10:20:15 AM] [OPPServiceThread1] Post-processing request 12903281.
    [5/22/12 10:20:19 AM] [98639:RT12903281] Executing post-processing actions for request 12903281.
    [5/22/12 10:20:19 AM] [98639:RT12903281] Starting XML Publisher post-processing action.
    [5/22/12 10:20:19 AM] [98639:RT12903281]
    Template code: XXGFS_AP_APMCGRN
    Template app: XXGFS_AP
    Language: en
    Territory: US
    Output type: EXCEL
    Exception: java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
         at oracle.jdbc.dbaccess.DBItem.allocBuffer(DBItem.java:204)
         at oracle.jdbc.dbaccess.DBItem.allocBuffer(DBItem.java:232)
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocItemsAndBuffers(DBDataSetImpl.java:300)
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocDataAndItems(DBDataSetImpl.java:261)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java:2068)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java:1951)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:278)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:402)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:477)
         at oracle.apps.fnd.cp.gsm.GenCartComm.getQueueMessage(GenCartComm.java:185)
         at oracle.apps.fnd.cp.gsf.GSMStateMonitor.waitForNextEvent(GSMStateMonitor.java:95)
         at oracle.apps.fnd.cp.gsf.GSMServiceController.mainLoop(GSMServiceController.java:236)
         at oracle.apps.fnd.cp.gsf.BaseServiceController.run(BaseServiceController.java:71)
         at java.lang.Thread.run(Thread.java:619)
    Exception in thread "Cache Stats Writer" java.lang.OutOfMemoryError: GC overhead limit exceeded
    Exception in thread "OPPAQMON:98639" java.lang.OutOfMemoryError: Java heap space
         at oracle.jdbc.dbaccess.DBItem.allocBuffer(DBItem.java:204)
         at oracle.jdbc.dbaccess.DBItem.allocBuffer(DBItem.java:232)
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocItemsAndBuffers(DBDataSetImpl.java:300)
         at oracle.jdbc.dbaccess.DBDataSetImpl._allocDataAndItems(DBDataSetImpl.java:261)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java:2068)
         at oracle.jdbc.dbaccess.DBDataSetImpl.setType(DBDataSetImpl.java:1951)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameterBytes(OracleCallableStatement.java:278)
         at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:402)
         at oracle.apps.fnd.cp.opp.OPPAQMonitor.waitForMessage(OPPAQMonitor.java:423)
         at oracle.apps.fnd.cp.opp.OPPAQMonitor.run(OPPAQMonitor.java:113)
         at java.lang.Thread.run(Thread.java:619)
    [5/22/12 10:24:36 AM] [UNEXPECTED] [98639:RT12903281] java.lang.OutOfMemoryError: Java heap space

    user972966 wrote:
    There are two tables (tableA, tableB) in two different databases. They both have almost same schema/structure. There is mapping between tables on their columns.
    I need to develop a Java application to compare data value between these two tables for a time frame (for example one day) and find missing records or mismatch data.
    The volume of data, even for one day, is huge; almost 70M, 100M. Do you mean this many records? or this many MB. either way they are not that big for Java. If you have collections of up to 2 billion entries, you won't have a problem.
    >
    I have tried to use Thread to split the comparison process in 10 threads. Each thread is fetching portion of data from both tables (for example 7M each) and processing portion them. The issue that I am facing is, I am getting following exception after running:I would suggest you get the program working with one thread first. You will find this is simpler and possibly even faster. Having 10 threads isn't guarenteed to be faster.
    >
    To compare the data, I am fetching data from tableA and add it into List<MyDataObject> listA (the MyDataObject represent a one row data. It is a java bean) and then I am fetching data from tableB and add it into List<MyDataObject> listB
    And then I compare the lists.
    It seems there is limitation in size of List and I cannot add many elements to a List object, it’ll throws Out of Memory exception. The limit is 2^31-1. However an Out of Memory error means what it says. You are out of heap space, so you need to either increase it, or use less memory.
    >
    This method works for small volume, but for large one I get that exceptionIs there any reason you cannot divide the problem so you can process a small volume at a time?

  • Too large java heap error while starting the domain.Help me please..

    I am using weblogic 10.2,after creating the domain, while starting the domain,I am getting this error.Can anyone help me.Please treat this as urgent request..
    <Oct 10, 2009 4:09:24 PM> <Info> <NodeManager> <Server output log file is "/nfs/appl/XXXXX/weblogic/XXXXX_admin/servers/XXXXX_admin_server/logs/XXXXX_admin_server.out">
    [ERROR] Too large java heap setting.
    Try to reduce the Java heap size using -Xmx:<size> (e.g. "-Xmx128m").
    You can also try to free low memory by disabling
    compressed references, -XXcompressedRefs=false.
    Could not create the Java virtual machine.
    <Oct 10, 2009 4:09:25 PM> <Debug> <NodeManager> <Waiting for the process to die: 29643>
    <Oct 10, 2009 4:09:25 PM> <Info> <NodeManager> <Server failed during startup so will not be restarted>
    <Oct 10, 2009 4:09:25 PM> <Debug> <NodeManager> <runMonitor returned, setting finished=true and notifying waiters>

    Thanks Kevin.
    Let me try that.
    Already more than 8 domains were successfully created and running fine.Now the newly created domain have this problem.I need 1GB for my domain.Is there any way to do this?

  • Java Heap Error when using Stateless Session Timer Bean deployed in Oracle

    Hi,
    Am getting following Java Heap Error when using Stateless Session Timer Bean deployed in Oracle 10g AS R3 (Oracle Containers for J2EE 10g (10.1.3.0.0) (build 060119.1546.05277) ):
    06/08/02 14:58:43 javax.ejb.EJBException: java.lang.OutOfMemoryError: Java heap space
    06/08/02 14:58:43 at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:304)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:67)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:45)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/08/02 14:58:43 at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    06/08/02 14:58:43 at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:71)
    06/08/02 14:58:43 at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1624)
    06/08/02 14:58:43 at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:92)
    06/08/02 14:58:43 at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:184)
    06/08/02 14:58:43 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    06/08/02 14:58:43 at java.lang.Thread.run(Thread.java:595)
    06/08/02 14:58:43 Caused by: java.lang.OutOfMemoryError: Java heap space
    I had tried using -Xms / -Xmx options (upto 1 GB).
    The trace of exception gets delayed (from being displayed on the console) as the memory size is increased; but after sometime it starts getting displayed on the console.
    Even though this exception is displayed on the console, the Timer Bean continues to execute upto sometime before it finally crashes!
    If anyone has encountered such problem; would appreciate if you could share the solution.
    Regards, Vidyadhar

    Hi guys, I have the same problem. I have an application EAR file with two modules (EJB and WAR starting in this order). The application can schedule a process via EJB timer. In this case restarting the server I receive the error above. If I change the modules start order --> WAR - EJB the server start correctly, but the application scheduler fails (the persistency is not working) with this error:
    07/10/09 10:30:54 FINISSIMO: TimerTask.runBeanTimer java.lang.NullPointerException; nested exception is: java.lang.NullPointerExceptionjavax.ejb.TransactionRolledbackLocalException: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException
    java.lang.NullPointerException
         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:107)
         at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
         at java.util.ResourceBundle.getString(ResourceBundle.java:285)
         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
         at oracle.j2ee.util.TraceLogFormatter.format(TraceLogger.java:124)
         at oracle.j2ee.util.TraceLogger$TraceLoggerHandler.publish(TraceLogger.java:105)
         at java.util.logging.Logger.log(Logger.java:428)
         at java.util.logging.Logger.doLog(Logger.java:450)
         at java.util.logging.Logger.log(Logger.java:539)
         at oracle.ias.container.timer.TimerEntry.readObjFromBytes(TimerEntry.java:308)
         at oracle.ias.container.timer.TimerEntry.getInfo(TimerEntry.java:107)
         at oracle.ias.container.timer.Timer.getInfo(Timer.java:367)
         at oracle.ias.container.timer.EJBTimerImpl.getInfo(EJBTimerImpl.java:89)
         at com.finantix.foundation.integration.ejbtimer.EJBTimerServiceExecutorBean.ejbTimeout(EJBTimerServiceExecutorBean.java:42)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBTimeoutJoinPoint.invoke(EJBTimeoutJoinPoint.java:20)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:53)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:38)
         at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1714)
         at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:106)
         at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:220)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    javax.ejb.TransactionRolledbackLocalException: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException
         at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:309)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:73)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:55)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:38)
         at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1714)
         at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:106)
         at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:220)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:107)
         at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
         at java.util.ResourceBundle.getString(ResourceBundle.java:285)
         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
         at oracle.j2ee.util.TraceLogFormatter.format(TraceLogger.java:124)
         at oracle.j2ee.util.TraceLogger$TraceLoggerHandler.publish(TraceLogger.java:105)
         at java.util.logging.Logger.log(Logger.java:428)
         at java.util.logging.Logger.doLog(Logger.java:450)
         at java.util.logging.Logger.log(Logger.java:539)
         at oracle.ias.container.timer.TimerEntry.readObjFromBytes(TimerEntry.java:308)
         at oracle.ias.container.timer.TimerEntry.getInfo(TimerEntry.java:107)
         at oracle.ias.container.timer.Timer.getInfo(Timer.java:367)
         at oracle.ias.container.timer.EJBTimerImpl.getInfo(EJBTimerImpl.java:89)
         at com.finantix.foundation.integration.ejbtimer.EJBTimerServiceExecutorBean.ejbTimeout(EJBTimerServiceExecutorBean.java:42)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBTimeoutJoinPoint.invoke(EJBTimeoutJoinPoint.java:20)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:53)
         ... 9 more
    Any idea?
    Thx Auro

Maybe you are looking for