Java.lang.OutOfMemoryError exception

Can someone comment on why OutOfMem exception is thrown based on the following GC output (OutOfMem message is actually mixed with "compacting perm gen")? does it mean it ran out of perm space? Perm space is always at 99%.
Thanks
Heap
def new generation total 14208K, used 14208K [0x029e0000, 0x03940000, 0x03940000)
eden space 12672K, 100% used [0x029e0000, 0x03640000, 0x03640000)
from space 1536K, 100% used [0x03640000, 0x037c0000, 0x037c0000)
to space 1536K, 0% used [0x037c0000, 0x037c0000, 0x03940000)
tenured generation total 189056K, used 189055K [0x03940000, 0x0f1e0000, 0x0f1e0000)
the space 189056K, 99% used [0x03940000, 0x0f1dfff8, 0x0f1e0000, 0x0f1e0000)
compacting perm gen total 16896K, used 16728K [0x0f1e0000, 0x10260000, 0x131e0000)
the space 16896K, 99% used [0x0f1e0000, 0x10236268, 0x10236400, 0x10260000)
3903.26: [Tenured: 189055K->111945K(189056K), 1.9745907 secs] 203263K->111945K(203264K) Heap after GC invocations=184:
Heap
def new generation total 14208K, used 14208K [0x029e0000, 0x03940000, 0x03940000)
eden space 12672K, 100% used [0x029e0000, 0x03640000, 0x03640000)
from space 1536K, 100% used [0x03640000, 0x037c0000, 0x037c0000)
to space 1536K, 0% used [0x037c0000, 0x037c0000, 0x03940000)
tenured generation total 189056K, used 111945K [0x03940000, 0x0f1e0000, 0x0f1e0000)
the space 189056K, 59% used [0x03940000, 0x0a6925f8, 0x0a692600, 0x0f1e0000)
compacting perjava.lang.OutOfMemoryErrorm gen total 16896K, used 16726K [0x0f1e0000, 0x10260000, 0x131e0000)
the space 16896K, 98% used [0x0f1e0000, 0x10235830, 0x10235a00, 0x10260000)
} , 2.0571367 secs]

That's an unfortunate interleaving of program output and
JVM output. Looks like the OutOfMemory error was thrown prior
to the GC whose output it was interkeaved into. Can you post the
entire verbose gc log? Do you see the perm gen or the
tenured gen nearly full after a GC? The snippet you posted
does not indicate memory being exhausted.
Which version of the JVM/JDK are you running? Which platform?
Can you check if you have run out of swap space and unable to
expand the Java heap? (That could be a transient condition that
manifests only occasionally because there are lotrs of processes
on your machine, which is running close to the edge of swap.
In that case, you might try running again with only this single program
running -- and sufficient swap.)

