Java memory error

Upon starting weblogic get error: AIX RS/6000 5.o WebLogic 6.1 sp2 -
Unable to initialize the server:'Fatal initialization exception Throwable: java.lang.OutOfMemoryError: ZIP004:OutOfMemoryError, MEM_ERROR in inflateInit2

Jose Quidachay <[email protected]> wrote:
java.lang.OutOfMemoryError: ZIP004:OutOfMemoryError, MEM_ERROR in inflateInit2This looks like zip deflating occurs (probably a jar file of some sort), then
the heap is exhausted during execution, and the JVM reports java.lang.OutOfMemory.
What are your JVM options? For example, -Xms and -Xmx. I believe under IBM's
1.3.1 JVM on AIX, you're limited to a maximum possible Java heap size of 2.5 GB
(that's after also setting maxdata to 0x00000000 to free up all 10 consecutive
segments (0x3 -0xC) for mmap( ), per IBM documentation here:
http://www-106.ibm.com/developerworks/eserver/articles/JavaPart2.html
Also, review your swap space on your filesystem (increase if necessary). Hope
this helps!
Brian J. Mitchell
Systems Administrator, TRX
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8BEE2240
Fingerprint: 3A84 A5D6 EE26 BC10 E525 1905 6FF0 0B6F 8BEE 2240

Similar Messages

  • Java Memory error for applprod

    Hi,
    I have strange problem. I am running "Create accounting" program and it errors out with the error message
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    I have sun SPARC servers, with 16GB RAM, 38 GB SWAP WITH 12.1.1 and 11.1.0.7
    So following the note
    Troubleshooting Java[tm]: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. [ID 1260764.1]
    The funny thing is
    when i run the command java -Xmx2048M -version it works fine on root and oraprod. But when i run in applprod it throws the same error
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    I have checked ulimit settings, they are fine
    1) ROOT:
    root@server1 # ulimit -a
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    open files (-n) 256
    pipe size (512 bytes, -p) 10
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 29995
    virtual memory (kbytes, -v) unlimited
    2). ORAPROD:
    bash-3.00$ ulimit -a
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    open files (-n) 256
    pipe size (512 bytes, -p) 10
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 29995
    virtual memory (kbytes, -v) unlimited
    3). APPLPROD
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    open files (-n) 65536
    pipe size (512 bytes, -p) 10
    stack size (kbytes, -s) unlimited
    cpu time (seconds, -t) unlimited
    max user processes (-u) 29995
    virtual memory (kbytes, -v) unlimited
    When i run java the following is the output.
    1). ROOT
    root@server1 # java -Xmx2048M -version
    java version "1.5.0_20"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
    Java HotSpot(TM) Server VM (build 1.5.0_20-b02, mixed mode)
    2).ORAPROD
    bash-3.00$ java -Xmx2048M -version
    java version "1.6.0_05"
    Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
    Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
    3).APPLPROD
    bash-3.00$ id
    uid=101(applprod) gid=100(dba)
    bash-3.00$ java -Xmx2048M -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    If i run java with 1024M it works fine as follows
    bash-3.00$ java -Xmx1024M -version
    java version "1.5.0_20"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_20-b02)
    Java HotSpot(TM) Server VM (build 1.5.0_20-b02, mixed mode)
    bash-3.00$ id
    uid=101(applprod) gid=100(dba)
    bash-3.00$
    Please any help.
    Thanks

    Hi Hussein,
    I created another user test1 of group dba and ran java -Xmx2048M -version. It worked with out error.
    Then i found the only difference between test1 and applprod is ulimit -s set to unlimited in applprod but not set in test1
    I removed ulimit -s unlimited for applprod the executed
    java -Xmx2048M -version
    it worked fine.
    But i guess ulimit -s unlimited is a pre-requisite for running R12 in solaris??
    What shoud i do
    Please suggest.
    What does "echo $ADJRIOPTS" return after sourcing the env file?bash-3.00$ echo $ADJRIOPTS
    -mx512m
    bash-3.00$
    Thanks

  • JDeveloper 10.1.3.3.0 Java Memory errors

    Hello,
    I have been developing an ADF Application that contains a tree component that is used for navigation of a BOM structure. The BOM is not that large only 600 or so records and when I am testing for short intervals I have no problems. When the application is run for extended periods 15-20mins in both the embeded oc4j container and the Application server 10.1.3.4.0, it runs out of memory and in the case of the application server the instance is restarted.
    I have tried to limit records retrieved, increase heap memory to ridiculous sizes (1024MB), configure the AM pooling settings and still this occurs. I guess I have memory leak or something but I tried to use JDeveloper debug functions to isolate and cannot find. Does anyone know how I can make the app release memory and stop restarting the application server? Any tips on how to find memory leaks?
    Any help is greatly appreciated.
    Thanks in advance,
    Peter

    This issue had to do with a known bug in the Java Hotspot sever and updating the version of Java to 1.5.0_17-b04 resolved this issue.

  • Safari 5.0.5 crashes - Java Memory Error

    Last login: Sat Jul 30 09:36:48 on console
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
    Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
    So I am running the latest update for Java, the latest update to the OS 10.6.8
    I go to creativelive.com/live and then "show chat" at the bottom, then then click login and BOOM crash smash. Won't run.
    Fix??

    /Users/jess/Library/Internet Plug-Ins/EvernoteSafariClipperPlugin.webplugin/Contents/MacOS/EvernoteSafariCli pperPlugin
          Go to ~/Library/Internet Plug-Ins. Move these files to the Desktop:
    EvernoteSafariClipperPlugin.webplugin/Contents/MacOS/EvernoteSafariCli pperPlugin
    Relaunch Safari. If it doesn't crash, then check the Evernote site for support.
    http://www.evernote.com/about/download/web_clipper.php
    Note* The ~ (Tilde) character represents your Home folder.

  • Java.lag out of memory error

    my x2 cannot work with the pdf reader i downloaded from nokia store as there is java.lag out of memory error what should i do

    it is common in most s40 phones.....even my C3 does thesame

  • Out of Memory Error in Java Agents running in lotus notes

    I have a java agent running inside lotus notes jvm. It runs fine for some days but after some days start giving out of memory error and terminates.
    I need to restart agent manager in notes to enable java agent running. Is there a way to catch out of memory error so that on its catch i could restart agent manager.
    Regards,
    Saitu

    Dear Peter,
    The agent is written in java and
    I need to know a way to enter catch block of 'OUTOFMEMORYERROR'.
    My whole code is in a try block with two catches, one for outofmemoryerror and another for exception. When outofmemory error occurs control passes to the exception catch and not outofmemoryerror catch.
    Since out of memory is an error and not an exception, is there a way to catch it or run some code when out of memory occurs.
    Regards,
    Saitu

  • Java Out of Memory Error

    Hi,
    I'm running a Java app that's been working perfectly for 12 months. I did the latest Java upgrade from Apple and I now have heap space errors. The result of running Java version is as follows:
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
    Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
    The error listing is below. I'd be grateful for any help in setting memory in the .sh file that I use to launch the app or for other ways to resolve this.
    A search of this forum yielded no assistance on this.
    Regards
    Mike
    error: ************* Exception String *************
    Error (1205): Out of memory.
    : Java heap space
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:192)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    ... 6 more
    --- history item -----
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    error: ************* Exception String *************
    Error (1205): Out of memory.
    : Java heap space
    at com.bluestream.xdocs.local.explorer.mvc.action.folder.AddToFolder.buildBPS(AddToFolder.java:137)
    at com.bluestream.xdocs.local.explorer.mvc.action.folder.AddToFolder.doWork(AddToFolder.java:110)
    at com.bluestream.xdocs.local.explorer.mvc.action.ExpAction.actionPerformed(ExpAction.java:90)
    at com.bluestream.xdocs.local.explorer.util.GuiUtils.performAction(GuiUtils.java:553)
    at com.bluestream.xdocs.local.explorer.mvc.base.EToolBar$ToolBarButton.mouseReleased(EToolBar.java:248)
    at com.bluestream.xdocs.local.explorer.mvc.base.EToolBar$Button.mouseReleased(EToolBar.java:368)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
    at java.awt.Component.processMouseEvent(Component.java:6348)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6113)
    at java.awt.Container.processEvent(Container.java:2085)
    at java.awt.Component.dispatchEventImpl(Component.java:4714)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: Error (1205): Out of memory.
    : Java heap space
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:192)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    ... 6 more
    --- history item -----
    Error (1205): Out of memory.
    : Java heap space
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:192)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    ... 6 more
    --- history item -----
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    error: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    Error (1205): Out of memory.
    : Java heap space
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:192)
    at com.bluestream.xdocs.local.explorer.worker.job.ExpJob.run(ExpJob.java:70)
    at foxtrot.AbstractWorkerThread$2.run(AbstractWorkerThread.java:49)
    at java.security.AccessController.doPrivileged(Native Method)
    at foxtrot.AbstractWorkerThread.runTask(AbstractWorkerThread.java:45)
    at foxtrot.workers.DefaultWorkerThread.run(DefaultWorkerThread.java:153)
    at java.lang.Thread.run(Thread.java:637)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)
    at javax.activation.DataHandler.writeTo(DataHandler.java:294)
    at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:195)
    at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:162)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:153)
    at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
    at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
    at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
    at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
    at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
    at com.sun.xml.ws.client.Stub.process(Stub.java:222)
    at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy46.fixAndImportParts(Unknown Source)
    at com.bluestream.xdocs.local.wsrvclient.impl.LocWSrvResourceMgrImpl.fixAndImportParts(LocWSrvResourceMgrImpl.java:591)
    at com.bluestream.xdocs.local.api.onimpl.LocImportMgrOnImpl.importParts(LocImportMgrOnImpl.java:158)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.doImport(Importer.java:286)
    at com.bluestream.xdocs.local.explorer.worker.job.Importer.runJob(Importer.java:154)
    ... 6 more
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at com.bluestream.xdocs.local.explorer.util.ExpException.showFatalError(ExpException.java:170)
    at com.bluestream.xdocs.local.explorer.util.ExpException.showError(ExpException.java:128)
    at com.bluestream.xdocs.local.explorer.util.ExpException.<init>(ExpException.java:54)
    at com.bluestream.xdocs.local.explorer.mvc.action.folder.AddToFolder.buildBPS(AddToFolder.java:137)
    at com.bluestream.xdocs.local.explorer.mvc.action.folder.AddToFolder.doWork(AddToFolder.java:110)
    at com.bluestream.xdocs.local.explorer.mvc.action.ExpAction.actionPerformed(ExpAction.java:90)
    at com.bluestream.xdocs.local.explorer.util.GuiUtils.performAction(GuiUtils.java:553)
    at com.bluestream.xdocs.local.explorer.mvc.base.EToolBar$ToolBarButton.mouseReleased(EToolBar.java:248)
    at com.bluestream.xdocs.local.explorer.mvc.base.EToolBar$Button.mouseReleased(EToolBar.java:368)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:273)
    at java.awt.Component.processMouseEvent(Component.java:6348)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6113)
    at java.awt.Container.processEvent(Container.java:2085)
    at java.awt.Component.dispatchEventImpl(Component.java:4714)
    at java.awt.Container.dispatchEventImpl(Container.java:2143)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
    at java.awt.Container.dispatchEventImpl(Container.java:2129)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4544)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

    Post Java and other Unix queries to the Unix or developer forums under OS X Technologies. I have the Java Update 2 installed and there have been no errors reported here.

  • How to figure out the size of an object - java out of heap memory error

    Hi all,
    I am using an object that I found in a library that I didn't create so I don't know its internal state or members.
    I created a single one of these objects and I call announce() on this object which just sends a UDP announcement over the channel to notify listeners. However, after a message #124,288 I get a java out of heap memory error.
    I am wondering if this announce() method is causing the state of the object to grow with every call...it seems unlikely but I want to check to see if it's reserving a growing amount of heap memory without ever allowing it to free.
    My question is how can I check how big the object is within my program? I'd like to check, for instance, at every 10,000 messages sent how much memory the object is taking up. Is there a method call for that? Would I have to use some kind of debugger or memory monitor? I would like something easy to use.
    Please let me know, and thanks in advance.
    Julian

    jboolean23 wrote:
    Thanks for the quick reply.
    I say it's unlikely that the methods I call are filling up heap memory because I have one Message object. This one Message has a myMsg String member. Whenever I want to change the message I call myMsg = "anewstringhere". And then I do myMessageObject.announce(); And for that reason i say I only have one Message object. The only thing added to the heap would be the strings that I replace myMsg with. The old references to myMsg are no longer valid and should be garbage collected..
    Unless of course if you are calling intern() on them.
    so here's my train of thought (and this isn't what my actual code looks like):
    myMessageObject.myMsg = "hello" //creates a string on the heap? I assume this is equivalent to saying myMsg = new String("hello")No they are not the same.
    The text literal will be in the intern space. Both code fragments would do that.
    The second example would create a second instance of String(). That second instance would be cleaned when no longer referenced. But the literal will not.
    Is my thought process correct? You are calling a third party library right so mock it (write a simple replacement that does the minimal correct functionality.) Substitute it in your code. And then run. If it still fails then the problem is in your code. If not then it is either in the library or the way that you use the library.

  • Java heap out of memory error with -Xms1g -Xmx4g 64 bit VM

    We are getting Java Heap memory error for the application we are running on linux 64 bit machine (VM).
    The OOM came when heap usage was 1.7gb though we have specified min as 1gb and max as 4gb. If I understand correctly then it should not have been thrown as we have specified max as 4gb. If address space was the problem then it should have thrown swap space error.
    Also, there were no other processes running on this node.
    Below are the specifics of linux node we are using:
    linux kernel: 2.6.18-128.el5
    Linux Version: Red Hat Enterprise Linux Server release 5.3 (Tikanga) 64 Bit
    Ulimts
    [ppoker@aquariusvir11 ~]$ ulimit -a
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 139264
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 100000
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 139264
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited
    Java Version
    [ppoker@aquariusvir11 ~]$ java -version
    java version "1.6.0_21"
    Java(TM) SE Runtime Environment (build 1.6.0_21-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 17.0-b16, mixed mode)
    Kernel Semaophores
    [ppoker@aquariusvir11 ~]$ ipcs -l
    ------ Shared Memory Limits --------
    max number of segments = 4096
    max seg size (kbytes) = 67108864
    max total shared memory (kbytes) = 17179869184
    min seg size (bytes) = 1
    ------ Semaphore Limits --------
    max number of arrays = 128
    max semaphores per array = 250
    max semaphores system wide = 32000
    max ops per semop call = 32
    semaphore max value = 32767
    ------ Messages: Limits --------
    max queues system wide = 16
    max size of message (bytes) = 65536
    default max size of queue (bytes) = 65536
    Please suggest what could be the reason for this error.
    Thanks,
    Ashish

    javaguy4u wrote:
    the OOM error ... wasn't coming when we had set min and max both as 4 GB.You deviously withheld that information.
    When the JVM needs to grow the heap it asks the OS for a bigger memory block than the one it has.
    The OS may refuse this and the JVM will throw an OOME.

  • Out of Memory Error While deploying as EAR file

    Hai,
    I was trying to deploy an EAR file of size 63 MB which inturn containing about 60 EJB.jars. No WARs. application.xml has all the entries for the JARs. While I am deploying it is giving Out of Memory Error. Is there any way to tweak this problem. I am using my own hand written java application which uses the SunONE deployment APIs for deployment. Can u please tell how to tackle this problem. I am running my application through a batch file which uses jdk1.4.
    Please help me regarding this issue.

    You can set the initial heap size and maximum heap size for the JVM, either in the app-server admin console, or maybe in one of your scripts. You look-up the syntax!...
    I had this error yesterday. I too had run out of memory (150Mb). You simply need to allocate more to the app-server.

  • 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

  • Uploading large files from applet to servlet throws out of memory error

    I have a java applet that needs to upload files from a client machine
    to a web server using a servlet. the problem i am having is that in
    the current scheme, files larger than 17-20MB throw an out of memory
    error. is there any way we can get around this problem? i will post
    the client and server side code for reference.
    Client Side Code:
    import java.io.*;
    import java.net.*;
    // this class is a client that enables transfer of files from client
    // to server. This client connects to a servlet running on the server
    // and transmits the file.
    public class fileTransferClient
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    // this method transfers the prescribed file to the server.
    // if the destination directory is "", it transfers the file to
    "d:\\".
    //11-21-02 Changes : This method now has a new parameter that
    references the item
    //that is being transferred in the import list.
    public static String transferFile(String srcFileName, String
    destFileName,
    String destDir, int itemID)
    if (destDir.equals(""))
    destDir = "E:\\FTP\\incoming\\";
    // get the fully qualified filename and the mere filename.
    String fqfn = srcFileName;
    String fname =
    fqfn.substring(fqfn.lastIndexOf(File.separator)+1);
    try
    //importTable importer = jbInit.getImportTable();
    // create the file to be uploaded and a connection to
    servlet.
    File fileToUpload = new File(fqfn);
    long fileSize = fileToUpload.length();
    // get last mod of this file.
    // The last mod is sent to the servlet as a header.
    long lastMod = fileToUpload.lastModified();
    String strLastMod = String.valueOf(lastMod);
    URL serverURL = new URL(webadminApplet.strServletURL);
    URLConnection serverCon = serverURL.openConnection();
    // a bunch of connection setup related things.
    serverCon.setDoInput(true);
    serverCon.setDoOutput(true);
    // Don't use a cached version of URL connection.
    serverCon.setUseCaches (false);
    serverCon.setDefaultUseCaches (false);
    // set headers and their values.
    serverCon.setRequestProperty("Content-Type",
    "application/octet-stream");
    serverCon.setRequestProperty("Content-Length",
    Long.toString(fileToUpload.length()));
    serverCon.setRequestProperty(FILENAME_HEADER, destDir +
    destFileName);
    serverCon.setRequestProperty(FILELASTMOD_HEADER, strLastMod);
    if (webadminApplet.DEBUG) System.out.println("Connection with
    FTP server established");
    // create file stream and write stream to write file data.
    FileInputStream fis = new FileInputStream(fileToUpload);
    OutputStream os = serverCon.getOutputStream();
    try
    // transfer the file in 4K chunks.
    byte[] buffer = new byte[4096];
    long byteCnt = 0;
    //long percent = 0;
    int newPercent = 0;
    int oldPercent = 0;
    while (true)
    int bytes = fis.read(buffer);
    byteCnt += bytes;
    //11-21-02 :
    //If itemID is greater than -1 this is an import file
    transfer
    //otherwise this is a header graphic file transfer.
    if (itemID > -1)
    newPercent = (int) ((double) byteCnt/ (double)
    fileSize * 100.0);
    int diff = newPercent - oldPercent;
    if (newPercent == 0 || diff >= 20)
    oldPercent = newPercent;
    jbInit.getImportTable().displayFileTransferStatus
    (itemID,
    newPercent);
    if (bytes < 0) break;
    os.write(buffer, 0, bytes);
    os.flush();
    if (webadminApplet.DEBUG) System.out.println("No of bytes
    sent: " + byteCnt);
    finally
    // close related streams.
    os.close();
    fis.close();
    if (webadminApplet.DEBUG) System.out.println("File
    Transmission complete");
    // find out what the servlet has got to say in response.
    BufferedReader reader = new BufferedReader(
    new
    InputStreamReader(serverCon.getInputStream()));
    try
    String line;
    while ((line = reader.readLine()) != null)
    if (webadminApplet.DEBUG) System.out.println(line);
    finally
    // close the reader stream from servlet.
    reader.close();
    } // end of the big try block.
    catch (Exception e)
    System.out.println("Exception during file transfer:\n" + e);
    e.printStackTrace();
    return("FTP failed. See Java Console for Errors.");
    } // end of catch block.
    return("File: " + fname + " successfully transferred.");
    } // end of method transferFile().
    } // end of class fileTransferClient
    Server side code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.net.*;
    // This servlet class acts as an FTP server to enable transfer of
    files
    // from client side.
    public class FtpServerServlet extends HttpServlet
    String ftpDir = "D:\\pub\\FTP\\";
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException,
    IOException
    doPost(req, resp);
    public void doPost(HttpServletRequest req, HttpServletResponse
    resp)
    throws ServletException,
    IOException
    // ### for now enable overwrite by default.
    boolean overwrite = true;
    // get the fileName for this transmission.
    String fileName = req.getHeader(FILENAME_HEADER);
    // also get the last mod of this file.
    String strLastMod = req.getHeader(FILELASTMOD_HEADER);
    String message = "Filename: " + fileName + " saved
    successfully.";
    int status = HttpServletResponse.SC_OK;
    System.out.println("fileName from client: " + fileName);
    // if filename is not specified, complain.
    if (fileName == null)
    message = "Filename not specified";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // open the file stream for the file about to be transferred.
    File uploadedFile = new File(fileName);
    // check if file already exists - and overwrite if necessary.
    if (uploadedFile.exists())
    if (overwrite)
    // delete the file.
    uploadedFile.delete();
    // ensure the directory is writable - and a new file may be
    created.
    if (!uploadedFile.createNewFile())
    message = "Unable to create file on server. FTP failed.";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // get the necessary streams for file creation.
    FileOutputStream fos = new FileOutputStream(uploadedFile);
    InputStream is = req.getInputStream();
    try
    // create a buffer. 4K!
    byte[] buffer = new byte[4096];
    // read from input stream and write to file stream.
    int byteCnt = 0;
    while (true)
    int bytes = is.read(buffer);
    if (bytes < 0) break;
    byteCnt += bytes;
    // System.out.println(buffer);
    fos.write(buffer, 0, bytes);
    // flush the stream.
    fos.flush();
    } // end of try block.
    finally
    is.close();
    fos.close();
    // set last mod date for this file.
    uploadedFile.setLastModified((new
    Long(strLastMod)).longValue());
    } // end of finally block.
    } // end - the new file may be created on server.
    } // end - we have a valid filename.
    // set response headers.
    resp.setContentType("text/plain");
    resp.setStatus(status);
    if (status != HttpServletResponse.SC_OK)
    getServletContext().log("ERROR: " + message);
    // get output stream.
    PrintWriter out = resp.getWriter();
    out.println(message);
    } // end of doPost().
    } // end of class FtpServerServlet

    OK - the problem you describe is definitely what's giving you grief.
    The workaround is to use a socket connection and send your own request headers, with the content length filled in. You may have to multi-part mime encode the stream on its way out as well (I'm not about that...).
    You can use the following:
    http://porsche.cis.udel.edu:8080/cis479/lectures/slides-04/slide-02.html
    on your server to get a feel for the format that the request headers need to take.
    - Kevin
    I get the out of Memory Error on the client side. I
    was told that this might be a bug in the URLConnection
    class implementation that basically it wont know the
    content length until all the data has been written to
    the output stream, so it uses an in memory buffer to
    store the data which basically causes memory issues..
    do you think there might be a workaround of any kind..
    or maybe a way that the buffer might be flushed after
    a certain size of file has been uploaded.. ?? do you
    have any ideas?

  • Help with Java Memory Leak in URLConnection

    Hi everyone,
    I can't seem to find the memory leak in the below code, if anyone could help, i would greatly appreciate it. The jist of the code is: I open up a URLConnection to update a ColdFusion page that takes in URL parameters passed in my URL. Then, I get the response. I also check for proxy usage and take that into consideration when making the connection.
    I have one class to handle the Connections, Connect.java:
         * Connection using Username and Password, as well as boolean option to use Basic Proxy Authentication
         public Connect(String pHost, String pPort, String urlString,
                             String pUsername, String pPassword, boolean useProxy) {
              this.pHost = pHost;
              this.pPort = pPort;
              this.urlString = urlString;
              this.pUsername = pUsername;
              this.pPassword = pPassword;
              this.useProxy = useProxy;
         * Get the Input Stream from the Connection given a specific URL
         public java.io.InputStream getInputStream(String urlString) {
              if (urlString == null) urlString = this.urlString;
                 exDialog = new ExceptionDialog(new javax.swing.JFrame());
              try {
                   String auth = "";
                   if (useProxy) {
                        System.getProperties().put("proxySet", "true");
                        System.getProperties().put("proxyHost", pHost);
                        System.getProperties().put("proxyPort", pPort);
                        String authString = "";
                        if (pUsername != null && pUsername != "") authString = pUsername + ":";
                        else authString = "username:";
                        if (pPassword != null && pPassword != "") authString = authString + pPassword;
                        else authString = authString + "password";
                        auth = "Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes());
                   java.net.URL url = new java.net.URL(urlString);
                   java.net.HttpURLConnection conn = (java.net.HttpURLConnection)url.openConnection();
                   if (useProxy) conn.setRequestProperty("Proxy-Authorization", auth);
                   conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)");
                   conn.setDoInput( true );
                   conn.setDoOutput( true );
                   conn.connect();
                   return conn.getInputStream();
              } catch (java.io.IOException ioe) {
                   exDialog.showForThrowable(ioe.toString(),ioe);
                   return null;
         }I call the code in Download.java:
    Connect conn = new Connect(sm.pHost, sm.pPort, null, sm.pUser, sm.pPass, sm.useProxy);
    new BufferedReader(new InputStreamReader(conn.getInputStream(sUpdateURL)));
    in.close();For some reason, as I loop through this call, the memory footprint of my program grows through every iteration, eventually resulting in a Java Out of Memory error. I can't track the leak down and it's fairly frustrating. If anyone can help, that would be greatly appreciated. Thanks!

    One place there might be a memory leak is in the line
    exDialog = new ExceptionDialog(new javax.swing.JFrame());Even though the JFrame object goes out of scope when the ExceptionDialog method returns, JFrames stay around until they are closed, even though in this case it isn't even shown on the screen.

  • JavaScript Out of Memory Error on Portal timeout.

    Hello All,
    I am using jsf and Inline navigation in all our portlets and when user leave the browser idle for portal timeout we have 2 problems. 1: Login portlet shows in that specific portlet. 2: we get a javascript alert saying out of memory at line 40. and the porltet shows error message as "Gateway was not able to access requested content. If the error persists, contact your portal Administrator."
    We are using Plumtree 5.0.4 Java version.
    any help is highly appreciated.
    Thanks
    A.J.

    Both are valid behaviors unfortunately.
    1) login portlet is showing up in specific portlet b/c inline navigation allows for you to create and load pages without affecting the overall portal.
    This happens when you use iframes (which behave in a similar fashion).
    - your only workaround is really to write some javascript function to "listen" to the portal login page getting loaded and then throwing the session into the parent browser (which is Portal). At least this is the only solution that I ever came up with when using Iframes.
    2) Don't know about out of memory error actually, but getting the "gatewy was not able to access requested content" is valid b/c the session died.
    - javascript errors require javascript solutions. Sorry I couldn't be more helpful than that.
    Maybe someone else will have better suggestions.
    The other suggestion is to use your app server to listen to the logout event and redirect appropriately to somewhere else, or have it do what you want it to do in situations as this.

  • Large Pdf using XML XSL - Out of Memory Error

    Hi Friends.
    I am trying to generate a PDF from XML, XSL and FO in java. It works fine if the PDF to be generated is small.
    But if the PDF to be generated is big, then it throws "Out of Memory" error. Can some one please give me some pointers about the possible reasons for this errors. Thanks for your help.
    RM
    Code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.apache.fop.apps.Driver;
    import org.apache.fop.apps.Version;
    import org.apache.fop.apps.XSLTInputHandler;
    import org.apache.fop.messaging.MessageHandler;
    import org.apache.avalon.framework.logger.ConsoleLogger;
    import org.apache.avalon.framework.logger.Logger;
    public class PdfServlet extends HttpServlet {
    public static final String FO_REQUEST_PARAM = "fo";
    public static final String XML_REQUEST_PARAM = "xml";
    public static final String XSL_REQUEST_PARAM = "xsl";
    Logger log = null;
         Com_BUtil myBu = new Com_BUtil();
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException {
    if(log == null) {
         log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
         MessageHandler.setScreenLogger(log);
    try {
    String foParam = request.getParameter(FO_REQUEST_PARAM);
    String xmlParam = myBu.getConfigVal("filePath") +"/"+request.getParameter(XML_REQUEST_PARAM);
    String xslParam = myBu.SERVERROOT + "/jsp/servlet/"+request.getParameter(XSL_REQUEST_PARAM)+".xsl";
         if((xmlParam != null) && (xslParam != null)) {
    XSLTInputHandler input = new XSLTInputHandler(new File(xmlParam), new File(xslParam));
    renderXML(input, response);
    } else {
    PrintWriter out = response.getWriter();
    out.println("<html><head><title>Error</title></head>\n"+
    "<body><h1>PdfServlet Error</h1><h3>No 'fo' "+
    "request param given.</body></html>");
    } catch (ServletException ex) {
    throw ex;
    catch (Exception ex) {
    throw new ServletException(ex);
    public void renderXML(XSLTInputHandler input,
    HttpServletResponse response) throws ServletException {
    try {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    response.setContentType("application/pdf");
    Driver driver = new Driver();
    driver.setLogger(log);
    driver.setRenderer(Driver.RENDER_PDF);
    driver.setOutputStream(out);
    driver.render(input.getParser(), input.getInputSource());
    byte[] content = out.toByteArray();
    response.setContentLength(content.length);
    response.getOutputStream().write(content);
    response.getOutputStream().flush();
    } catch (Exception ex) {
    throw new ServletException(ex);
    * creates a SAX parser, using the value of org.xml.sax.parser
    * defaulting to org.apache.xerces.parsers.SAXParser
    * @return the created SAX parser
    static XMLReader createParser() throws ServletException {
    String parserClassName = System.getProperty("org.xml.sax.parser");
    if (parserClassName == null) {
    parserClassName = "org.apache.xerces.parsers.SAXParser";
    try {
    return (XMLReader) Class.forName(
    parserClassName).newInstance();
    } catch (Exception e) {
    throw new ServletException(e);

    Hi,
    I did try that initially. After executing the command I get this message.
    C:\>java -Xms128M -Xmx256M
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Thanks for your help.
    RM

Maybe you are looking for

  • My ipod touch is not showing up on the source list

    My iPod Touch is not showing up on the source list. I have tried to restore the ipod, i have uninstalled, reinstalled, and used the repair option in the control panel to no avail. I am currently useing the latest version of Windows 8 on an Asus VivoB

  • Mac mini with minidisplayport to vga adapter: display does not sleep

    I have a late 2009 mac mini. When using a mini displayport-vga adapter from Apple, whenever the mini puts the display to sleep the video goes black and my monitor goes into test mode (not sleeping). It's almost like the signal to tell the display to

  • How many iPads, iPods, etc.. Can connect via airport wifi?

    I have a airport wifi?  It is one of the older ones.  Do you know why some devices will find the wifi signal but some will not?  All of the items used to find the wifi signal??

  • [Desktop][Playlists] Please bring back album title

    Hi, I have the Mac client and just noticed that my playlist interface only shows three columns now:  Song, Artist, Date Added Why is album title gone and can you PLEASE bring it back?  I looked through the settings/menus and saw no way to do this mys

  • MOV to FLASH any converter suggestions?

    Looking for a robust (yet easy ) way to convert quicktime files into flash say down to 320X240 with controller (like you tube quality) and EASILY insert them into an iweb page Love sorensen but that is like $700.? any suggestions for a program like t