Java.lang.OutOfMemoryError Exeption while Mapping

HI Team,
I am using PI 7.1 and while mapping IDOC to File my message mapping is getting this error
"java.lang.OutOfMemoryError"
Some time the Mapping is getting Opened, but some times it is giving this error.
#45 18:55:56 [AWT-EventQueue-2] FINE AutoLog.created.java.lang.OutOfMemoryError: java.lang.OutOfMemoryError: Java heap space
     at javax.swing.text.GapContent.allocateArray(Unknown Source)
     at javax.swing.text.GapVector.resize(Unknown Source)
     at javax.swing.text.GapVector.shiftEnd(Unknown Source)
     at javax.swing.text.GapContent.shiftEnd(Unknown Source)
     at javax.swing.text.GapVector.open(Unknown Source)
     at javax.swing.text.GapVector.replace(Unknown Source)
     at javax.swing.text.GapContent.insertString(Unknown Source)
     at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
     at javax.swing.text.AbstractDocument.insertString(Unknown Source)
     at com.sap.aii.ib.gui.xmleditor.doc.TextDocument.editorCommited(TextDocument.java:110)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.fireEditorCommited(XsdSchemaTextable.java:113)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setText(XsdSchemaTextable.java:104)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setSchema(XsdSchemaTextable.java:96)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.setSchema(XsdContainerTextView.java:57)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.<init>(XsdContainerTextView.java:47)
     at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.makeFromTreeDoc(MultiViewEditor.java:244)
     at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.<init>(MultiViewEditor.java:85)
     at com.sap.aii.mappingtool.mf.TransformationPanel.createSourceView(TransformationPanel.java:251)
     at com.sap.aii.mappingtool.mf.TransformationPanel.<init>(TransformationPanel.java:96)
     at com.sap.aii.mappingtool.mf.MappingTool.<init>(MappingTool.java:43)
     at com.sap.aii.mappingtool.api.MappingToolFactory.getInstance(MappingToolFactory.java:61)
     at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:376)
     at com.sap.aii.mappingtool.fwutil.api.ViewUtil.refreshControls(ViewUtil.java:61)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView.refreshControls(XiMappingView.java:197)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.refreshControls(XiTransformationView.java:132)
     at com.sap.aii.ib.gui.editor.XiView.refresh(XiView.java:230)
     at com.sap.aii.utilxi.swing.framework.DocumentContainer.refreshView(DocumentContainer.java:341)
     at com.sap.aii.utilxi.swing.framework.cmd.SaveCommand.execute(SaveCommand.java:80)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:198)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:154)
     at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:82)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