Similar Messages

  • A java.lang.OutOfMemoryError exception

    I always get a message below when i'm working with sun creator but when i deploy my application it works fine.
    Is it not going to have any negative effect on the application when it goes life
    A java.lang.OutOfMemoryError exception has occurred.
    Please report this at http://www.netbeans.org/issues.html,
    including a copy of your messages.log file as an attachment.
    The messages.log file is located in your C:\Documents and Settings\ngx1431\.Creator\2_1\var\log folder.

    Try changing :
    <jvm-options>-Xms512m -Xmx512m</jvm-options>
    Java options in the domain.xml file.
    This file is under :
    $CREATOR_HOME/SunAppServer8/domains/$DOMAIN/config/domain.xml
    Also, check this thread
    http://forum.java.sun.com/thread.jspa?threadID=5063632

  • Java.lang.OutOfMemoryError Exception for data more than 20k rows

    Hi There,
    We are evaluating Coherence for our requirements and I am quite impressed with filtering, near cache, etc
    We are running on Windows XP, 3GB RAM, jdk1.6.0_04 and tests are simple – 2 cache instances and one instance of ExtendTcpCacheService sitting between client and distributed cache.
    It just fly’s when inserting/putting about 20k rows/objects in to cache but doesn’t seem to fly for more data.
    eg: with 200k objects/rows, we get the following exception
    java.lang.OutOfMemoryError: requested 4096000 bytes for GrET in C:\BUILD_AREA\jdk6_04\hotspot\src\share\vm\utilities\growableArray.cpp. Out of swap space?
    But, the exception is not consistent. We also get following
    2008-03-20 11:36:23.415 Oracle Coherence GE 3.3.1/389 <D5> (thread=Cluster, member=4): Service Cluster left the cluster
    2008-03-20 11:36:25.009 Oracle Coherence GE 3.3.1/389 <D5> (thread=DistributedCache, member=4): Service DistributedCache left the cluster
    2008-03-20 11:36:25.899 Oracle Coherence GE 3.3.1/389 <D5> (thread=ExtendTcpProxyServiceWorker:1, member=4): Repeating $PutAllRequest for 10000 out of 10000 items due to re-distribution
    2008-03-20 11:36:25.931 Oracle Coherence GE 3.3.1/389 <D5> (thread=ExtendTcpProxyServiceWorker:2, member=4): Repeating $PutAllRequest for 10000 out of 10000 items due to re-distribution
    2008-03-20 11:36:26.024 Oracle Coherence GE 3.3.1/389 <D5> (thread=ExtendTcpProxyServiceWorker:4, member=4): Repeating $PutAllRequest for 10000 out of 10000 items due to re-distribution
    2008-03-20 11:36:26.024 Oracle Coherence GE 3.3.1/389 <D5> (thread=ExtendTcpProxyServiceWorker:0, member=4): Repeating $PutAllRequest for 10000 out of 10000 items due to re-distribution
    2008-03-20 11:36:26.040 Oracle Coherence GE 3.3.1/389 <D5> (thread=ExtendTcpProxyServiceWorker:3, member=4): Repeating $PutAllRequest for 10000 out of 10000 items due to re-distribution
    2008-03-20 11:36:26.899 Oracle Coherence GE 3.3.1/389 <D5> (thread=Proxy:ExtendTcpProxyService, member=4): Stopped: TcpAcceptor
    2008-03-20 11:36:26.899 Oracle Coherence GE 3.3.1/389 <D4> (thread=Proxy:ExtendTcpProxyService, member=4): Exception occured during exiting:
    java.lang.NullPointerException
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.isClusterThread(Service.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service$EventDispatcher.drainOverflow(Service.CDB:7)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.post(Service.CDB:17)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.send(Service.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.ClusterService.doServiceLeft(ClusterService.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.setServiceState(Service.CDB:65)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onExit(Service.CDB:12)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:58)
    at java.lang.Thread.run(Thread.java:619)
    Would appreciate if someone can point me the right direction.
    Regards,
    K

    Hi Gene,
    Thanks for getting back.
    Tried with JDK 1.5 but no joy.
    I am trying to insert 200k POJO's each with 10 memebers/fields and have set 1GB memory. Here are the logs
    08-03-26 15:20:36.644 Oracle Coherence GE 3.3.1/389 <Error> (thread=DistributedCache, member=3): Error sending MapEvent to Channel(Id=1317419375, Connection=0x00000118EBA651F39101EDDBDC0FAA24C838BCE665617F8AC1064ADB4297F30E, Open=true): java.lang.OutOfMemoryError
         at sun.misc.Unsafe.allocateMemory(Native Method)
         at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)
         at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
         at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.instantiateResource(TcpAcceptor.CDB:7)
         at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.acquire(TcpAcceptor.CDB:26)
         at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$ByteBufferPool.allocate(TcpAcceptor.CDB:4)
         at com.tangosol.io.MultiBufferWriteBuffer.advance(MultiBufferWriteBuffer.java:870)
         at com.tangosol.io.MultiBufferWriteBuffer.<init>(MultiBufferWriteBuffer.java:32)
         at com.tangosol.coherence.component.comm.connectionManager.acceptor.TcpAcceptor$TcpConnection.allocateWriteBuffer(TcpAcceptor.CDB:3)
         at com.tangosol.coherence.component.comm.Connection.send(Connection.CDB:16)
         at com.tangosol.coherence.component.comm.Channel.doSend(Channel.CDB:4)
         at com.tangosol.coherence.component.comm.Channel.send(Channel.CDB:38)
         at com.tangosol.coherence.component.net.extend.proxy.MapListenerProxy.onMapEvent(MapListenerProxy.CDB:9)
         at com.tangosol.coherence.component.net.extend.proxy.MapListenerProxy.entryInserted(MapListenerProxy.CDB:1)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.dispatch(DistributedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$ViewMap$ProxyListener.entryInserted(DistributedCache.CDB:1)
         at com.tangosol.util.MapListenerSupport$WrapperSynchronousListener.entryInserted(MapListenerSupport.java:856)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:191)
         at com.tangosol.coherence.component.util.CacheEvent.dispatchSafe(CacheEvent.CDB:14)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$BinaryMap.dispatch(DistributedCache.CDB:86)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onMapEvent(DistributedCache.CDB:31)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache$MapEvent.onReceived(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onMessage(Service.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.Service.onNotify(Service.CDB:123)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:35)
         at java.lang.Thread.run(Thread.java:619)
    # An unexpected error has been detected by Java Runtime Environment:
    # java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?
    # Internal Error (allocation.cpp:120), pid=4052, tid=6048
    # Error: ChunkPool::allocate
    # Java VM: Java HotSpot(TM) Server VM (10.0-b19 mixed mode windows-x86)
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    --------------- T H R E A D ---------------
    Current thread (0x65f21400): JavaThread "CompilerThread1" daemon [_thread_in_native, id=6048, stack(0x662d0000,0x66320000)]
    Stack: [0x662d0000,0x66320000]
    [error occurred during error reporting (printing stack bounds), id 0x80000001]
    Current CompileTask:
    C2:972 ! sun.nio.cs.SingleByteEncoder.encodeArrayLoop(Ljava/nio/CharBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/charset/CoderResult; (475 bytes)
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x66425400 JavaThread "DistributedCache:EventDispatcher" daemon [_thread_blocked, id=6024, stack(0x66b10000,0x66b60000)]
    0x665ca400 JavaThread "TcpAcceptor:TcpProcessor" daemon [_thread_blocked, id=1164, stack(0x66fc0000,0x67010000)]
    0x6656cc00 JavaThread "TcpAcceptor" daemon [_thread_blocked, id=5996, stack(0x66ed0000,0x66f20000)]
    0x666ee800 JavaThread "ExtendTcpProxyServiceWorker:4" daemon [_thread_blocked, id=5056, stack(0x66e80000,0x66ed0000)]
    0x666ee400 JavaThread "ExtendTcpProxyServiceWorker:3" daemon [_thread_blocked, id=3232, stack(0x66e30000,0x66e80000)]
    0x664d1000 JavaThread "ExtendTcpProxyServiceWorker:2" daemon [_thread_blocked, id=1932, stack(0x66de0000,0x66e30000)]
    0x66685000 JavaThread "ExtendTcpProxyServiceWorker:1" daemon [_thread_blocked, id=2496, stack(0x66d90000,0x66de0000)]
    0x6668c400 JavaThread "ExtendTcpProxyServiceWorker:0" daemon [_thread_blocked, id=2256, stack(0x66d40000,0x66d90000)]
    0x66595400 JavaThread "Cluster:EventDispatcher" daemon [_thread_blocked, id=6112, stack(0x66cf0000,0x66d40000)]
    0x66584400 JavaThread "Proxy:ExtendTcpProxyService" daemon [_thread_blocked, id=6132, stack(0x66ca0000,0x66cf0000)]
    0x666f7400 JavaThread "Proxy:ExtendTcpProxyService:EventDispatcher" daemon [_thread_blocked, id=852, stack(0x66c50000,0x66ca0000)]
    0x666fdc00 JavaThread "DistributedCache" daemon [_thread_blocked, id=5380, stack(0x66c00000,0x66c50000)]
    0x663da400 JavaThread "TcpRingListener" daemon [_thread_in_native, id=5576, stack(0x66b60000,0x66bb0000)]
    0x6651d400 JavaThread "Cluster" daemon [_thread_blocked, id=6084, stack(0x66ac0000,0x66b10000)]
    0x66419400 JavaThread "PacketSpeaker" daemon [_thread_blocked, id=4240, stack(0x66a70000,0x66ac0000)]
    0x6651f800 JavaThread "PacketPublisher" daemon [_thread_blocked, id=6088, stack(0x66a20000,0x66a70000)]
    0x6647e800 JavaThread "PacketReceiver" daemon [_thread_blocked, id=6080, stack(0x669d0000,0x66a20000)]
    0x6647e400 JavaThread "PacketListener1" daemon [_thread_in_native, id=6072, stack(0x66980000,0x669d0000)]
    0x6656d800 JavaThread "PacketListenerN" daemon [_thread_blocked, id=6076, stack(0x66930000,0x66980000)]
    0x664da800 JavaThread "Logger@9233091 3.3.1/389" daemon [_thread_blocked, id=4908, stack(0x66880000,0x668d0000)]
    0x65f23c00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5580, stack(0x66320000,0x66370000)]
    =>0x65f21400 JavaThread "CompilerThread1" daemon [_thread_in_native, id=6048, stack(0x662d0000,0x66320000)]
    0x65f1c800 JavaThread "CompilerThread0" daemon [_thread_blocked, id=6040, stack(0x66280000,0x662d0000)]
    0x65f1b400 JavaThread "Attach Listener" daemon [_thread_blocked, id=6004, stack(0x66230000,0x66280000)]
    0x65f1ac00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=6032, stack(0x661e0000,0x66230000)]
    0x65d4cc00 JavaThread "Finalizer" daemon [_thread_blocked, id=6020, stack(0x66190000,0x661e0000)]
    0x65f12800 JavaThread "Reference Handler" daemon [_thread_blocked, id=6036, stack(0x66140000,0x66190000)]
    0x00386000 JavaThread "main" [_thread_blocked, id=5040, stack(0x003a0000,0x003f0000)]
    Other Threads:
    0x65f11000 VMThread [stack: 0x660f0000,0x66140000] [id=5992]
    0x65f25400 WatcherThread [stack: 0x66370000,0x663c0000] [id=5492]
    VM state:at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
    [0x00385790/0x00002724] Safepoint_lock - owner thread: 0x65f11000
    [0x003857f0/0x00002714] Threads_lock - owner thread: 0x65f11000
    [0x00385990/0x000026d4] Heap_lock - owner thread: 0x666fdc00
    Heap
    PSYoungGen total 158464K, used 147632K [0x5af00000, 0x655a0000, 0x655a0000)
    eden space 146496K, 100% used [0x5af00000,0x63e10000,0x63e10000)
    from space 11968K, 9% used [0x63e10000,0x63f2c000,0x649c0000)
    to space 11712K, 0% used [0x64a30000,0x64a30000,0x655a0000)
    PSOldGen total 1365376K, used 1054407K [0x079a0000, 0x5af00000, 0x5af00000)
    object space 1365376K, 77% used [0x079a0000,0x47f51f70,0x5af00000)
    PSPermGen total 16384K, used 10909K [0x039a0000, 0x049a0000, 0x079a0000)
    object space 16384K, 66% used [0x039a0000,0x04447748,0x049a0000)
    Dynamic libraries:

  • Java.lang.OutOfMemoryError: getNewTla  in coherence production cluster!

    Hi guys, we need some urgent help, JVMs in our production coherence cluster would randomly stop due to the outofmemory error, and we cannot find out the root cause.
    1) Version 3.7.1.4, running 4x servers, each with 40x jvm, each jvm set to 2GB heap, for a total of 320GB cluster. Each server also has a extend proxy running with 3GB heap (no issue)
    2) The cluster is configured using WKA by explicitly listing out all the server nodes in the config.
    3) Our data storage is only ~30GB, details below.
    Stats for cache 'CACHE0':
    Number of cache entries: 14761116
    Memory usage (mb): 26722.643
    Average entry size (bytes): 1898
    Stats for cache 'CACHE1':
    Number of cache entries: 46047
    Memory usage (mb): 51.911
    Average entry size (bytes): 1182
    Stats for cache 'CACHE2':
    Number of cache entries: 4
    Memory usage (mb): 0.154
    Average entry size (bytes): 40448
    Stats for cache 'CACHE3':
    Number of cache entries: 69
    Memory usage (mb): 0.705
    Average entry size (bytes): 10707
    Grand total: 26775.413 MB, Number of entries: 14807237
    4) Random jvms storage nodes (not proxy) on each server would just go down with below errors, we cannot reproduce the issue, it just happens at random. Out of 40 jvms on each server about 3-5 went down over the weekend on, the issue happens on all 4 servers.
    ERROR Coherence - 2012-08-11 11:36:51.670/156864.993 Oracle Coherence GE 3.7.1.4 <Error> (thread=Cluster, member=17):
    java.lang.OutOfMemoryError: getNewTla
    at java.util.HashMap.newKeyIterator(HashMap.java:1024)
    at java.util.HashMap$KeySet.iterator(HashMap.java:1062)
    at java.util.HashSet.iterator(HashSet.java:153)
    at sun.nio.ch.SelectorImpl.processDeregisterQueue(SelectorImpl.java:127)
    at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:69)
    at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
    at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
    at com.tangosol.coherence.component.net.TcpRing.select(TcpRing.CDB:11)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.ClusterService.onWait(ClusterService.CDB:6)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:39)
    at java.lang.Thread.run(Thread.java:662)
    ERROR Coherence - 2012-08-11 11:36:51.854/156865.177 Oracle Coherence GE 3.7.1.4 <Error> (thread=PacketListener1, member=17): Stopping cluster due to unhandled exception: java.lang.OutOfMemoryError: java/net/Inet4Address, size 24B
    at java.net.PlainDatagramSocketImpl.receive0(Native Method)
    at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:145)
    at java.net.DatagramSocket.receive(DatagramSocket.java:725)
    at com.tangosol.coherence.component.net.socket.UdpSocket.receive(UdpSocket.CDB:22)
    at com.tangosol.coherence.component.net.UdpPacket.receive(UdpPacket.CDB:1)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.packetProcessor.PacketListener.onNotify(PacketListener.CDB:20)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:662)
    Exception in thread "Main Thread" java.lang.OutOfMemoryError
    5) Initially we thought it was because of a issue with the small default packet speaker size when joinining the nodes since we using WKA. But changing the config did not help:
    <coherence>
    <cluster-config>
    <packet-speaker>
    <volume-threshold>
    <minimum-packets>10000</minimum-packets>
    </volume-threshold>
    </packet-speaker>
    </cluster-config>
    </coherence>
    Out of ideas, any help will be greatly appreciated. Thanks

    i dont think the issue is with the code, i just noticed as soon as i start up all the cache servers, 1 went down already. And noone is accessing the system.
    this is extremely troublesome, i am loading the hprof file to look at the dump per suggestion above, not sure if it will help pinpoint the root cause though.
    cacheserver:1 30578 [Logger@9218328 3.7.1.4] WARN Coherence - 2012-08-13 13:52:14.857/32.262 Oracle Coherence GE 3.7.1.4 <Warning> (thread=PacketPublisher, member=22): Experienced a 1230 ms communication delay (probable remote GC) with Member(Id=1, Timestamp=2012-08-09 16:02:24.413, Address=xxxxxx, MachineId=xxxxx, Location=site:,machine:xxxxx,process:27118,member:xxxxxx:cacheserver:1, Role=CoherenceServer); 25 packets rescheduled, PauseRate=0.042, Threshold=875
    Exception in thread "Main Thread" java.lang.OutOfMemoryError
    [WARN ][thread ] dispatchUncaughtException
    Logger: java.lang.OutOfMemoryError
    java.lang.OutOfMemoryError
    Exception in thread "PacketListener1" java.lang.OutOfMemoryError
    [WARN ][thread ] dispatchUncaughtException
    [WARN ][thread ] dispatchUncaughtException
    java.lang.OutOfMemoryError: getNewTla
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:983)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:976)
    at java.lang.Thread.dispatchUncaughtException(Thread.java:1874)
    java/lang/OutOfMemoryError: getNewTla
    --- End of stack trace
    java/lang/OutOfMemoryError: getNewTla
    --- End of stack trace
    Exception in thread "Logger@9218328 3.7.1.4" java.lang.OutOfMemoryError
    Exception in thread "PacketListener1P" java.lang.OutOfMemoryError

  • Java.lang.outofmemory exception

    Hello,
    I have an application, that writes several thousands of records into a file and transfers the same to the server. I am encountering an exception "java.lang.OutOfMemoryError" exception.
    I had checked this forum earlier and found a solution that recommended an increase in the memory slot allocated to the JVM. Despite, an increase in this slot from 256MB (eclipse's default) to 1024 MB, my problem still persists. I had updated the eclipse.ini field from "-vmargs -Xms40m -Xmx256m" to "-vmargs -Xms40m -Xmx1024m". Is there anything else that I need to do, to take care of this problem? I am using green threads in the application, does this have anything to do with the above mentioned exception?
    Thanks!

    I am using
    green threads in the application, does this have
    anything to do with the above mentioned exception?It wouldn't be hard to find out. Create a new java class where the main method does the same work; writing several thousands of records into a file and transferring it to the server.
    Maybe it's all the other variables you have in your application that are cutting into the memory. But can you really reduce them?
    Are you loading all thousands of records to memory (I'd imagine in a hashmap or a list) all at once? Like said, do this in smaller chunks, store the records in memory just one at a time and see if that works. It will be slow but it won't run out of memory. Then increase your "batch size" until you find the optimum.

  • Java.lang.OutOfMemoryError + java.lang.VerifyError

    Hi all,
    We are working on an ADF 11g application where several transient attributes are feeded by Groovy expressions. Once deployed on a standalone WLS, we're getting java.lang.VerifyError and java.lang.OutOfMemoryError exceptions.
    Need some help with JVM tuning on Weblogic Server: SUSE Linux Enterprise Server 11 (x86_64) with 4GB RAM
    Here are the current JVM arguments for the managed server:
    -Xms256m -Xmx512m -XX:MaxPermSize=512m ...
    Has anybody ever seen this before? Any help will be appreciated.
    Version
    ADF Business Components 11.1.1.56.60
    Java(TM) Platform 1.6.0_18
    Oracle IDE 11.1.1.3.37.56.60
    [2010-12-10T11:10:42.614+01:00] [mserver1] [ERROR] [] [oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000InFkhRAFGBO5yjw0yW1CxDpG0006Zk,0] [APP: Adoapp#20101210_9515_9510] [dcid: 7e59a3b02e4976f0:7c638206:12c9c80c29a:-8000-0000000000007c4e] Server Exception during PPR, #1[[
    javax.servlet.ServletException: java.lang.OutOfMemoryError
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    Caused by: java.lang.OutOfMemoryError
         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
         at bc4j.com_ado_model_mng_queries_BudgetView_ImpAn1Sum.gs.run(bc4j.com_ado_model_mng_queries_BudgetView_ImpAn1Sum.gs.groovy:1)
         at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:816)
         at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:867)
         at oracle.jbo.ExprEval.evaluateForRow(ExprEval.java:761)
         at oracle.jbo.server.AttributeDefImpl.evaluateTransientExpression(AttributeDefImpl.java:2029)
         at oracle.jbo.server.ViewRowStorage.getAttributeInternal(ViewRowStorage.java:1671)
         at oracle.jbo.server.ViewRowImpl.getAttributeValue(ViewRowImpl.java:1831)
         at oracle.jbo.server.ViewRowImpl.getAttributeInternal(ViewRowImpl.java:796)
         at oracle.jbo.server.ViewRowImpl.getAttrInvokeAccessor(ViewRowImpl.java:878)
         at oracle.jbo.server.ViewRowImpl.getAttribute(ViewRowImpl.java:826)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGetAttributeValueFromRow(JUCtrlValueBinding.java:1139)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeFromRow(JUCtrlValueBinding.java:733)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValueInRow(JUCtrlValueBinding.java:2798)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2702)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getInputValue(JUCtrlValueBinding.java:2691)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.getInputValue(FacesCtrlAttrsBinding.java:185)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2273)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:277)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:750)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
         at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
         at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
         at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:184)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         ... 35 more
    [2010-12-10T11:10:49.258+01:00] [mserver1] [ERROR] [] [oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator] [tid: [ACTIVE].ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 0000InFkj3YFGBO5yjw0yW1CxDpG0006Zl,0] [APP: Adoapp#20101210_9515_9510] [dcid: 7e59a3b02e4976f0:7c638206:12c9c80c29a:-8000-0000000000007c4f] Server Exception during PPR, #2[[
    javax.servlet.ServletException: java.lang.VerifyError: (class: org/codehaus/groovy/runtime/ArrayUtil, method: createArray signature: ()[Ljava/lang/Object;) Illegal type in constant pool
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.VerifyError: (class: org/codehaus/groovy/runtime/ArrayUtil, method: createArray signature: ()[Ljava/lang/Object;) Illegal type in constant pool
         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
         at bc4j.run(bc4j.groovy:1)
         at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:816)
         at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:867)
         at oracle.jbo.ExprEval.getCurrentDate(ExprEval.java:542)
         at oracle.jbo.ExprEval$ExprValueSupplierGroovyBinding.getVariable(ExprEval.java:426)
         at groovy.lang.Binding.getProperty(Binding.java:93)
         at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:237)
         at bc4j.bindDataCP.gs.run(bc4j.bindDataCP.gs.groovy:1)
         at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:816)
         at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:867)
         at oracle.jbo.ExprEval.evaluateForRow(ExprEval.java:761)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         ... 35 moreEdited by: Barbara Gelabert on 27-dic-2010 6:21

    Could you give me more detail about that?now I run the main.fx in the eclipse project,the jnlp file existed in the dist directory in the project after run successfully.
    My problem is that the outofMemories ofter proudces when my server push data to client.

  • FB 4.7 AIR 3.6 Flex 4.9 iOS packing - Exception in thread "main" java.lang.OutOfMemoryError'

    I've got an error similar to Isaac_Sunkes' 'FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError',
    but the causes are not related to what he discovered, corrupt image or other files, I'd exclude bad archive contents in my project.
    I'm using Flash Builder 4.7 with Adobe AIR 3.6 set into an Apache Flex 4.9.1 SDK;
    HW system is:
    iMac,    2,7 GHz Intel Core i5,    8 GB 1600 MHz DDR3,    NVIDIA GeForce GT 640M 512 MB,    OS X 10.8.2 (12C3103)
    The Flash project consists in an application with a main SWF file which loads, via ActionScript methods, other SWF in cascade.
    I've formerly compiled and run the application on an iPad 1, IOS 5.0.1 (9A405), but got on the device the error alert:
    "Uncompiled ActionScript
    Your application is attempitng to run
    uncompiled ActionScript, probably
    due to the use of an embedded
    SWF. This is unsupported on iOS.
    See the Adobe Developer
    Connection website for more info."
    Then I changed the FB compiler switches, now are set to:
    -locale en_US
    -swf-version=19
    Please note that without the switch    -swf-version=19     the application is compiled correctly and the IPA is sent to the device
    and I can debug it, but iOS traps secondary SWF files and blocke the app usage, as previously told.
    they work on deploy of small applications,
    but, when I try to build a big IPA file either for an ad-hoc distribution, either for an debug on device, after some minutes long waiting, I get a Java stuck, with this trace:
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:753)
        at java.util.HashMap.put(HashMap.java:385)
        at java.util.HashSet.add(HashSet.java:200)
        at adobe.abc.Algorithms.addUses(Algorithms.java:165)
        at adobe.abc.Algorithms.findUses(Algorithms.java:187)
        at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4731)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
        at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler .java:599)
        at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
    I've tried to change the Java settings on FB's eclipse.ini in MacOS folder,
    -vmargs
    -Xms(various settings up to)1024m
    -Xmx(various settings up to)1024m
    -XX:MaxPermSize=(various settings up to)512m
    -XX:PermSize=(various settings up to)256m
    but results are the same.
    Now settings are back as recommended:
    -vmargs
    -Xms256m
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:PermSize=64m
    I've changed the Flex build.properties
    jvm.args = ${local.d32} -Xms64m -Xmx1024m -ea -Dapple.awt.UIElement=true
    with no results; now I'n get back to the standard:
    jvm.args = ${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true
    and now I truely have no more ideas;
    could anyone give an help?
    many thanks in advance.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • J2ee server Exception in thread Main java.lang.OutOfMemoryError

    hallo
    i need your help
    first my java j2ee and jdk
    j2ee j2sdkee1.3.1
    jdk j2sdk 1.4
    i nedd the server for jms.
    when i started the server with j2ee -verbose
    i get the error message:
    Starting web service at port: 8000
    Exception in thread "Main" java.lang.OutOfMemoryError
    what can i do to get out off this error message and starting the server normal. please help me to solve the problem!!!
    i read in this forum about -Xms und Xmx but this Commands don't go on my system.
    thx for help!!!

    Hi Warren,
    Still I am not clear with your question. But generally this out of memoryspace error can be rectified by changing the properties which comes in the menubar of your command prompt. Then increasing the virtual memory over there. I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

  • Error  in PI mapping "nested exception is: java.lang.OutOfMemoryError "

    Hi Experts ,
    I encounter an error in the PI mapping while calling a Java Mapping (Mercator Map)
    Error Message as ::-
    java.lang.RuntimeException: RemoteException in setMercGeneral: Error occurred in server thread; nested exception is: java.lang.OutOfMemoryError at com.philips.xi.mercator.MercatorCall.execute(MercatorCall.java:90) at
    Could anyone suggest , how we can overcome  this error message
    I have  also tried  to restart the  RMI Server , but that was not not helpful.
    Regards,
    Shweta

    Sweta,
    Is this a java mapping or Graphical, If Java, you should not run into this issue as you dont load the nested XSD`s.
    Also the error message indicates outofMemory in mercator side when posting your Large message.
    java.lang.OutOfMemoryError at com.philips.xi.mercator.MercatorCall.execute(MercatorCall.java:90) at
    Regards
    Ravi Raman
    Edited by: Ravi Raman on Jun 30, 2010 4:26 PM

  • Exception in thread "main" java.lang.OutOfMemoryError( while importing xml)

    I am trying to config application in Sun One Portal server 3.0 SP5 , (Sun Solaris 8)during configuration I was trying to import some xml files however during the process I got the error :
    Exception in thread "main" java.lang.OutOfMemoryError.
    I tried increasing the size of the heap in jvm12.conf to 512 MB and even tried to run the command -Xms512M, but this didn't help.
    Pls respond as asap.
    Sharad gehani

    Hi gimbal2,
    yeah, its streaming the particular data (ie CUSTOMER) from input xml file and generate the txt file.
    I tried like below . But this is also not working. Getting the same error.
    java -Xmx2048m -mx2048m -Xss1024k -Xoss1024m
    Any other possible solution on this?

  • Exception in thread "main" java.lang.OutOfMemoryError(please help me )

    Hi All
    here my java class trying to read a txt file(which is having size of 60MB).and putting each line into a Vector class. problem is ,upto certain number of line it is reading properly and putting into vector..after that it is giving error like Exception in thread "main" java.lang.OutOfMemoryError..what is the problem and how to rectify this one..anybody help me on this.
    actual situation is one txt is there in that 80 lakhs of lines of content is there..java file trying to read each line and put it into vector or stringbuffer and split it into two lines like key=value and put it into hashmap object.then finally iam creating new file(.properties) and writing these hashmap data on it. if you want clearly..please look into below code..
    package test.utf8; import java.io.*; import java.util.*; public class AssetUtils
    //static StringBuffer stringbuffer = new StringBuffer();
    public AssetUtils()
    public static void main(String args[]) throws IOException
    BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(new FileInputStream("D:\\list.txt")));
    Vector vector = new Vector(0x30D40, 50000);
    System.out.println(vector.capacity());
    Object obj = null;
    int n=0;
    System.out.println("Reading list:" + new Date(System.currentTimeMillis()));
    do
    String s = bufferedreader.readLine();
    //System.out.println("line no: "+ ++n);
    if(s == null)
    break;
    vector.add(s);
    } while(true);
    System.out.println("List Read complete:" + new Date(System.currentTimeMillis()));
    String s1 = args[0];
    System.out.println("S1: "+s1);
    System.out.println(vector.capacity());
    HashMap hashmap = new HashMap();
    System.out.println( "Vector.Size..>>>>>>>>>>>>>>>>.."+vector.size());
    for(int i = 0; i < vector.size(); i++)
    System.out.println("i value:"+i);
    String s2 = (String)vector.get(i);
    //System.out.println("S2: "+s2);
    if(s2.indexOf("/") != -1)
    String s3 = s2.substring(s1.length(), s2.length());
    //System.out.println("S3: "+s3);
    if(s3.indexOf("/") != -1) {
    String s4 = s3.substring(0, s3.lastIndexOf("/"));
    //System.out.println("S4: "+s4);
    String s6 = s3.substring(s3.lastIndexOf("/") + 1, s3.length());
    //System.out.println("S6: "+s6);
    StringBuffer stringbuffer=null;
    stringbuffer = new StringBuffer();
    String s8 = (String)hashmap.get(s4);
    //System.out.println("S8: "+s8);
    if(s8 != null) stringbuffer.append(s8 + "," + s6);
    else
    stringbuffer.append(s6);
    hashmap.put(s4, stringbuffer.toString());
    //stringbuffer.delete(0,stringbuffer.length());
    stringbuffer=null;
    System.out.println("Opening asset.properties:" + new Date(System.currentTimeMillis()));
    File file = new File("D:\\asset.properties");
    PrintWriter printwriter = new PrintWriter(new FileOutputStream(file));
    String s5;
    String s7;
    for(Iterator iterator = hashmap.keySet().iterator(); iterator.hasNext(); printwriter.println(s5 + "=" + s7))
    { s5 = (String)iterator.next(); s7 = (String)hashmap.get(s5); } printwriter.close();
    System.out.println("Closing asset.properties:" + new Date(System.currentTimeMillis()));

    Theres a number of ways you can improve your memory usage:
    1) Build you map as you read in your file.
    2) Use StringBuffers in your map - do not use "asshaj" + "ashaskj" This is very memory intensive
    If you still run out of memory try running the JVM using -Xms128m -Xmx512m or higher

  • FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError"

    I have been having issues with FlashBuilder 4.7 and packaging my Flex Mobile application for iOS (simulator, or for install on device).
    The funny thing is it used to work just fine before a OSX system update.
    My machine is Macbook Pro, 2.66 GHz i7, Mac OSX Lion 10.7.5, 8GB
    When I run application to install on device I get the error...
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
              at com.adobe.png.PNGReader.readChunk(PNGReader.java:60)
              at com.adobe.png.PNGUtils.updatePNGMetadata(PNGUtils.java:56)
              at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:700)
              at com.adobe.air.ADTOutputStream.addFileFromStream(ADTOutputStream.java:307)
              at com.adobe.air.ADTOutputStream.addFileFromStream(ADTOutputStream.java:300)
              at com.adobe.air.ipa.IPAOutputStream.addSpecialIcon(IPAOutputStream.java:272)
              at com.adobe.air.ipa.IPAOutputStream.addFile(IPAOutputStream.java:256)
              at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:72)
              at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:245)
              at com.adobe.air.ADT.parseArgsAndGo(ADT.java:571)
              at com.adobe.air.ADT.run(ADT.java:419)
              at com.adobe.air.ADT.main(ADT.java:469)
    I have tried uninstalling/ reinstalling Flash Builder 4.7 multiple times
    I get this error no matter which AIR SDK I am using, 3.1, 3.4, 3.5, 3.6.
    I get this error with a blank fresh project.
    Please anyone, can you help me solve this.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • Exception java.lang.OutOfMemoryError

    Hi ;
    Recently my netweaver 7.0 always restart its j2ee engine , i check the log
    it have a exception
    Exception java.lang.OutOfMemoryError: requested 131072000 bytes for GrET* in /export/jdk142-update/ws/fcs/hotspot/src/share/vm/utilities/growableArray.cpp. Out of swap space?
    no this file on my system!!!
    and then the Java VM crashes ,
    I have read the sap note 943602 mentioned in its log
    my java - version is
    java version "1.4.2_12"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_12-b03)
    Java HotSpot(TM) Client VM (build 1.4.2_12-b03, mixed mode)
    and
    jstartup/vm/home = <jdk home directory>.
    is in the right directory.
    so , can give me solution to solve this situation???

    Hi ,
    we have 4G memory , 2G swap ,
    my server is only for netweaver development without any application!!!
    below is my dev_server0 log about JVM arguments
    JHVM_LoadJavaVM: VM Arguments of node [server0]
    -> arg[ 9]: -XX:NewSize=171m
    -> arg[ 10]: -XX:MaxNewSize=171m
    -> arg[ 13]: -XX:MaxPermSize=256M
    -> arg[ 14]: -XX:PermSize=256M
    -> arg[ 20]: -Dmemory.manager=2048M
    -> arg[ 21]: -Xmx2048M
    -> arg[ 22]: -Xms1024M

  • Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    i have a huge XML file of size 9 MB. I need to parse it and store it in a MYSQL database. When i execute the program, it throws me out of memory error and only 12668 rows have been inserted into the database. I use SAX parser to parse the XML. i have also given the stack trace of the error below. Kindly let me know how to resolve the issue.
    I have also changed the JAVA_OPTS to -Xms128m -Xmx512m but this didnt solve the issue.
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest$FastInputStream.<init>(Unknown Source)
    at java.util.jar.Manifest.read(Unknown Source)
    at java.util.jar.Manifest.<init>(Unknown Source)
    at java.util.jar.JarFile.getManifestFromReference(Unknown Source)
    at java.util.jar.JarFile.getManifest(Unknown Source)
    at sun.misc.URLClassPath$JarLoader$2.getManifest(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:430)
    at com.mysql.jdbc.PreparedStatement.getInstance(PreparedStatement.java:561)
    at com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1395)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4178)
    at com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4077)
    at DBManager.insertSchedules(DBManager.java:30)
    at EPGParser.startElement(EPGParser.java:71)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)

    Check your code where u set the connection query; there's a procedure in my DBConnection class, looks like this:
         public void setQuery(String query) throws SQLException {          
              this.query = conn.prepareStatement(query);
    Should look the same for u, at least similar.
    I set the query this way: dbConn.setQuery("insert into groups (id, code, sectionID, languageID, year, no_students) values (?,?,?,?,?,?)");
    I had to insert 24,827 records into a table, and it throws the heap space exception u mentioned when it reaches 12,667. So what i did was to put dbConn.setQuery(...) outside the loop, and inside the loop it remains to set the parameters and execute the query from connection. It works for me. Hope will help u save some memory space.

  • Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError:

    hi,
    i have to build similar sql query analizer. i am using jdbc and swing.
    my frame contains jtable and jtree. jtree contains schemas and tables.
    Jtables show mysql table data, when user choose table in Jtree.
    its run first click and second.... But after a few click its doesnt run and i get this Exception:
    Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
    at com.mysql.jdbc.Buffer.getBytes(Buffer.java:198)
    at com.mysql.jdbc.Buffer.readLenByteArray(Buffer.java:318)
    at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1345)
    at com.mysql.jdbc.MysqlIO.readSingleRowSet(MysqlIO.java:2330)
    at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:427)
    at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:2035)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1421)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1772)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2430)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:2359)
    at com.mysql.jdbc.Statement.executeQuery(Statement.java:1227)
    at Database.getQueryRs(Database.java:50)
    at Database.getColumnNames(Database.java:30)
    at NewJFrame.tableDegis(NewJFrame.java:221)
    at NewJFrame.jTree1ValueChanged(NewJFrame.java:196)
    at NewJFrame.access$000(NewJFrame.java:21)
    at NewJFrame$1.valueChanged(NewJFrame.java:93)
    at javax.swing.JTree.fireValueChanged(JTree.java:2825)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3196)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
    at javax.swing.JTree.setSelectionPath(JTree.java:1600)
    at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2410)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3619)
    at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3558)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:262)
    at java.awt.Component.processMouseEvent(Component.java:6035)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt) {                                   
            try{
                DefaultMutableTreeNode node = (DefaultMutableTreeNode)
                                jTree1.getLastSelectedPathComponent();
                if (node == null) return;
                if (node.isLeaf()) {
                    if(node.getLevel() > 1){
                        System.out.println(node.getParent());
                        tableDegis(node.getParent().toString(),node.toString());
                } else {
            }catch(Exception e){
    private void tableDegis(String schema,String table){
             DefaultTableModel tablemodel = new DefaultTableModel();
             tablemodel.setDataVector(db.getData(schema,table),db.getColumnNames(schema,table));
             jTable1.setModel(tablemodel);
             System.out.println(db.getColumnNames(schema,table));
             System.gc();
    public Vector getColumnNames(String schemaName,String tableName){
              Vector<String> columnNames = new Vector<String>();
              try{
                   ResultSet rs = getQueryRs(schemaName,tableName);
                 ResultSetMetaData md = rs.getMetaData();
                   int columns = md.getColumnCount();
                 for (int i = 1; i <= columns; i++)             {
                     columnNames.addElement( md.getColumnName(i) );
              }catch(Exception e){}
              System.gc();
              return columnNames;
    public ResultSet getQueryRs(String schemaName,String tableName){
              ResultSet rs = null;
              try{
                   String sql = "Select * from "+tableName;
                            connection.setCatalog(schemaName);
                            Statement stmt3 = connection.createStatement();
                            rs = stmt3.executeQuery( sql );
              }catch(Exception e){
              System.gc();
              return rs;
    public Vector getData(String schemaName,String tableName){
            Vector<Vector<Object>> data = new Vector<Vector<Object>>();
              try{   
                        ResultSet rs = getQueryRs(schemaName,tableName);
                        ResultSetMetaData md = rs.getMetaData();
                        int columns = md.getColumnCount();
                        while (rs.next()){
                      Vector<Object> row = new Vector<Object>(columns);
                            for (int i = 1; i <= columns; i++){
                                row.addElement( rs.getObject(i) );
                            data.addElement( row );
              }catch(Exception e){}
              System.gc();
              return data;
         }

    lokesh_Kumar_Singh
    Welcome to the forum. Please don't post in old threads that are long dead. When you have a question, please start a topic of your own. Feel free to provide a link to an old thread if relevant.
    I'm locking this thread now. It's more than 1½ years old.
    db

Maybe you are looking for

  • Sending attachments using JAX-RPC

    Hi, can anyone give me an example for sending an attachment using JAX-RPC. I want to create a webservice that will expect an attachment. Also once the client snds the attachment how can i access it in the service? any help will be apreciated. Thanks.

  • Changing keyboard / keycaps on Retina

    Hello, I have a MacBook Pro Retina 15", with French Canadian QWERTY keyboard, and I would like to change it to French AZERTY. Is it possible to remove just the right keycaps or do I need to change the whole keyboard ? Someone told me in an Apple Stor

  • File Naming for Image Sequence to work properly?

    Hi, I shot about a 226 shot time lapse this weekend and so far having a severe pain getting it to be a time lapse movie in photoshop. Shots were 3 minutes apart. Originally I tried using the RAW images, then exported them to full size jpeg, then fina

  • Will i have to pay for an ios 5 download or will it be free?

    i cant wait untill iOS 5 but i dont know wheather i will have to pay for it or not. if so, how much do you think it will cost?

  • COPA Testing

    Hi All, Our company is on a tight schedule before going live.They are in the final phases of testing (UAT) and are in a bit of problem testing or planning to test Assessment Cycles in COPA. They have about 1600 assessment cycles. I have no idea how t