How to solve this ERROR  --java.lang.OutOfMemoryError: Java heap space

I am Trying to read one TEXT file line by line. file size is approx. 7 MB or it contain approx. 35000 line of text.
i am processing that file and export data into another file.
mean while after some line i get error like below,
java.lang.OutOfMemoryError: Java heap space
After this error process stop.
my application is in Java Swing and i m using java 1.5 version of SDK and JRE.
is it a JDK version Problem?
please can any one give me appropriate solutions for this.
give me answer please.............

Are you able to post the code you use to read the file? Initially, I'd guess that you're stuck in a loop. Make sure you're getting out of all your loops. You can do this with breakpoints in your IDE's debugger, or by putting a println right after the loop.
It may also be that your IDE isn't allotted enough of your system's memory, though I doubt that is the case. You can easily google how to increase the memory allotted to the IDE.
For some reason, garbage collection isn't happening as you're expecting. Make sure you're not holding on to huge stuff any longer than you need to.
Edited by: Caryy on Aug 14, 2010 5:57 PM

Similar Messages

  • How to solve this error java.util.MissingResourceException

    Hi Friends,
    I had developed one web dynpro application by using  Internationalization - I18N of WebDynPro (Java)  Application (Blog)   but I got one error that is
    <b>java.util.MissingResourceException: Can't find bundle for base name com.sap.example.language.lang, locale en_US</b> 
    Actually i created two properties file
    1. lang_en.properties
    2. lang_ta.properties
    I stored this two properties file in this package com.sap.example.language
    and this my code in DOInit()
    sessionLocale =  WDClientUser.getCurrentUser().getLocale();
    resourceHandler = ResourceBundle.getBundle("com.sap.example.language.lang",sessionLocale);
         catch (WDUMException e)
         e.printStackTrace();
         wdContext.currentContextElement().setUsername_label(resourceHandler.getString("testview.username"));
         wdContext.currentContextElement().setPassword_label(resourceHandler.getString("testview.password"));
    How to solve this error?
    Guide me.
    Advance Thanks,
    Balaji

    Hi Friends,
    I had developed one web dynpro application by using Internationalization - I18N of WebDynPro -Java Application (Blog) but I got one error that is
    <b>java.util.MissingResourceException: Can't find bundle for base name com.sap.example.language.lang, locale en_US</b>
    Actually i created two properties file
    1. lang_en.properties
    2. lang_ta.properties
    I stored this two properties file in this package com.sap.example.language
    and this my code in DOInit()
    sessionLocale = WDClientUser.getCurrentUser().getLocale();
    resourceHandler = ResourceBundle.getBundle("com.sap.example.language.lang",sessionLocale);
    catch (WDUMException e)
    e.printStackTrace();
    wdContext.currentContextElement().setUsername_label(resourceHandler.getString("testview.username"));
    wdContext.currentContextElement().setPassword_label(resourceHandler.getString("testview.password"));
    How to solve this error?
    Guide me.
    Advance Thanks,
    Balaji

  • How to solve :  java.lang.OutOfMemoryError: Java heap space

    Dear all,
    Am using Jdeveloper 11.1.1.3 with weblogic10...
    I keep getting out of memory error while working on the application , here is the exact error message that i copied from the server log :
    ####<28/11/2010 GMT 09:17:58 ص> <Critical> <Health> <javaserver> <AdminServer> <weblogic.GCMonitor> <<anonymous>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000012> <1290935878582> <BEA-310003> <Free memory in the server is 4,541,416 bytes. There is danger of OutOfMemoryError>
    ####<28/11/2010 GMT 09:24:51 ص> <Error> <Kernel> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029> <1290936291218> <BEA-000802> <ExecuteRequest failed
    java.lang.OutOfMemoryError: Java heap space.
    java.lang.OutOfMemoryError: Java heap space
    >
    ####<28/11/2010 GMT 09:25:04 ص> <Notice> <Diagnostics> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936304406> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'AdminServer' has triggered at 28/11/2010 GMT 09:24:56 ص. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = 28/11/2010 GMT 09:24:51 ص SERVER = AdminServer MESSAGE = ExecuteRequest failed
    java.lang.OutOfMemoryError: Java heap space.
    java.lang.OutOfMemoryError: Java heap space
    SUBSYSTEM = Kernel USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-000802 MACHINE = javaserver TXID = CONTEXTID = 3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000029 TIMESTAMP = 1290936291218
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000
    >
    ####<28/11/2010 GMT 09:25:36 ص> <Warning> <oracle.dfw.framework> <javaserver> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002c> <1290936336549> <DFW-40121> <failure creating incident from WLDF notification
    java.lang.OutOfMemoryError: Java heap space
    >
    ####<28/11/2010 GMT 09:26:32 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936392224> <BEA-000388> <JVM called WLS shutdown hook. The server will force shutdown now>
    ####<28/11/2010 GMT 09:26:35 ص> <Alert> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
    ####<28/11/2010 GMT 09:26:35 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936395303> <BEA-000365> <Server state changed to FORCE_SUSPENDING>
    ####<28/11/2010 GMT 09:26:53 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936413632> <BEA-000365> <Server state changed to ADMIN>
    ####<28/11/2010 GMT 09:26:56 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-1> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936416757> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    ####<28/11/2010 GMT 09:26:59 ص> <Notice> <Server> <javaserver> <AdminServer> <DynamicListenThread[Default[1]]> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-0000000000000035> <1290936419289> <BEA-002607> <Channel "Default[1]" listening on 127.0.0.1:7001 was shutdown.>
    ####<28/11/2010 GMT 09:27:07 ص> <Notice> <WebLogicServer> <javaserver> <AdminServer> <Thread-41> <<WLS Kernel>> <> <3e9ac2aaa3059905:3bfb8868:12c91bef422:-8000-000000000000002f> <1290936427508> <BEA-000378> <Server failed to shutdown within the configured timeout of 30 seconds. The server process will exit now.>
    i searched the net and it seems that i should increase the java heap size , how can i do that... I have a server with 4G Ram ..
    Regards,
    Lama
    Edited by: Delta on Nov 28, 2010 1:36 AM

    My frien google tells me that you use
    >
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    This can have two reasons:
    * Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
    * Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:
    java -Xms<initial heap size> -Xmx<maximum heap size>
    >
    Timo

  • Dbca errors out with java.lang.OutOfMemoryError: Java heap space

    hi gurus
    I am trying to use DBCA to create a 10.2.0.4 database on a HP platform.DBCA hangs at the step 6 and following message can be seen in the
    trace.log:
    java.lang.OutOfMemoryError: Java heap space
    I googled and modified the DBCA scripts content from
    # Run DBCA
    $JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx128m
    -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
    to
    # Run DBCA
    $JRE_DIR/bin/java -Dsun.java2d.font.DisableAlgorithmicStyles=true -DORACLE_HOME=$OH -DDISPLAY=$DISPLAY -DJDBC_PROTOCOL=thin -mx256m
    -classpath $CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS
    and rerun the DBCA and the problem still there.
    How to solve this problem?
    Thanks !
    Edited by: KevinMao on Mar 31, 2010 2:39 AM
    Edited by: KevinMao on Mar 31, 2010 2:42 AM

    hi gurus
    The problem has sovled.I supplyed the wrong file for the rawfile.conf,everything was fine after I provided the corrent one.
    Thanks for your time.

  • Getting java.lang.outofmemoryerror: Java heap space error

    I am using coldfusion 8. I frequently get the error 'java.lang.outofmemoryerror: Java heap space'. Can anyone help me?
    Error Details :
    500
    Root cause:
    java.lang.outofmemoryerror: Java heap space
    javax.servlet.servletException: Root Cause:
    java.lang.outofmemoryerror: Java heap space
    Thanks in advance,
    Regards,
    Satheesh.

    Well... what does the error message tell you is wrong?  You're running out of memory.  I presume you understand how computer memory works, if not specifically how Java memory allocation works.  So... you have x amount of memory, and you're trying to use >x amount of memory.  You can't do that.  There are two approaches to dealing with a problem like this:
    a) have more memory;
    b) use less memory.
    What are your JVM memory settings?  They're in jvm.config dir, which'll be - by default - in your Jrun4/bin dir for a multi-server install, or somewhere like ColdFusion/runtime/bin or something like that on a stand-alone install.
    Next... what are you loading into memory?  This is trickier to answer.  But every variable you create takes up memory.  People often load up the application or session scopes with stuff that's "convenient" to store in shared-scope memory, but really chew through it.  Putting CFC instances in the session scope is a really good way to waste memory, as they seem to have quite a large footprint.
    It's really impossible to say what's eating the memory based on what info you've given us (basically: none), but you can use things like FusionReactor to examine what's going into memory.  Or CF* Enterprise has some of its own memory profiling stuff... I've never used it but it might be of some use.
    Have you googled "coldfusion java.lang.outofmemory"?
    Adam

  • Tomcat Error: "java.lang.OutOfMemoryError: Java heap space"

    Hi,
    We are on BOXI 3.1 SP3. We are using Tomcat as a application server.
    After certain time interval tomcat server hangs and users are unable to login to Infoview. When we checked in catalina.out file, we got error "java.lang.OutOfMemoryError: Java heap space". As a workaround, we restart tomcat server. That time we are unable to stop tomcat server using tomcatshutdown.sh script and we need to kill it forcefully. Once we restart the tomcat server, occupied memory free up and users are able to login to Infoview.
    Below are my observations on this issue:
    1. We have observed that this is not happening only during peak time/heavy load on system, but is happening during weekend as well which shows that it is not related to user load.
    2. Issue occurs intermittently.
    3. Tomcat is unable to release unused memory. It just adds the memory and reaches it's maximum allocated memory.
    I raised SAP case for this and they suggested to add parallet garbage collector parameter. but that did not help.
    Below is heap size setting for Java under /Install Dir/setup/env.sh:
    JAVA_OPTS="$JAVA_OPTS -Xmx1024m -XX:MaxPermSize=256m -XX:+UseParallelGC"
    Below are my environment details:
    Product : BOXI R3.1 SP3
    Linux: Redhat 5.3
    RAM: 10 GB
    Web Application Server : Apache - Tomcat
    I am thinking that somehow tomcat is unable to free up it's occupied memory which is not used by any object further. It just keeps adding memory and reaches its maximum threshold limit which is 1024 MB.
    We have installed SP3 on server last Sunday. Issue was there before SP3 installation as well and it was occuring very rarely. But after SP3 installation, it is occuring on daily basis. Is there any known bug in SP3.
    Any help would be greatlt appericiated.
    Thanks,
    Swapnil Rodge.

    Hi Sebastian,
    Did you use the -Xmx2048m setting for Tomcat? If yes, how did it work for you? When I do the same tomcat refuses to start.
    Thanks,
    Vinayak

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

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

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

  • Report error trace ![CDATA[java.lang.OutOfMemoryError: Java heap space

    Hi,
    I am getting the below error while trying to run any report in workspace
    <?xml version="1.0" encoding="UTF-8"?>
    <BpmResponse action="" type="error">
    <code>0</code>
    <desc>Java heap space</desc>
    <trace><![CDATA[java.lang.OutOfMemoryError: Java heap space
    ]]></trace>
    </BpmResponse>
    Looking for a qucik response!!!
    Thanks
    Ramya

    You are running out of memory. You can change the allocated java heap space for reporting if you haven't tried that already.
    Here is a thread regarding how to change the java heap space. Oracle recommends setting your -xmx to 1024.
    JVM Heap Size setting
    Hope this helps,
    DQ

  • How to solve this error JBoss Server start time............

    How to solve this error JBoss Server start time............
    10:45:38,484 INFO [TomcatDeployer] deploy, ctxPath=/JobWorkInvoice, warUrl=.../deploy/JobWorkInvoice.war/
    10:45:38,640 ERROR [STDERR] log4j:ERROR A "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a "org.apache.log4j.spi.ErrorHandler" variable.
    10:45:38,640 ERROR [STDERR] log4j:ERROR The class "org.apache.log4j.spi.ErrorHandler" was loaded by
    10:45:38,640 ERROR [STDERR] log4j:ERROR [WebappClassLoader
    delegate: false
    repositories:
    /WEB-INF/classes/
    ----------> Parent Classloader:
    java.net.FactoryURLClassLoader@d5f9b9
    ] whereas object of type
    10:45:38,640 ERROR [STDERR] log4j:ERROR "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [org.jboss.system.server.NoAnnotationURLClassLoader@5d173].
    10:45:38,687 ERROR [STDERR] log4j:ERROR Could not create an Appender. Reported error follows.
    10:45:38,687 ERROR [STDERR] java.lang.ClassCastException: org.jboss.logging.appender.DailyRollingFileAppender
    10:45:38,687 ERROR [STDERR]      at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:174)
    10:45:38,687 ERROR [STDERR]      at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:149)
    10:45:38,687 ERROR [STDERR]      at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:162)
    10:45:38,687 ERROR [STDERR]      at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:424)

    The error message suggests that your system is running out of memory. How much memory is available for OC4J on this box?
    You may also see problems like these when any of the following Jar files in your classpath :
    <li>$OH/jlib/repository.jar
    <li>$OH/j2ee/home/jazn.jar
    <li>$OH/j2ee/home/oc4j.jar
    <li>$OH/j2ee/home/jazncore.jar
    <li>$OH/jlib/infratool.jar
    Thanks,
    EJ

  • EJB Deployment error in 9.2 (java.lang.OutOfMemoryError: Java heap space at

    Hello all,
    I am trying to deploy EAR(has more than 25 ejb's) in weblogic 9.2 but currently one EJB ejb-pwc.jar is failing to compile(gives out of memory error). But if i try building ear only with this EJB and its dependencies class it work. Here is the errror. Please help me to figure out this issue. Thanks in advance,
    Exception preparing module: EJBModule(ejb-pwc.jar) Unable to deploy EJB: ejb-pwc.jar from ejb-pwc.jar: There are 1 nested errors: java.io.IOException: Compiler failed executable.exec: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:435) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:295) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:303) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:308) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:496) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:463) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:430) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:752) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:655) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1199) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:621) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:208) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Compiler failed executable.exec: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space

    I'd suggest pre-compiling the application before deployment.
    java weblogic.appc my.ear
    (You may need to increase the heap size here as well.)
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Deployment error in 9.2 (java.lang.OutOfMemoryError: Java heap space at we)

    Hello all,
    I am trying to deploy EAR(has more than 25 ejb's) in weblogic 9.2 but currently one EJB ejb-pwc.jar is failing to compile(gives out of memory error). But if i try building ear only with this EJB and its dependencies class it work. Here is the errror. Please help me to figure out this issue. Thanks in advance,
    Exception preparing module: EJBModule(ejb-pwc.jar) Unable to deploy EJB: ejb-pwc.jar from ejb-pwc.jar: There are 1 nested errors: java.io.IOException: Compiler failed executable.exec: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:435) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:295) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:303) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:308) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:496) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:463) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:430) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:752) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:655) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1199) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:621) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:208) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Compiler failed executable.exec: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: Java heap space

    I'd suggest pre-compiling the application before deployment.
    java weblogic.appc my.ear
    (You may need to increase the heap size here as well.)
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Servlet.service() Error. java.lang.OutOfMemoryError: Java heap space

    Hi All,
    I would be very grateful if you would draw some light for this error I got from running a online database connected image viewer (applet).
    The application is quite simple, applet connect to servlet, servlet send 3 SQL statements to MySQL and retrieve image info (Strings) and 50 Files (- JPEG image) from a online database, and then pass all of data to applet from servlet. The size of total of images is around 3.5 MB, and I've increased JVM memory to 128 MB by using code "-xmx128m".
    ? Do I need send images from servlet to applet individually rather than push them in one go
    ? Is there memory leak in my codes
    Please see the codes below:
    private ExamViewerApplet.CaseInfo[] getCaseInfoArray(int examID, Connection conn) throws SQLException{...}   
    private ExamViewerApplet.ExamInfo getExamInfo(int examID, Connection conn) throws SQLException{...}
    private String processObject(Object object, ObjectOutputStream oos)    {
        Integer examID = (Integer) object;
        Connection conn  = null;    
        ExamViewerApplet.ExamInfo examInfo = null;
        ExamViewerApplet.CaseInfo caseInfoArray[] = null;
        int[][] imageIndexArray = new int[30][5];
        ImageIcon[] imageArray = null;
        try {
            conn = new DBConnection().getConnection();
            examInfo = this.getExamInfo(examID, conn);
            caseInfoArray = this.getCaseInfoArray(examID, conn);
            PreparedStatement ps = conn.prepareStatement(RETRIEVE_IMAGES);
            ps.setInt(1,examID);
            ResultSet rs = ps.executeQuery();
            rs.last();
            int size = rs.getRow();
            rs.beforeFirst();
            imageArray = new ImageIcon[size];
            int imageIndex = 0;
            while(rs.next()){
                int caseID = rs.getInt("CaseID");
                int imageID = rs.getInt("ImageID");
                InputStream stream = null;
                ByteArrayOutputStream output = null;
                try {
                    stream = rs.getBinaryStream("Image");
                    output = new ByteArrayOutputStream();
                    byte buf[] = new byte[1024];
                    int len;
                    while((len = stream.read(buf)) > 0){
                        output.write(buf, 0, len);
                    ImageIcon icon = new ImageIcon(output.toByteArray());
                    imageArray[imageIndex] = icon;
                    imageIndexArray[caseID][0] += 1;
                    imageIndexArray[caseID][imageID] = imageIndex;
                    ++imageIndex;
                } catch (IOException ex) {
                    log("Error, when reading byte array from image input stream from database");
                } finally{
                    try {
                        stream.close();
                        output.close();
                    } catch (IOException ex) {
                        log("Error, when tring to close image input stream from Database");
        } catch (ClassNotFoundException classNotFoundException) {//somecode...
        } catch (SQLException sQLException) {//somecode...
        }finally{
            try {
                conn.close();
            } catch (SQLException ex) {//somecode...
        String result;
        if(examInfo != null && caseInfoArray != null && imageIndexArray != null && imageArray != null ){
            result = "The transaction was successed!";
            try {
                oos.writeObject(examInfo);
                oos.writeObject(caseInfoArray);
                oos.writeObject(imageIndexArray);
                oos.writeObject(imageArray);
            } catch (IOException ex) {
                result = "The transaction was failed!";
        }else{
            result = "The transaction was failed!";
        return result;
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {      
        ObjectInputStream inputStreamFromApplet = null;
        Object object = null;
        try {
            inputStreamFromApplet = new ObjectInputStream(request.getInputStream());
            object = inputStreamFromApplet.readObject();
            ObjectOutputStream oos = new ObjectOutputStream(response.getOutputStream());
            String returnValue = this.processObject(object, oos);           
            oos.writeObject(returnValue);
            oos.flush();
            oos.close();       
        } catch (ClassNotFoundException classNotFoundException) {
            classNotFoundException.printStackTrace();
        } finally{            
            inputStreamFromApplet.close();
    } And the error messages I got here is:
    SEVERE: Servlet.service() for servlet ExamViewerServlet threw exception
    java.lang.OutOfMemoryError: Java heap space
            at javax.swing.ImageIcon.writeObject(ImageIcon.java:411)
            at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:592)
            at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
            at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
            at ExamViewerServlet.processObject(ExamViewerServlet.java:147)
            at ExamViewerServlet.processRequest(ExamViewerServlet.java:176)
            at ExamViewerServlet.doPost(ExamViewerServlet.java:217)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
            at java.lang.Thread.run(Thread.java:595)Please help.
    Linqing
    Edited by: discovery_java on Feb 1, 2010 2:12 PM

    wire the code into a simple unit test, then run a profiler on it to see where the memory is going. You need the help of these kind of tools to track down memory issues, before that it is only guesswork what might be soaking it all up.

  • How to solve this error using OSX Server's bots

    Plz help me.
    My remote repository is SVN version controll system.
    when I started integration using bot in OSX Server. this error was pisplayed on a log.
    how to solve this error to integrate my project using OSX Server.
    Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:466 77537310 +61ms] Will NOT send email notifications because notifyCommitterOnFailure is NO Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:470 77537310 +0ms] Posting email notification for bot run with type com.apple.notifications.BotFailed Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:471 77537310 +0ms] Sending email to committers = (null) Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:1033 77537310 +0ms] Posting notification of type com.apple.notifications.BotFailed Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:199 77537310 +0ms] Posting notification for bot run GUID f87f0098-f8ca-4bfa-945e-cbb11a2f6abb of type com.apple.notifications.BotFailed Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{AuthService.enterMagicalAuthRealm()} Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +45ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCBotService.postNotificationForBotGUID:andRunGUID:andNotificati onType:additionalEmails:(c6189ca0-0649-0649-c01e-81c4d0b52dd9,f87f0098-f8ca-4bfa -945e-cbb11a2f6abb,com.apple.notifications.BotFailed,( ))} Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:601 77537310 +84ms] Deleting work queue item: cf7fe6b8-4df8-b723-4794-50fbf27955ed Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCWorkQueueService.deleteWorkQueueItemWithGUID:(cf7fe6b8-4df8-b7 23-4794-50fbf27955ed)} Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildBundle.m:929 77537310 +13ms] Marking build bundle complete with status failed and sub-status internal-checkout-error Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{AuthService.enterMagicalAuthRealm()} Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:97 77537310 +55ms] Updating bot run with GUID f87f0098-f8ca-4bfa-945e-cbb11a2f6abb Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:102 77537310 +0ms] Updating bot run (f87f0098-f8ca-4bfa-945e-cbb11a2f6abb): { guid = "f87f0098-f8ca-4bfa-945e-cbb11a2f6abb"; status = failed; subStatus = "internal-checkout-error"; } Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCBotService.updateBotRun:({ guid = "f87f0098-f8ca-4bfa-945e-cbb11a2f6abb"; status = failed; subStatus = "internal-checkout-error"; })} Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:108 77537310 +121ms] Updating bot with GUID c6189ca0-0649-0649-c01e-81c4d0b52dd9 Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:117 77537310 +0ms] Updating bot with latest bot run GUID key Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Debug>: [XCSBuildHelper.m:124 77537310 +0ms] Updating bot (c6189ca0-0649-0649-c01e-81c4d0b52dd9): { guid = "c6189ca0-0649-0649-c01e-81c4d0b52dd9"; latestFailedBotRunGUID = "f87f0098-f8ca-4bfa-945e-cbb11a2f6abb"; latestRunStatus = failed; latestRunSubStatus = "internal-checkout-error"; } Apr  3 16:56:42 server.mbkwon.com xcsbuildd[20259] <Info>: [CSRemoteServiceClient.m:151 77537310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCBotService.updateBot:({ guid = "c6189ca0-0649-0649-c01e-81c4d0b52dd9"; latestFailedBotRunGUID = "f87f0098-f8ca-4bfa-945e-cbb11a2f6abb"; latestRunStatus = failed; latestRunSubStatus = "internal-checkout-error"; })}

    Hello,
    You need to make sure both names match exactly

  • BPEL 10.1.3.x deployment error: java.lang.OutOfMemoryError: Java heap spac

    I am using IBPELDomainHandle.deploySuitcase() API to deploy a bpel process. Each time, I got ServerException with the following error message: java.lang.OutOfMemoryError: Java heap spac
    What configurations should I perform to the BPEL server in order to get rid of the outofmemeory error?
    BTW: I was able to deploy the same bpel process by uploading the jar file to $OH/bpel/domains/default/deploy directory.
    Thanks,
    Qian

    Hi Qian,
    Check the -Xmx JVM setting in the OC4J_BPEL configuration. Raise the amount of MB to allow JVM to use more memory.
    Regards,
    René

  • Ajax submit failed: error = 403, forbidden----how can solve this error

    Ajax submit failed: error = 403, Forbidden--how can solve this error to create a new eprintcenter account

    I am having the SAME problem.  This is so frustrating.   If i try to log on with teh user account I already have, I get the above message.  If i try to create a new accoutn it says the account is already existing.  If i click on forgot password, nnothing happens.  HELP!  I am stuck in a loop!!

Maybe you are looking for