#44 18:55:56 [AWT-EventQueue-2] DEBUG AutoLog.created.java.lang.OutOfMemoryError: Java heap space
#43 18:55:56 [AWT-EventQueue-2] FINE AutoLog.created.com.sap.aii.utilxi.swing.framework.FrameworkException: com.sap.aii.utilxi.swing.framework.FrameworkException: Internal problem occurred
     at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.init(ExceptionDialog.java:126)
     at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.<init>(ExceptionDialog.java:98)
     at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:400)
     at com.sap.aii.mappingtool.fwutil.api.ViewUtil.refreshControls(ViewUtil.java:61)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView.refreshControls(XiMappingView.java:197)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.refreshControls(XiTransformationView.java:132)
     at com.sap.aii.ib.gui.editor.XiView.refresh(XiView.java:230)
     at com.sap.aii.utilxi.swing.framework.DocumentContainer.refreshView(DocumentContainer.java:341)
     at com.sap.aii.utilxi.swing.framework.cmd.SaveCommand.execute(SaveCommand.java:80)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:198)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:154)
     at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:82)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
     at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at javax.swing.JComponent.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at com.sap.aii.utilxi.swing.toolkit.Guitilities$EventProcessor.dispatchEvent(Guitilities.java:320)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.OutOfMemoryError: Java heap space
     at javax.swing.text.GapContent.allocateArray(Unknown Source)
     at javax.swing.text.GapVector.resize(Unknown Source)
     at javax.swing.text.GapVector.shiftEnd(Unknown Source)
     at javax.swing.text.GapContent.shiftEnd(Unknown Source)
     at javax.swing.text.GapVector.open(Unknown Source)
     at javax.swing.text.GapVector.replace(Unknown Source)
     at javax.swing.text.GapContent.insertString(Unknown Source)
     at javax.swing.text.AbstractDocument.handleInsertString(Unknown Source)
     at javax.swing.text.AbstractDocument.insertString(Unknown Source)
     at com.sap.aii.ib.gui.xmleditor.doc.TextDocument.editorCommited(TextDocument.java:110)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.fireEditorCommited(XsdSchemaTextable.java:113)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setText(XsdSchemaTextable.java:104)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdSchemaTextable.setSchema(XsdSchemaTextable.java:96)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.setSchema(XsdContainerTextView.java:57)
     at com.sap.aii.ib.gui.xmleditor.docview.views.XsdContainerTextView.<init>(XsdContainerTextView.java:47)
     at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.makeFromTreeDoc(MultiViewEditor.java:244)
     at com.sap.aii.ib.gui.xmleditor.docview.MultiViewEditor.<init>(MultiViewEditor.java:85)
     at com.sap.aii.mappingtool.mf.TransformationPanel.createSourceView(TransformationPanel.java:251)
     at com.sap.aii.mappingtool.mf.TransformationPanel.<init>(TransformationPanel.java:96)
     at com.sap.aii.mappingtool.mf.MappingTool.<init>(MappingTool.java:43)
     at com.sap.aii.mappingtool.api.MappingToolFactory.getInstance(MappingToolFactory.java:61)
     at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:376)
     at com.sap.aii.mappingtool.fwutil.api.ViewUtil.refreshControls(ViewUtil.java:61)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView.refreshControls(XiMappingView.java:197)
     at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.refreshControls(XiTransformationView.java:132)
     at com.sap.aii.ib.gui.editor.XiView.refresh(XiView.java:230)
     at com.sap.aii.utilxi.swing.framework.DocumentContainer.refreshView(DocumentContainer.java:341)
     at com.sap.aii.utilxi.swing.framework.cmd.SaveCommand.execute(SaveCommand.java:80)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.execute(ExecutionContext.java:198)
     at com.sap.aii.utilxi.swing.framework.ExecutionContext.executeSafe(ExecutionContext.java:154)
     at com.sap.aii.utilxi.swing.framework.CommandAction.actionPerformed(CommandAction.java:82)
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
Can any one tell how to post entire log file.
Thanks in Advance,
Sriram

> #45 18:55:56 [AWT-EventQueue-2] FINE AutoLog.created.java.lang.OutOfMemoryError: java.lang.OutOfMemoryError: Java heap space
I'd say that the message is too big for your currently configured Java heap --> increase it.
Markus

