Large insert and java.lang.OutOfMemoryError

Hello.
I have an application that is trying to insert a large amount of data into the database (could be 200,000 rows). We are getting a java.lang.OutOfMemoryError in the process of doing the insert. The inserts are currently being done by looping over a Vector where each element in the Vector contains an id that is needed to do each insert. Actually, the Vector contains instances of DatabaseRow from a previous query done using "executingSelectingCall()". For each DatabaseRow in the Vector, a row is added to another table in the database:
for(int i=0; i<trackingSelectRes.size(); i++)
DatabaseRow dbRow = (DatabaseRow)trackingSelectRes.get(i);
                              BigDecimal recordId = (BigDecimal)dbRow.get(PREMIUM_PK_IN_TMP_TABLE);
                              trackingUpdateSql.setSQLString("INSERT INTO " + trackingTableName + " (" + PK_IN_TRACKING + ", " + PREMIUM_PK_IN_TRACKING + ", " + BMTID + ", " + RULEID + ", " + TIMESTAMP + ") " + "VALUES" +
                                                                      " ("+ TRACKING_PK_SEQ + ".nextval, " + recordId.longValue() + ", '" + rule.getBmtId().getBmtId() + "', '" + rule.getRuleId() + "', sysdate)");
                              //System.out.println("TRACKING PREMIUM INSERT STATEMENT: " + trackingUpdateSql.getSQLString());
                              session.executeNonSelectingCall(trackingUpdateSql);
My first thought is to do a ReportQuery to get the ids that are needed to do the insert instead of loading all of the rows that contain the ids into memory. But, I'm also thinking that we are taking the incorrect approach to the problem. I looked at TopLink's batch writing, but I don't want to create objects for this data. Does TopLink have another way of doing a mass insert or would it be better to use a stored procedure?
Thanks,
Katie

Thanks for your reply. I have another quick question? Could I get a UnitOfWork and call executeNonSelectingCall() with calls to commitAndResume() at a predetermined interval? Would that allow me to not have to commit every row?
Thanks,
Katie