Similar Messages

  • Getting 'java.lang.OutOfMemoryError' while importing process flows.

    Hello,
    We are getting 'java.lang.OutOfMemoryError' error while importing process flows in our QA environment. This environment is not new. The same process flows were working perfectly fine till last week.
    This week we had to delete the project in QA and reimport all the objects. Import went fine for all, except process flows. We could deploy all other objects as well.
    We have tried increasing JVM in run_service.sh and owbclient.sh files by increasing -Xmx, -Xmx and Dlimit. We increased as far as 2048M ( This is the max memory available on our server)
    We are using OWB version 10.2.0.2 and Oracle 10G over Linux. Did anyone of you face the same issue ? Please le us know the solution.
    Thanks
    Madhavi

    Hi Madhavi,
    Which locale language is shown in your OWB client configuration? We had this issue in previous versions (I haven't found it in this version, but I'm used to work with English since these previous versions) So we always adjust Preferences (Tools -> Preferences...) to see Appearance -> Locale -> English.
    Try to change the locale language if it's your case.
    Regards
    ANA GH

  • Java.lang.OutofmemoryError while loading message in mapping

    Hi,
    I encountered a Strange problem while performing message mapping.
    I have to transform Orders05 message into another message format(the size of the XSD file is 17 KB) which has got 100 elements(approx count) in it.
    After selecting the source message(Orders05) when i tried to select the target message (whihc was imported into XI as external definations), the system hangs up and i get below error message.
    <b>Display Problem
    java.lang.OutofmemoryError
    Internal problem occurred (INTERNAL_PROBLEM)
    MESSAGE ID: com.sap.aii.utilxi.swing.framework.rb_exceptions.INTERNAL_PROBLEM</b>
    The system i tried this was a P4-processor512 MB RAM. so i used my laptop(1 GB RAM Intel centrino) to perform the same. But no change in message mapping, but the only thing i noticed was the system did not hangup.
    Later i went to perform the same mapping on the server 3 GB RAM, dual processor. Initially the message could be selected as target field. But after performing 2-3 field level mapping, the Design time hanged up. I had to close the session and open up again to perform 2-3 field mappings again. This went on for over 20 times and only then i could finish the entire mapping.
    I have never encountered such a problem earlier. Is there any solution to rectify this. My problem is, i have to perform 10 such mappings :-((
    Here is the complete errror i got .
    Internal problem occurred (INTERNAL_PROBLEM)
    MESSAGE ID: com.sap.aii.utilxi.swing.framework.rb_exceptions.INTERNAL_PROBLEM
    STACKTRACE:
    com.sap.aii.utilxi.swing.framework.FrameworkException: Internal problem occurred
        at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.init(ExceptionDialog.java:116)
        at com.sap.aii.utilxi.swing.toolkit.ExceptionDialog.<init>(ExceptionDialog.java:93)
        at com.sap.aii.mappingtool.fwutil.util.ToolUtil.restartTool(ToolUtil.java:362)
        at com.sap.aii.ibrep.gui.mapping.xitrafo.XiTransformationView.loadIfrSchema(XiTransformationView.java:274)
        at com.sap.aii.ibrep.gui.mapping.xitrafo.XiMappingView.searchForRepositoryObject(XiMappingView.java:245)
        at com.sap.aii.ibrep.gui.mapping.xitrafo.RepObjSearchHelpAction.actionPerformed(RepObjSearchHelpAction.java:90)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at javax.swing.AbstractButton.doClick(Unknown Source)
        at com.sap.plaf.frog.FrogMenuItemUI$MouseInputHandler.mouseReleased(FrogMenuItemUI.java:833)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
    java.lang.OutOfMemoryError
    STACKTRACE:
    Regards,
    Siva Maranani

    Hi Siva,
    Goto the exchange profile via URL
    http://<>:port/exchangeProfile, goto
    IntegrationBuilder in the left tree and increase parameter com.sap.aii.ib.client.jnlp.j2se.maxheapsize from 512m to 768m (or higherif necessary). Press the save button.
    Goto http://<>:port/rep/support/admin/index.html,
    press AII Properties on the left side and then press the REFRESH button until you see the new value on the right side.
    if the problem is no resolved even after doing the above, take a look at a look at note:
    580351 Java WebStart troubleshooting in XI 2.0
    855471
    (This note is also valid for XI3.0)
    Cheers,
    Naveen
    Message was edited by: Naveen Pandrangi

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

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

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

  • 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 getting while deploying the application (java.lang.OutOfMemoryError).

    Hi,
    I am trying to migrate an application from JBoss to SAP Netweaver WAS.
    I am getting an exception when i am trying to deploy the application from Netweaver developer studio as "<b>java.lang.OutOfMemoryError</b>". The portion of the stack is given below,
    <b>Caused by: com.sap.engine.services.ejb.exceptions.deployment.EJBFileGenerationException: Errors while compiling:
    The system is out of resources.
    Consult the following stack trace for details.
    java.lang.OutOfMemoryError
         at com.sap.engine.services.ejb.util.AdminUtils.compile(AdminUtils.java:476)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.deploySingleJar(DeployAdmin.java:625)
         at com.sap.engine.services.ejb.deploy.DeltaDeployAdmin.makeUpdate(DeltaDeployAdmin.java:185)
         at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:529)</b>
    I heard that by changing some configuration values, we can resolve the problem (like adjusting -Xms & - Xmx parameters as well as the Max threads). But i don't know in which script/ tool should i find these settings to change.
    Could you please share your knowledge in this regard,
    Best regards,
    Sudheesh...

    Hi
    You can change the XMX and thread  parameter in the Visual Administrator.
    Please refer to the link below:
    http://help.sap.com/saphelp_erp2005/helpdata/en/42/c98d6b11886babe10000000a1553f6/frameset.htm
    Hope this helps,
    Regards,
    Harish
    (Please award points for useful answers)

  • Getting error while executing workflow: java.lang.OutOfMemoryError.

    Hi,
    I am getting the below error while executing the unassigment workflow on AD resource having 160 user objects.
    java.lang.OutOfMemoryError.
    Please provid your inputs on this.
    Your help wolud be appriciated.
    Thanks
    Renuka.

    Well, if you're getting an out of memory exception then your memory settings are too low. Odds are there's a period of activity where the memory usage spikes above what you've configured for the VM.

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

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

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

  • Java.lang.OutOfMemoryError: PermGen space error while creat weblogic domain

    Hi,
    OBIEE 11g installing in Linux server now. domain creation is in progress for about an hour and in log I can see below error.
    Creating a new AdminServer Object ...
    AdminServer port is 7001
    Starting the domain ...
    java.lang.OutOfMemoryError: PermGen space
    java.lang.OutOfMemoryError: PermGen space
    java.lang.OutOfMemoryError: PermGen space
    domain creation is still running and looks like it is struck to start domain no idea how to solve the issue. waiting to see whether domain creation successful.
    I was searching on web and found below solution but no idea how to do it in Linux server. Please provide detail instructions to do it.
    * java.lang.OutOfMemoryError: PermGen space
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.getConstructor(Unknown Source)
    Solution: Increase the max permgen space -XX:MaxPermSize=256m
    There can be a leak in the permgen objects. If tuning parameters do not resolve the issue, we need to use the memory leak detector tools and find out which instances in the permgen space are not getting cleared.
    Refer: http://weblogic-wonders.com/weblogic/2010/12/30/different-out-of-memory-issues/
    Appreciate for your help.
    Thanks
    Jay.

    Hi,
    The script that configures the domain $DOMAIN_HOME/bin/setDomainEnv.sh... it should detect you are using JDK from Sun (JAVA_VENDOR="Sun") and add -XX:MaxPermSize=512m automatically...
    Simple solution, use JRockit... This problem only occurs with Sun JDK...
    Alternatively, add manually -XX:MaxPermSize=512m to the last JAVA_PROPERTIES in setDomainEnv.sh then you will be sure it is there...
    Cheers,
    Vlad

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

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

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

  • Java.lang.OutOfMemoryError while starting Standalone Reports Server

    I am trying to start a standalone report server on AIX box, but is giving following error
    bash-3.00$ rwserver.sh server=repservername &
    java.lang.OutOfMemoryError: JVMXE006:OutOfMemoryError, stAllocAor executeJava failed
    kindly help

    was able to solve this
    there was corruption of reports config file

  • Java.lang.OutOfMemoryError: Java heap space While deploying 'ear' file

    I am using below code to deploy an 'ear' file on weblogic 10.3
    package com.qasource;
    import java.io.*;
    import java.util.Hashtable;
    import weblogic.deploy.api.tools.*;  //SesionHelper
    import weblogic.deploy.api.spi .*;  //WebLogicDeploymentManager
    import javax.enterprise.deploy.spi.TargetModuleID;
    import javax.enterprise.deploy.spi.status.ProgressObject;
    import javax.enterprise.deploy.spi.status.DeploymentStatus;
    import javax.enterprise.deploy.shared.ModuleType;
    import javax.enterprise.deploy.spi.Target;
    import javax.management.MBeanServerConnection;
    import javax.management.remote.JMXConnector;
    import javax.management.remote.JMXConnectorFactory;
    import javax.management.remote.JMXServiceURL;
    import javax.naming.Context;
    public class WeblogicTest
         public static void main(String ar[]) throws Exception
              System.out.println("Start Deploying");
              WebLogicDeploymentManager deployManager=SessionHelper.getRemoteDeploymentManager( "t3", "10.0.0.47", "7003", "weblogic",
              "weblogic123");
              System.out.println("Deploy Manager  :  " + deployManager);
              DeploymentOptions options = new DeploymentOptions();
              options.setName("TC33");          //TODO
              Target targets[] = deployManager.getTargets();
              System.out.println("Target  :  " + targets);
              Target deployTargets[]=new Target[1];     
              int temp=0;
              for (temp=0; temp < targets.length; temp++){
                   if(targets[temp].getName().equals("new_ManagedServer_1")){
                        deployTargets[0]=targets[temp];
              ProgressObject processStatus=deployManager.distribute(deployTargets, new                
                        File("\\\\10.0.0.47\\Builds\\VertexTest\\domain1\\tc3.3b74_6.2.2011.19\\test-3.3.0.0074.ear"), null,options);
              DeploymentStatus deploymentStatus=processStatus.getDeploymentStatus() ;
              System.out.println("UnDeploymentStayus.getMessage(): "+deploymentStatus.getMessage() );
              Thread.sleep(5000);
              TargetModuleID[] targetModuleIDs=deployManager.getAvailableModules(ModuleType.EAR, deployTargets);
              System.out.println("\n\t targetModuleIDs [] = "+targetModuleIDs);
              for (int j=0;j<targetModuleIDs.length;j++){
                   System.out.println("\n\t "+targetModuleIDs[j]);
                   deployManager.start(targetModuleIDs);
                   deployManager.start(targetModuleIDs);
    }My environment: Window XP
    Weblogic: 11g
    ear file size: 97886 KB
    Admin server arguments: -Xms=512m Xmx=512m
    Managed server arguments: -Xms=512m Xmx=512m
    But above code is showing java.lang.OutOfMemoryError: Java heap space:
    below is the log statements:
    Start Deploying
    Deploy Manager : [email protected]eb5
    Target : [Ljavax.enterprise.deploy.spi.Target;@fd918a
    <Jun 3, 2011 11:20:17 AM IST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating distribute operation for application, TC33 [archive: \\10.0.0.47\Builds\VertexTest\domain1\tc3.3b74_6.2.2011.19\test-ear-3.3.0.0074.ear], to new_ManagedServer_1 .>
    UnDeploymentStayus.getMessage(): java.lang.OutOfMemoryError: Java heap space
         targetModuleIDs [] = null
    Exception in thread "main" java.lang.NullPointerException
         at com.qasource.WeblogicTest.main(WeblogicTest.java:48)
    <Jun 3, 2011 11:21:21 AM IST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
    Can any tell me how to resolve this issue.
    Edited by: 861978 on Jun 2, 2011 10:51 PM
    Edited by: 861978 on Jun 2, 2011 10:52 PM

    Hi,
    Yes,René van Wijk has said rite..
    Just open the Weblogic console,
    expand Environment-->Server-->(ur managed server)-->Server Start tab
    Just enter the below lines in Arguments:
    -Xms1024m -Xmx1024m -XX:MaxPermSize=256m
    Then bounce your managed server
    This should solve your problem
    Regards
    Fabian

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

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

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

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

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

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

  • 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

Maybe you are looking for

  • No data in RSA3 for 2LIS_11_VAITM and 2LIS_11_VAHDR

    hello experts, i want to extract data from 2LIS_11_VAHDR and 2LIS_11_VAITM but dont see any data in RSA3. I have already activated the datasource in RSA5 and LBWE. After running the setup tables using OLI7BW i still dont see any data in RSA3. Pls adv

  • The button on the mouse doesn't scroll down or sidewides...

    This is a minor bother but it bugs me every single day. The little nub-button (Button 3 according to System Preferences) on my cordless not-magic mouse will only scroll up; not down or side wides. I've mucked about with the mouse preferences setting

  • Newb Overclocking Questions?

    I'm just started overclocking and have a ram question. My ram, which is only Corsair 512x2 Value Select, shows that it's running at 2.5, 3, 3, 8, 2T. Now if i'm overclocking i want to lower or raise these numbers to make everything more stable? I tho

  • Want to find the list of Thermal Printer pass the MFI program!

    Want to find the list of Thermal Printer pass the MFI program! Did Apple have any list list out  the Device which pass the MFI program? I want to find some Thermal Printer pass MFI. Thank you very much!!!^^

  • Lightroom Star Rating Loss on Import

    Hello everyone! Longtime LR user, new to the forums and looking for a bit of insight. When shooting on deadline, I start my workflow by running my images  through Photo Mechanic where I star rate, caption and FTP a few.  Afterwards I typically head h