Similar Messages

  • CSSTokenNotAcceptedException and java.lang.OutOfMemoryError

    Hi
    Our 11.1.1.1 Planning service crashed this morning and I would like to know if anyone can suggest what might have caused it? Here are the details:
    The Planning service hung at approximately 9.15am on 6.9.2011.
    Steps to restore service:
    1) Standard services restart script failed to resolve. Planning service did not stop.
    2) Terminated the Planning.exe process.
    3) Restarted the Planning service in Services.msc.
    Analysis:
    HYS9Planning.exe during outage:
    CPU: 50
    Mem Usage: 1,357,648K
    HYS9Planning.exe after service was restored:
    CPU: 00
    Mem Usage: 221,736K
    The first error in the HYS9Planning-sysout.log occurred sometime after 8.50am:
    Reaquired task list lease: Tue Sep 06 08:50:20 GMT10:00 2011: 1315263020136+
    +[HspCSS:GetTokenFromIdentity] CSSTokenNotAcceptedException+
    Error Code: 11
    com.hyperion.css.CSSTokenNotAcceptedException: 25:1014:Token is not valid.     Error Code: 11
    The above repeated about a dozen times before the below error presented in the log :
    Exception in thread "Thread-86" java.lang.OutOfMemoryError: Java heap space
    Exception in thread "Timer-0" Exception in thread "Thread-6" java.lang.OutOfMemoryError: Java heap space
    Query Failed: SQL_DELETE_EXPIRED_EXTERNAL_ACTIONS:[100]
    java.lang.OutOfMemoryError: Java heap space
    java.lang.OutOfMemoryError: Java heap space
    Error encountered with Database connection, recreating connections.Exception in thread "Thread-76" java.lang.OutOfMemoryError: Java heap space
    +Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "Thread-51" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "RMI TCP Connection(6062)-10.192.64.46" java.lang.OutOfMemoryError: Java heap space+
    +Java heap space+
    +Exception in thread "TP-Processor3" java.lang.OutOfMemoryError: Java heap space+
    +Exception in thread "TP-Processor2" java.lang.OutOfMemoryError: Java heap space+
    +deleteing a HBRServer connection+
    At the time, a Smartview user was experiencing a timeout issue. Could this be a possible cause?
    Your assistance is appreciated.
    Cheers

    It does sound like your web application has fallover because it has hit the maximum java size allowed.
    By default I thought it was set to something like 512mb
    As you are on windows and no doube you are running planning as a service you can increase the max JVM by going into the registry and to
    HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\HyperionPlanning\HyS9Planning
    You will see an option with -Xmx which is possibily set to -Xmx512m
    You can increase that to say -Xmx1024m
    Though on your version and OS planning is probably 32bit so I wouldn't increase it much more than that.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Netbeans profiler and "java.lang.OutOfMemoryError: Java heap space"

    I have a swing application. When I run this program, I get java.lang.OutOfMemoryError: Java heap space periodically.
    I am using the netbeans profiler to figure out how my heap size is increasing and whether or not I have any memory leaks. What I see is that I have lots of int[] getting generated. When I take the snapshot and look at the allocation stack traces, I cannot find the packages in my code at all. I see classes in java.awt.image.*, sun.awt.image.*, javax.swing.*, etc., but nothing referring to the classes I have developed. What could be wrong and how come I do not see anything referring to my code so that I can fix it?

    Take a look here.
    It seems that you may have a similar situation. If you read through, you'll see that the number of surviving generations gives an indication of where to look.

  • PaintComponent()  and jave.lang.OutOfMemoryError problem

    I have a paintComponent() method that in it , I paint the GraphicsContexts with a big BufferedImage
    here is the code:
    void doPaint(){ //do some painting on the buffer
    buffer = new BufferedImage(waveForm.viewPortDim.width,waveForm.viewPortDim.height,
    BufferedImage.TYPE_4BYTE_ABGR_PRE);
    waveForm.xPanel.paintEcgBuffer(buffer);
    public void paintComponent(Graphics g){
    //super.paintComponent(g);//??
    Graphics2D g2 = (Graphics2D)g;
    try{            
    g2.drawImage(buffer,0,0,this);
    }catch(OutOfMemoryError e){
    e.printStackTrace();
    System.out.println("error "+e.getMessage());
    I use doPaint() to do some painting over the buffer but i get jave.lang.OutOfMemoryError when i try to do
    g2.drawImage(buffer,0,0,this);
    Is there a limit on the height or width of the GraphicsContexts?
    The dimension of the bufeer can be about 1400x2800 or 1400x5500.
    What can I do?
    Thank you in advance.
    Yair.

    I don't know the answer to this question, but it may help you out to examine it.
    Is it possible that your graphics card is running out of the memory to display this large image?
    You may want to just display what the screen is displaying, so clip the rest beforehand, which would lead to a smaller buffered image.

  • Jimi and java.lang.OutOfMemoryError

    Hi there,
    Whilst opening several images at once, upon opening the third or fourth Image, we get a outOfMemoryError. Is this a known problem? Are there resolutions?
    With thanks,
    Mark.

    My solution was to change the way the image was loaded:
    Jimi.getImage(fileName, Jimi.ONE_SHOT)
    This seemed to stop the memory leeks.
    - Mark.

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

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

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

  • Java.lang.OutOfMemoryError: allocLargeObjectOrArray error for large payload

    Our is an outbound flow where one FTP adapter picks the files and it calls a requester service, requester service calls the EBS and EBS calls the provider service, and finally file is getting written using the B2B.
    Since last 4/5 days we are getting java.lang.OutOfMemoryError: allocLargeObjectOrArray.
    We are getting this error when large payloads are being used for doing testing.
    As per our understanding, when you have a tree of composite invocations (so A invokes B invokes C invokes D via flowN 100 times), none of the memory is released until they all complete.
    1. Could you please let us know exactly when memory is released?
    2. How to tune/optimize this?
    Our flow is like:
    SyncDisbursePaymentGetFtpAdapter --> CreateDisbursedPaymentEbizReqABCSImp l--> SyncDisbursePaymentRBTTEBS --> SyncDisbursedPaymentJPMC_CHKProvABCSImpl--> AIAB2BInterface --> Oracle B2B
    <Dec 12, 2012 8:17:06 PM EST> <Warning> <RMI> <BEA-080003> <RuntimeException thrown by rmi server: javax.management.remote.rmi.RMIConnecti\
    onImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
    javax.management.RuntimeErrorException: java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 667664.
    javax.management.RuntimeErrorException: java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 667664
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:858)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:869)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:838)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
    at weblogic.management.jmx.mbeanserver.WLSMBeanServerInterceptorBase$16.run(WLSMBeanServerInterceptorBase.java:449)
    Truncated. see log file for complete stacktrace
    Caused By: java.lang.OutOfMemoryError: allocLargeObjectOrArray: [B, size 667664
    at java.util.Arrays.copyOf(Arrays.java:2786)
    at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1847)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1756)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1169)
    Truncated. see log file for complete stacktrace
    Do any one have any idea how to rectify this error as whole UAT environment has become down because of this issue.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Please find the required info:
    1. Operating System--> LINUX
    2. JVM (Sun or JRockit)-->JRockit
    3. Domain info (production mode enabled?, log levels, number of servers in cluster, number of servers in a machine)-->
    a) production mode enabled-->>Production mode is not enabled, we are going to enable it.
    b)Log levels---There are many logs b2b, soa, bpel, integration, which log level do I need to do finest(32).
    c) number of servers in cluster-->2
    d) number of servers in a machine-->1
    3. Payload info (size, xml/non-xml?,)
    a) size-->more than 1 MB, and upto 25 MB
    b)xml/non-xm--> xml
    we are trying to do the changes as suggested by you and will update accordingly.

  • Java.lang.OutOfMemoryError during transfer of large data from SAP to PI

    Hi experts,
    We are trying to transfer large data from SAP to external system via PI but the transfer stucked in sm58 of SAP system with 'error java.lang.OutOfMemoryError'. We have tested before this and we can only get approximately 100K of records to go through successfully. We neeed approximately transfer 300k datas per time. Current setting of max heap size (in mb) of our PI system is 512 at message server and bootstap tab. At servers general tab the max heap size (in mb) is 2048 and its java parameters are having the values below:
    -Xmx1024m
    -Xms1024m
    -Djco.jarm=1
    -XX:PermSize=512m
    -XX:MaxPermSize=512m
    -XX:NewSize=320m
    -XX:MaxNewSize=320m
    What need to be increased to solve the error?
    Thanks.
    Regards,
    Thava

    Hi Thava,
    We can set a limit on the request body message length that can be accepted by the HTTP Provider Service on the Java dispatcher. The system controls this limit by inspecting the Content-Length header of the request or monitoring the chunked request body (in case chunked encoding is applied to the message). If the value of the Content-Length header exceeds the maximum request body length, then the HTTP Provider Service will reject the request with a 413 u201CRequest Entity Too Largeu201D error response. You can limit the length of the request body using the tting MaxRequestContentLength property of the HTTP Provider Service running on the Java dispatcher. By default, the maximum permitted value is 131072 KB (or 128MB).You can configure the MaxRequestContentLength property using the Visual Administrator tool. Proceed as follows:
           1.      Go to the Properties tab of the HTTP Provider Service running on the dispatcher.
           2.      Choose MaxRequestContentLength property and enter a value in the Value field. The length is specified in KB.
           3.      Choose Update to add it to the list of properties.
           4.      To apply these changes, choose  (Save Properties).
    The value of the parameter MaxRequestContentLength has to be set to a high value.
    In short parameters to reset values for ABAP side are
    icm/HTTP/max_request_size_KB
    icm/server_port_ TIMEOUT
    rdisp/max_wprun_time
    zttp/max_memreq_MB
    Parameter to reset values for JAVA side is MaxRequestContentLength.
    You can use following link to know more about ICM parameters
    http://help.sap.com/saphelp_nw04/helpdata/EN/61/f5183a3bef2669e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/EN/25/b0a4f6f2b03a43a727a165a4d6a555/frameset.htm
    regards
    Anupam

  • Java.lang.OutOfMemoryError and PermGen errors

    We are getting outOfMemoryErrors and cannot find the cause. Does anybody know how to solve this? Every day we get OutOfMemory and PermGen errors, and nobody seems to be able to solve them. This is from our logs:
    <2008-11-18 13:45:04,627> <ERROR> <crps.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    javax.ejb.EJBException: java.lang.OutOfMemoryError
         at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:317)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:73)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeDeliveryBean_LocalProxy_4bin6i8.resolveCallback(Unknown Source)
         at com.collaxa.cube.engine.dispatch.message.delivery.ResolveCallbackMessageHandler.handle(ResolveCallbackMessageHandler.java:46)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
         at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
         at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:268)
         at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
         at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
         at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:203)
         at java.util.jar.JarFile.<init>(JarFile.java:132)
         at java.util.jar.JarFile.<init>(JarFile.java:97)
         at oracle.classloader.SharedJar.doOpen(SharedJar.java:208)
         at oracle.classloader.SharedCodeSource.open(SharedCodeSource.java:1136)
         at oracle.classloader.SharedCodeSource.ensureOpen(SharedCodeSource.java:948)
         at oracle.classloader.SharedCodeSource.getResourceBytes(SharedCodeSource.java:967)
         at oracle.classloader.CodeSourceSearchPolicy.findResourceBytes(CodeSourceSearchPolicy.java:57)
         at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1455)
         at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645)
         at oracle.classloader.SearchPolicy$CheckSharedLibraries.getClass(SearchPolicy.java:396)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.sql.DriverManager.getCallerClass(DriverManager.java:442)
         at java.sql.DriverManager.getDrivers(DriverManager.java:336)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:587)
         at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:116)
         at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:75)
         at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
         at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
         at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
         at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
         at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1377)
         at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
         at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
         at oracle.j2ee.connector.ConnectionPoolImpl$FixedWaitPoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1455)
         at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
         at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1575)
         at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1520)
         at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1465)
         at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
         at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
         at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.getConnection(ConnectionFactory.java:336)
         at com.collaxa.cube.engine.data.ConnectionFactory.getConnection(ConnectionFactory.java:140)
         at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.__loadCallback(BaseDeliveryPersistenceAdaptor.java:368)
         at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.loadCallback(BaseDeliveryPersistenceAdaptor.java:247)
         at com.collaxa.cube.engine.data.DeliveryPersistenceMgr.loadCallback(DeliveryPersistenceMgr.java:48)
         at com.collaxa.cube.engine.delivery.DeliveryService.resolveCallback(DeliveryService.java:598)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.resolveCallback(CubeDeliveryBean.java:307)
         at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         ... 28 more
    <2008-11-18 13:45:04,650> <ERROR> <crps.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception java.lang.OutOfMemoryError
    java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:203)
         at java.util.jar.JarFile.<init>(JarFile.java:132)
         at java.util.jar.JarFile.<init>(JarFile.java:97)
         at oracle.classloader.SharedJar.doOpen(SharedJar.java:208)
         at oracle.classloader.SharedCodeSource.open(SharedCodeSource.java:1136)
         at oracle.classloader.SharedCodeSource.ensureOpen(SharedCodeSource.java:948)
         at oracle.classloader.SharedCodeSource.getResourceBytes(SharedCodeSource.java:967)
         at oracle.classloader.CodeSourceSearchPolicy.findResourceBytes(CodeSourceSearchPolicy.java:57)
         at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1455)
         at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645)
         at oracle.classloader.SearchPolicy$CheckSharedLibraries.getClass(SearchPolicy.java:396)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
         at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1050)
         at java.util.ResourceBundle.findBundle(ResourceBundle.java:925)
         at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:762)
         at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
         at com.collaxa.cube.CubeException.getResourceBundle(CubeException.java:142)
         at com.collaxa.cube.engine.dispatch.DispatchException.<clinit>(DispatchException.java:39)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:171)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
         at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
         at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:268)
         at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
         at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
         at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
    <2008-11-18 13:45:07,781> <ERROR> <crps.collaxa.cube.engine.dispatch> <DispatchHelper::handleMessage> failed to handle message
    javax.ejb.EJBException: java.lang.OutOfMemoryError
         at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:317)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:73)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:52)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at CubeDeliveryBean_LocalProxy_4bin6i8.resolveCallback(Unknown Source)
         at com.collaxa.cube.engine.dispatch.message.delivery.ResolveCallbackMessageHandler.handle(ResolveCallbackMessageHandler.java:46)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
         at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
         at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:268)
         at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
         at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
         at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:203)
         at java.util.jar.JarFile.<init>(JarFile.java:132)
         at java.util.jar.JarFile.<init>(JarFile.java:97)
         at oracle.classloader.SharedJar.doOpen(SharedJar.java:208)
         at oracle.classloader.SharedCodeSource.open(SharedCodeSource.java:1136)
         at oracle.classloader.SharedCodeSource.ensureOpen(SharedCodeSource.java:948)
         at oracle.classloader.SharedCodeSource.getResourceBytes(SharedCodeSource.java:967)
         at oracle.classloader.CodeSourceSearchPolicy.findResourceBytes(CodeSourceSearchPolicy.java:57)
         at oracle.classloader.PolicyClassLoader.findLocalClass(PolicyClassLoader.java:1455)
         at oracle.classloader.SearchPolicy$FindLocal.getClass(SearchPolicy.java:167)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.SearchPolicy.loadClass(SearchPolicy.java:645)
         at oracle.classloader.SearchPolicy$CheckSharedLibraries.getClass(SearchPolicy.java:396)
         at oracle.classloader.SearchSequence.getClass(SearchSequence.java:119)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1674)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1635)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1620)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at java.sql.DriverManager.getCallerClass(DriverManager.java:442)
         at java.sql.DriverManager.getDrivers(DriverManager.java:336)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:587)
         at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:116)
         at oracle.oc4j.sql.DriverDataSource.getConnection(DriverDataSource.java:75)
         at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
         at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
         at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
         at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
         at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1377)
         at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
         at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
         at oracle.j2ee.connector.ConnectionPoolImpl$FixedWaitPoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1455)
         at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
         at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1575)
         at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1520)
         at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1465)
         at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
         at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
         at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
         at com.collaxa.cube.engine.data.ConnectionFactory$ConnectionFactoryImpl.getConnection(ConnectionFactory.java:336)
         at com.collaxa.cube.engine.data.ConnectionFactory.getConnection(ConnectionFactory.java:140)
         at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.__loadCallback(BaseDeliveryPersistenceAdaptor.java:368)
         at com.collaxa.cube.engine.adaptors.common.BaseDeliveryPersistenceAdaptor.loadCallback(BaseDeliveryPersistenceAdaptor.java:247)
         at com.collaxa.cube.engine.data.DeliveryPersistenceMgr.loadCallback(DeliveryPersistenceMgr.java:48)
         at com.collaxa.cube.engine.delivery.DeliveryService.resolveCallback(DeliveryService.java:598)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.resolveCallback(CubeDeliveryBean.java:307)
         at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.JAASInterceptor$1.run(JAASInterceptor.java:31)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAs(Subject.java:396)
         at com.evermind.server.ThreadState.runAs(ThreadState.java:648)
         at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         ... 28 more
    <2008-11-18 13:45:07,782> <ERROR> <crps.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception java.lang.NoClassDefFoundError
    java.lang.NoClassDefFoundError
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:171)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         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.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
         at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
         at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:268)
         at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
         at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
         at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)

    Marc Kelderman wrote:
    Make sure you set in heap size correctly.
    I do not know how large the heap size is. But I suggest to increase is.
    Oracle EM -> oc4j_soa -> administrtation -> Server
    set min / max equal to 1GB
    and the -XX:MaxPermSize is 256 M
    Marc
    >Make sure you set in heap size correctly.
    I do not know how large the heap size is. But I suggest to increase is.
    Oracle EM -> oc4j_soa -> administrtation -> Server
    set min / max equal to 1GB
    and the -XX:MaxPermSize is 256 M
    Marc
    Hi Tlwi and Marc,
    Im facing the same error in my environment. This is an Oracle Application Server which hosts a J2EE envionment. The application works fine without any issues, but all of a sudden the following error comes up and stalls the application. I have to restart the conatiner to handle the situation, but this is not the solution.
    Based on my searching it reveals that this error does not mean that the jvm is running out of heap space instead it uses some memory outside the heap to unzip the zip files.
    Can you let me know on the solution that you had applied or what can be done to fix this as i have enough heap space.
    09/03/11 14:58:23.851 APPNAME: Servlet error
    java.lang.OutOfMemoryError
         at java.util.zip.ZipFile.open(Native Method)
         at java.util.zip.ZipFile.<init>(ZipFile.java:203)
         at java.util.jar.JarFile.<init>(JarFile.java:132)
         at java.util.jar.JarFile.<init>(JarFile.java:97)
         at oracle.classloader.SharedJar.doOpen(SharedJar.java:208)
         at oracle.classloader.SharedCodeSource.open(SharedCodeSource.java:1136)
    Thanks,

  • Java.lang.OutOfMemoryError,again and again....

    hi,
    my application run env is following :
    *1)java version "1.6.0_14" & je-3.3.82.jar*
    *2) je run properties:*
              envConfig.setAllowCreate(true);
              envConfig.setConfigParam("je.env.sharedLatches", "false");
              envConfig.setCacheSize(100 * 1024 * 1024);
              dbConfig.setAllowCreate(true);
              dbConfig.setDeferredWrite(true);
              dbConfig.setDuplicateComparator(PageDataComparator.class);
    *3)java -Xms1024m -Xmx1024m*
    *4) num #instances #bytes class name*
    12: 174568 6982720 com.sleepycat.je.tree.LN
    21: 3101 3249848 [Lcom.sleepycat.je.tree.Node;
    117: 3009 553656 com.sleepycat.je.tree.BIN
    176: 3181 203584 com.sleepycat.je.latch.SharedLatch
    196: 3025 96800 com.sleepycat.je.utilint.TinyHashSet
    224: 505 20200 com.sleepycat.je.cleaner.OffsetList$Segment
    229: 92 14720 com.sleepycat.je.tree.IN
    241: 64 10240 com.sleepycat.je.dbi.DatabaseImpl
    250: 159 7632 com.sleepycat.je.latch.LatchStats
    259: 159 6360 com.sleepycat.je.latch.Latch
    261: 64 6144 com.sleepycat.je.tree.Tree
    268: 16 4992 com.sleepycat.je.cleaner.Cleaner
    269: 16 4992 com.sleepycat.je.dbi.EnvironmentImpl
    270: 16 4736 com.sleepycat.je.log.FileManager
    273: 96 4608 com.sleepycat.je.cleaner.DbFileSummary
    280: 16 3968 com.sleepycat.je.evictor.PrivateEvictor
    284: 159 3816 com.sleepycat.je.latch.Latch$JEReentrantLock
    297: 57 3192 com.sleepycat.je.cleaner.FileSummary
    301: 16 3072 com.sleepycat.je.incomp.INCompressor
    305: 52 2912 com.sleepycat.je.tree.Tree$RootChildReference
    306: 52 2912 com.sleepycat.je.recovery.Checkpointer$CheckpointReference
    312: 16 2688 com.sleepycat.je.recovery.RecoveryInfo
    313: 16 2688 com.sleepycat.je.recovery.Checkpointer
    314: 48 2688 com.sleepycat.je.log.LogBuffer
    315: 16 2688 com.sleepycat.je.cleaner.FileProcessor
    317: 64 2560 com.sleepycat.je.cleaner.DbFileSummaryMap
    322: 19 2432 com.sleepycat.je.txn.BasicLocker
    323: 101 2424 com.sleepycat.je.dbi.DatabaseId
    327: 26 2288 com.sleepycat.je.cleaner.TrackedFileSummary
    330: 39 2184 com.sleepycat.je.config.IntConfigParam
    331: 16 2176 com.sleepycat.je.dbi.MemoryBudget
    340: 16 2048 com.sleepycat.je.txn.TxnManager
    341: 25 2000 com.sleepycat.je.tree.FileSummaryLN
    347: 33 1848 com.sleepycat.je.DatabaseConfig
    350: 16 1792 com.sleepycat.je.cleaner.FileSelector
    351: 32 1792 com.sleepycat.je.tree.NameLN
    352: 16 1792 com.sleepycat.je.recovery.CheckpointEnd
    353: 32 1792 com.sleepycat.je.tree.MapLN
    354: 27 1728 com.sleepycat.je.log.LogEntryType
    362: 64 1536 com.sleepycat.je.tree.TreeStats
    364: 38 1520 com.sleepycat.je.config.BooleanConfigParam
    370: 16 1408 com.sleepycat.je.log.SyncedLogManager
    371: 16 1408 com.sleepycat.je.Database
    381: 16 1280 com.sleepycat.je.log.TraceLogHandler
    382: 16 1280 com.sleepycat.je.log.FSyncManager
    383: 16 1280 com.sleepycat.je.log.LogBufferPool
    389: 17 1224 com.sleepycat.je.EnvironmentConfig
    391: 16 1152 com.sleepycat.je.cleaner.UtilizationProfile
    392: 16 1152 com.sleepycat.je.txn.SyncedLockManager
    397: 17 1088 com.sleepycat.je.recovery.Checkpointer$FlushStats
    403: 16 1024 com.sleepycat.je.Environment
    404: 16 1024 com.sleepycat.je.EnvironmentMutableConfig
    405: 16 1024 com.sleepycat.je.dbi.DbTree
    416: 19 912 com.sleepycat.je.log.FileManager$1
    418: 16 896 com.sleepycat.je.RunRecoveryException
    419: 16 896 com.sleepycat.je.cleaner.UtilizationTracker
    420: 16 896 com.sleepycat.je.config.LongConfigParam
    433: 25 800 com.sleepycat.je.cleaner.PackedOffsets
    435: 16 768 com.sleepycat.je.log.FileManager$LogEndFileDescriptor
    436: 16 768 com.sleepycat.je.cleaner.UtilizationProfile$FilesToMigrate
    437: 16 768 com.sleepycat.je.txn.LockImpl
    438: 16 768 com.sleepycat.je.dbi.INList
    441: 15 720 com.sleepycat.je.log.FileHandle
    448: 8 704 com.sleepycat.je.log.entry.LNLogEntry
    450: 17 680 com.sleepycat.je.TransactionConfig
    453: 16 640 com.sleepycat.je.dbi.NodeSequence
    455: 16 640 com.sleepycat.je.log.FSyncManager$FSyncGroup
    457: 16 640 com.sleepycat.je.PreloadConfig
    459: 16 640 com.sleepycat.je.dbi.MemoryBudget$PrivateTotals
    460: 16 640 com.sleepycat.je.log.FileManager$FileCache
    475: 16 512 [Lcom.sleepycat.je.latch.Latch;
    476: 16 512 com.sleepycat.je.utilint.TracerFormatter
    477: 16 512 com.sleepycat.je.txn.LockInfo
    479: 16 512 com.sleepycat.je.dbi.DbConfigManager
    483: 16 512 [Lcom.sleepycat.je.cleaner.FileProcessor;
    489: 19 456 com.sleepycat.je.CursorConfig
    499: 10 400 com.sleepycat.je.log.entry.SingleItemEntry
    504: 16 384 com.sleepycat.je.evictor.Evictor$EvictProfile
    515: 9 360 com.sleepycat.je.cleaner.OffsetList
    530: 5 320 [Lcom.sleepycat.je.txn.LockConflict;
    531: 5 320 [Lcom.sleepycat.je.txn.LockUpgrade;
    536: 2 296 [Lcom.sleepycat.je.log.LogEntryType;
    551: 4 256 com.sleepycat.je.log.entry.INLogEntry
    554: 6 240 com.sleepycat.je.txn.LockAttemptResult
    557: 6 240 com.sleepycat.je.config.ConfigParam
    562: 2 224 com.sleepycat.je.log.entry.NameLNLogEntry
    566: 7 224 com.sleepycat.je.txn.LockType
    572: 5 200 com.sleepycat.je.log.entry.DbOperationType
    578: 2 192 com.sleepycat.je.log.entry.DeletedDupLNLogEntry
    579: 8 192 com.sleepycat.je.txn.LockGrantType
    583: 6 192 com.sleepycat.je.txn.LockUpgrade
    585: 4 192 com.sleepycat.je.log.FileManager$FileMode
    612: 1 144 com.sleepycat.je.dbi.CursorImpl
    628: 4 128 com.sleepycat.je.dbi.CursorImpl$SearchMode
    629: 3 128 [Lcom.sleepycat.je.dbi.DbEnvState;
    632: 3 120 com.sleepycat.je.txn.LockResult
    635: 3 120 com.sleepycat.je.Durability
    636: 3 120 com.sleepycat.je.log.LogEntryType$Replicable
    639: 2 112 com.sleepycat.je.dbi.DatabaseImpl$HaltPreloadException
    656: 3 96 com.sleepycat.je.txn.ThinLockImpl
    657: 3 96 com.sleepycat.je.log.Provisional
    658: 4 96 com.sleepycat.je.OperationStatus
    659: 1 96 com.sleepycat.je.tree.INLogItem
    664: 4 96 com.sleepycat.je.LockMode
    667: 4 96 com.sleepycat.je.dbi.PutMode
    669: 3 96 com.sleepycat.je.CacheMode
    671: 3 96 com.sleepycat.je.Durability$SyncPolicy
    675: 3 96 com.sleepycat.je.Durability$ReplicaAckPolicy
    676: 4 96 com.sleepycat.je.dbi.DbEnvState
    679: 2 96 com.sleepycat.je.DatabaseEntry
    691: 1 80 com.sleepycat.je.log.LogItem
    699: 2 80 com.sleepycat.je.log.entry.BINDeltaLogEntry
    700: 2 80 com.sleepycat.je.log.LogEntryType$Txnal
    701: 2 80 com.sleepycat.je.log.LogEntryType$Marshall
    709: 3 72 com.sleepycat.je.Database$DbState
    717: 3 72 com.sleepycat.je.PreloadStatus
    723: 3 72 com.sleepycat.je.txn.LockConflict
    729: 1 64 com.sleepycat.je.cleaner.LocalUtilizationTracker
    737: 1 64 [Lcom.sleepycat.je.log.entry.DbOperationType;
    740: 2 64 com.sleepycat.je.log.ReplicationContext
    748: 1 64 [[Lcom.sleepycat.je.txn.LockConflict;
    750: 1 64 [[Lcom.sleepycat.je.txn.LockUpgrade;
    758: 1 56 com.sleepycat.je.log.LogEntryHeader
    761: 1 56 com.sleepycat.je.log.DbOpReplicationContext
    767: 1 56 [Lcom.sleepycat.je.log.FileManager$FileMode;
    777: 1 48 [Lcom.sleepycat.je.log.Provisional;
    779: 1 48 com.sleepycat.je.tree.INLogContext
    791: 1 48 com.sleepycat.je.tree.SplitRequiredException
    792: 1 48 com.sleepycat.je.tree.Tree$RelatchRequiredException
    797: 1 48 [Lcom.sleepycat.je.CacheMode;
    806: 1 48 com.sleepycat.je.cleaner.LNInfo
    807: 1 48 com.sleepycat.je.tree.TreeLocation
    809: 1 48 [Lcom.sleepycat.je.Durability$SyncPolicy;
    811: 1 48 com.sleepycat.je.recovery.DirtyINMap
    812: 1 48 [Lcom.sleepycat.je.Durability$ReplicaAckPolicy;
    814: 3 48 com.sleepycat.je.tree.Tree$SearchType
    821: 1 48 [Lcom.sleepycat.je.log.LogEntryType$Replicable;
    823: 1 48 com.sleepycat.je.dbi.RangeRestartException
    832: 1 40 com.sleepycat.je.log.LogContext
    851: 1 40 [Lcom.sleepycat.je.log.LogEntryType$Txnal;
    854: 1 40 [Lcom.sleepycat.je.log.LogEntryType$Marshall;
    864: 1 32 com.sleepycat.je.CheckpointConfig
    877: 1 32 [Lcom.sleepycat.je.cleaner.LNInfo;
    880: 1 32 com.sleepycat.je.tree.SearchResult
    881: 1 32 [Lcom.sleepycat.je.log.LogItem;
    890: 1 32 com.sleepycat.je.dbi.DbEnvPool
    960: 1 24 com.sleepycat.je.tree.Key$DumpType$1
    963: 1 24 com.sleepycat.je.tree.Key$DumpType$2
    964: 1 24 com.sleepycat.je.tree.BINBoundary
    965: 1 24 com.sleepycat.je.tree.Key$DumpType$3
    967: 1 24 com.sleepycat.je.tree.Key$DumpType$4
    *5) Error output*
    [java] Exception in thread "Thread-9" java.lang.OutOfMemoryError: GC overhead limit exceeded
    [java] at com.sleepycat.je.log.LogManager.log(LogManager.java:279)
    [java] at com.sleepycat.je.log.LogManager.log(LogManager.java:268)
    [java] at com.sleepycat.je.log.LogManager.log(LogManager.java:199)
    [java] at com.sleepycat.je.tree.LN.log(LN.java:524)
    [java] at com.sleepycat.je.tree.LN.log(LN.java:373)
    [java] at com.sleepycat.je.cleaner.Cleaner.migrateLN(Cleaner.java:1213)
    [java] at com.sleepycat.je.cleaner.Cleaner.lazyMigrateLNs(Cleaner.java:928)
    [java] at com.sleepycat.je.tree.BIN.beforeLog(BIN.java:1182)
    [java] at com.sleepycat.je.recovery.Checkpointer.logSiblings(Checkpointer.java:1263)
    [java] at com.sleepycat.je.recovery.Checkpointer.flushIN(Checkpointer.java:965)
    [java] at com.sleepycat.je.recovery.Checkpointer.flushIN(Checkpointer.java:1091)
    [java] at com.sleepycat.je.recovery.Checkpointer.flushDirtyNodes(Checkpointer.java:704)
    [java] at com.sleepycat.je.recovery.Checkpointer.syncDatabase(Checkpointer.java:599)
    [java] at com.sleepycat.je.dbi.DatabaseImpl.sync(DatabaseImpl.java:861)
    [java] at com.sleepycat.je.Database.sync(Database.java:428)
    *6.mem.bin --analysis*
    Problem Suspect 1
    16 instances of "com.sleepycat.je.dbi.EnvironmentImpl", loaded by "sun.misc.Launcher$AppClassLoader @ 0x2aaab6882a80" occupy 50,938,584 (51.10%) bytes.
    Problem Suspect 2
    2,359 instances of "com.sleepycat.je.tree.BIN", loaded by "sun.misc.Launcher$AppClassLoader @ 0x2aaab6882a80" occupy 42,783,504 (42.92%) bytes.

    Also perhaps notable: the kind of OOME here -- "GC overhead limit exceeded" -- is one of the OOMEs where the JVM isn't really out of heap memory. Rather, it's just decided it's spending too much time collecting garbage. So there might be an application issue creating garbage as fast as possible.
    A little info about this type of OOME for the parallel and concurrent collectors in J6 are here:
    http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#par_gc.oom
    http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html#cms.oom
    Apparently this time-based check can be disabled (and I think I once saw an option for changing the percentage-of-time threshold without disabling it entirely, but the above links don't mention that option).
    - Gordon @ IA

  • Error "java.lang.OutOfMemoryError" When Returning Large Number of Docs

    In our SES implementation, we have a custom search interface that allows users to search for documents and then add them to a "shopping cart". Users add then to their shopping cart from search results, by adding docs one-by-one or an Add All option. Once they are done "shopping" they create a report.
    Here is the scenario...
    Users are saerching for documents and seeing that on page 1, there is 1 - 10 of about 300 results. They clicked Add All and want all 300 docs added to their cart.
    What we do under the covers is we execute another search and set the docs requested to 200. We get the array of docs, iterate over them and add the keys to a list. We found 200 docs at a time to be a safe number. However, there are still 100 docs that were not added to their cart and users want all 300 added. In other words, when they click Add All, they want to add all docs, 300, 500, 5000, etc.
    I set the "Maximum Number of Results" to 500 and found that I can safely add up to ~ 350 docs at one time. However, going past this point throws the following error:
    [SOAPException: faultCode=SOAP-ENV:Server; msg= [java.lang.OutOfMemoryError]]
         at oracle.search.query.webservice.client.OracleSearchService.makeSOAPCallRPC(OracleSearchService.java:941)
         at oracle.search.query.webservice.client.OracleSearchService.doOracleSearch(OracleSearchService.java:469)
    After this error is thrown, SES was unable to recover and searching would not work anymore, even return 10 docs at a time. We had to restart SES to resolve the issue.
    1. What is throwing this error? Is it the amount of XML being returned?
    2. What is the maximum number of results we can get back at any one time? Is it based on the amount of data being returned or the number of attributes?
    We are running 10.1.8 with plans to upgrade soon.
    Thanks in advance.

    I know it may be hard to throw away all this code, but consider using the jakarta fileupload component.
    I think it would simplify your code down to
    // Create a factory for disk-based file items
    FileItemFactory factory = new DiskFileItemFactory();
    // Create a new file upload handler
    ServletFileUpload upload = new ServletFileUpload(factory);
    // Parse the request
    List /* FileItem */ items = upload.parseRequest(request);
    // Process the uploaded items
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
        FileItem item = (FileItem) iter.next();
        if (item.isFormField()) {
            processFormField(item);
        } else {
            // item is a file.  write it
            File saveFolder = application.getRealPath("/file");          
            File uploadedFile = new File(saveFolder, item.getName());
            item.write(uploadedFile);
    }Most of this code was hijacked from http://jakarta.apache.org/commons/fileupload/using.html
    Check it out. It will solve your memory problem by writing the file to disk temporarily if necessary.
    Cheers,
    evnafets

  • Embedded WLS and JDev 12.1.2: java.lang.OutOfMemoryError: PermGen space

    This problem happens after about 10-15 application restarts during development phase. I have read somewhere that this was a known bug in 11g versions of JDev and its integrated WLS (10.3.5 or 10.3.6?). I have then increased memory parameters in configuration file. The only thing I achieved is that this crash now occurs later then sooner. Still very frustrating. When this happens I have to restart WLS and sometimes kill frozen JDeveloper.
    Any other idea/workaround?
    <Dec 30, 2013 12:37:04 PM CST> <Warning> <HTTP> <BEA-101384> <WLServlet annotation is deprecated, please use servlet 3.0 annotation instead. App:ADFOracleReports@ADFOracleReports-FwkExtensions-context-root, Class:oracle.adfinternal.view.faces.activedata.AdsServlet>
    <Dec 30, 2013 12:37:04 PM CST> <Warning> <HTTP> <BEA-101384> <WLServlet annotation is deprecated, please use servlet 3.0 annotation instead. App:ADFOracleReports@ADFOracleReports-ViewController-context-root, Class:oracle.adfinternal.view.faces.activedata.AdsServlet>
    <Dec 30, 2013 12:37:22 PM CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.trinidadinternal.webapp.TrinidadListenerImpl failed: java.lang.OutOfMemoryError: PermGen space.
    java.lang.OutOfMemoryError: PermGen space
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:385)
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:344)
      Truncated. see log file for complete stacktrace
    >
    <Dec 30, 2013 12:37:33 PM CST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1388428621416" for task "10". Error is: "weblogic.application.ModuleException: java.lang.OutOfMemoryError: PermGen space"
    weblogic.application.ModuleException: java.lang.OutOfMemoryError: PermGen space
      at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      Truncated. see log file for complete stacktrace
    Caused By: java.lang.OutOfMemoryError: PermGen space
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:385)
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:344)
      Truncated. see log file for complete stacktrace
    >
    <Dec 30, 2013 12:37:33 PM CST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application "ADFOracleReports".>
    <Dec 30, 2013 12:37:33 PM CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "ADFOracleReports".>
    <Dec 30, 2013 12:37:33 PM CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException: java.lang.OutOfMemoryError: PermGen space
      at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      Truncated. see log file for complete stacktrace
    Caused By: java.lang.OutOfMemoryError: PermGen space
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:385)
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:344)
      Truncated. see log file for complete stacktrace
    >
    [12:37:53 PM] Cancel requested
    [Application ADFOracleReports stopped and undeployed from IntegratedWebLogicServer]
    <Dec 30, 2013 12:37:53 PM CST> <Error> <Deployer> <BEA-149062> <The task containing ID 10 cannot be canceled, since it has already completed execution.>
    <Dec 30, 2013 12:37:53 PM CST> <Warning> <RMI> <BEA-080003> <A RuntimeException was generated by the RMI server: javax.management.remote.rmi.RMIConnectionImpl.invoke(Ljavax.management.ObjectName;Ljava.lang.String;Ljava.rmi.MarshalledObject;[Ljava.lang.String;Ljavax.security.auth.Subject;)
    javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: [Deployer:149062]The task containing ID 10 cannot be canceled, since it has already completed execution..
    javax.management.RuntimeMBeanException: java.lang.UnsupportedOperationException: [Deployer:149062]The task containing ID 10 cannot be canceled, since it has already completed execution.
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:792)
      at weblogic.management.mbeanservers.domainruntime.internal.FederatedMBeanServerInterceptor.invoke(FederatedMBeanServerInterceptor.java:375)
      Truncated. see log file for complete stacktrace
    Caused By: java.lang.UnsupportedOperationException: [Deployer:149062]The task containing ID 10 cannot be canceled, since it has already completed execution.
      at weblogic.management.deploy.DeploymentTaskRuntime.prepareToCancel(DeploymentTaskRuntime.java:881)
      at weblogic.management.deploy.DeploymentTaskRuntime.cancel(DeploymentTaskRuntime.java:854)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      Truncated. see log file for complete stacktrace
    >

    You can try to change the garbage collector algorithm. Refere to http://bexhuff.com/2012/09/jdeveloper-memory-and-performance
    Timo

  • Serious system error while executing the query: java.lang.OutOfMemoryError

    From ALSB, we are trying to insert records in a table, by calling the ALDSP webservice. It is working fine when the xml (ie., given as input to the ALDSP webservice) is small. But facing the following error when the input xml size is large.
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space
    We do not want to increase the heap size. Is there any other way we can solve this problem?

    In logical dataservice of ALDSP we have created a procedure called createTest, which is used to insert mulitple rows in the table. We have created a webservice for that logical DataService.
    Using the ALSB, we are calling the webservice -> createTest Operation and we are passing xml as input to that createTest function.
    Input xml:
    <ns1:createTest>
    <ns1:createTemps>
    <ns0:createTemp>
         <ns0:field1>1</ns0:field1>
              <ns0:field10>test1</ns0:field10>
    </ns0:createTemp>                
    <ns0:createTemp>
         <ns0:field1>2</ns0:field1>
              <ns0:field10>test2</ns0:field10>
    </ns0:createTemp>
         </ns1:createTemps>     
    </ns1:createTest>
    each ns0:createTemp represent a row that need to be inserted in the table.
    When the number of ns0:createTemp is less ( when the number of rows that need to be inserted is less) then no problem occurs, it is getting inserted properly. But when there are more number of ns0:createTemp then we are getting the following error
    <ALDSP> <BEA-000000> <Product> <Serious system error while executing the query:
    {ld:ABC/Test}createTest:1
    java.lang.OutOfMemoryError: Java heap space

  • Error: java.lang.OutOfMemoryError when uploading CSV files to web server

    Hi experts,
    I have made a JSP page from which clients load csv files to web server. I am using Tomca 4.1 as my web server and JDK 1.3.1_09.
    The system works fine when uploadiing small csv files, but it crashes when uploading large CSV files.
    It gives me the following error:
    java.lang.OutOfMemoryError
         <<no stack trace available>>
    This is the code that I used to load files....
    <%
    String saveFile = "";
    String contentType = request.getContentType();
    if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         byte dataBytes[] = new byte[formDataLength];
         int byteRead = 0;
         int totalBytesRead = 0;
         while (totalBytesRead < formDataLength)
              byteRead = in.read(dataBytes, totalBytesRead, formDataLength);
              totalBytesRead += byteRead;
         String file = new String(dataBytes);
         saveFile = file.substring(file.indexOf("filename=\"") + 10);
         saveFile = saveFile.substring(0, saveFile.indexOf("\n"));
         saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1,saveFile.indexOf("\""));
         int lastIndex = contentType.lastIndexOf("=");
         String boundary = contentType.substring(lastIndex + 1,contentType.length());
         int pos;
         pos = file.indexOf("filename=\"");
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         pos = file.indexOf("\n", pos) + 1;
         int boundaryLocation = file.indexOf(boundary, pos) - 4;
         int startPos = ((file.substring(0, pos)).getBytes()).length;
         int endPos = ((file.substring(0, boundaryLocation)).getBytes()).length;
         String folder = "f:/Program Files/Apache Group/Tomcat 4.1/webapps/broadcast/file/";
         //String folder = "10.28.12.58/bulksms/";
         FileOutputStream fileOut = new FileOutputStream(folder + saveFile);
         //out.print("Saved here: " + saveFile);
         //fileOut.write(dataBytes);
         fileOut.write(dataBytes, startPos, (endPos - startPos));
         fileOut.flush();
         fileOut.close();
         out.println("File loaded successfully");
    //f:/Program Files/Apache Group/Tomcat 4.1/webapps/sms/file/
    %>
    Please can anyone help me solve this problem for me...
    Thanx...
    Deepak

    I know it may be hard to throw away all this code, but consider using the jakarta fileupload component.
    I think it would simplify your code down to
    // Create a factory for disk-based file items
    FileItemFactory factory = new DiskFileItemFactory();
    // Create a new file upload handler
    ServletFileUpload upload = new ServletFileUpload(factory);
    // Parse the request
    List /* FileItem */ items = upload.parseRequest(request);
    // Process the uploaded items
    Iterator iter = items.iterator();
    while (iter.hasNext()) {
        FileItem item = (FileItem) iter.next();
        if (item.isFormField()) {
            processFormField(item);
        } else {
            // item is a file.  write it
            File saveFolder = application.getRealPath("/file");          
            File uploadedFile = new File(saveFolder, item.getName());
            item.write(uploadedFile);
    }Most of this code was hijacked from http://jakarta.apache.org/commons/fileupload/using.html
    Check it out. It will solve your memory problem by writing the file to disk temporarily if necessary.
    Cheers,
    evnafets

  • Java.lang.OutOfMemoryError  at sun.misc.Unsafe.allocateMemory(Native Metho

    Hi All,
    I have noticed the below OOM exception in one of my TCP Node. This OOM didn't cause the JVM to crash. The JVM seems to be running and The node seems to be part of the Cluster. However this TCP node is not receiving and request and not logging anything since the error.
    Has anyone experinced this exception/behaviour with JVM/coherence ?
    Regards
    S
    An exception occ
    urred while encoding a Response for Service=Proxy:ExendTcpProxyService:TcpAcceptor: java.lang.OutOfMemoryError
    at sun.misc.Unsafe.allocateMemory(Native Method)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.instantiateResource(TcpAcceptor.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.acquire(TcpAcceptor.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.allocate(TcpAcceptor.CDB:3)
    at com.tangosol.io.MultiBufferWriteBuffer.advance(MultiBufferWriteBuffer.java:903)
    at com.tangosol.io.MultiBufferWriteBuffer.write(MultiBufferWriteBuffer.java:311)
    at com.tangosol.io.AbstractWriteBuffer.write(AbstractWriteBuffer.java:110)
    at com.tangosol.io.AbstractWriteBuffer$AbstractBufferOutput.writeBuffer(AbstractWriteBuffer.java:1276)
    at com.tangosol.io.MultiBufferWriteBuffer$MultiBufferOutput.writeBuffer(MultiBufferWriteBuffer.java:648)
    at com.tangosol.io.pof.WritingPofHandler.onOctetString(WritingPofHandler.java:637)
    at com.tangosol.io.pof.PofBufferWriter.writeBinary(PofBufferWriter.java:602)
    at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1329)
    at com.tangosol.io.pof.PofBufferWriter$UserTypeWriter.writeObject(PofBufferWriter.java:2092)
    at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1739)
    at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1421)
    at com.tangosol.io.pof.PofBufferWriter$UserTypeWriter.writeObject(PofBufferWriter.java:2092)
    at com.tangosol.coherence.component.net.extend.message.Response.writeExternal(Response.CDB:15)
    at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.encodeMessage(TcpAcceptor.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
    at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
    at com.tangosol.coherence.component.net.extend.Channel.send(Channel.CDB:6)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:55)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)

    So there are 2 parallel approaches to tackle this
    1) Try to figure out if your objects being exchanged are large and if there are bursts of traffic. i.e is the size of your nio buffer sufficient to handle your load. If so, check if the node doing the processing is unable to deal with events in a timely manner.
    2) Open a ticket. What I heard from training is that in 3.5 coherence should have started choking traffic to the TCP node once it recognized the nio buffers are approaching capacity. So, this is not working
    Fixing 2 will not solve 1. It will just delay the problem in my opinion.
    Bottom line is that there is too much data backlogging in the buffer, either because of unexpected bursts, or because of large objects or because of slowdown in processing in the node.

Maybe you are looking for