Import Manager Out of Memory error

I am running MDM 5.5.24.06 server on Windows XP Professional. The server has 4.0 GB RAM with 1.5 GB Virtual memory.
I am trying to load 129 material master records from R/3 4.6 ( XML file size 8 MB), into MDM using Import Manager.
When I click on import icon (Import Status tab selected), MDM Import Manager rightway returns 'Out of Memory' error.
Tried to import the file again after rebooting the machine, restarting MDM Server, but still it returned the same error.
Has anybody tried loading the R/3 material data into MDM? What's the experience? What was the load (# of records)?
What was MDM IM performance? What's your hardware/software config?
Appreciate your help.
Thanks,
Abhay

Hi Abhay,
My workstation has Windows 2000, Pentium 4 CPU 3.2 Ghz, 515,555 KB RAM.  The recommended specifications can be found on service market place of SAP, and we used those to procure our workstations.
MDM server must be more pwerful than a workstation.  Try running the import manager from the server machine itself.  If it works there but not on your machine, it is memory of your workstation.
Sometimes, I think this error comes when import map some issues- fields not mapped accurately or remote key mapped wrong etc.
It is probably judicious to rpove the system memory as first step.
Good luck!

Similar Messages

  • RoboHelp 9 gives an out of memory error and crashes when I try to import or link a Frame 10 file or

    I have Tech Suite 3. If I start a new RoboHelp project and try to import or link Frame files, RoboHelp tries for a while, then I get an Out of Memory error and the program crashes.
    I opened one of the sample projects and was able to link to one of my frame files without any problem, so it seems to be an issue with creating something new.
    Any suggestions?

    It happens when I create a new project and then try to import or link frame docs to make up the content. It starts scanning, then crashes. I did get it to the conversion setting page once, but no further.
    It does not happen if I open one of the supplied example projects and link a file. But then it doesn't let me choose, during import, any style mapping. And I can't delete the sample project fold
    Twice now it has told me when I tried to import (not link, but import) that my .fm file could not be opened, and told me to verify that Frame is installed (it is) and that the file is a valid frame file (it is).
    The docs and project are in separate folders on my C: drive.

  • Out of memory error importing a JPA Entity in WebDynpro Project

    Hi All!
    We are having problems importing JPA entities in a WebDynPro project, this is our escenario.
    We have two entities, entity A that has a ManyToOne relationship with entity B and at the same time entity B has a OneToMany relationship with entity A. When in the controller context we try to create a node usign a model binding to Entity A we got an Out of memory error from NetWeaver DS. Trying to figure out the problem we identified that in the model that we imported we got the following.
    Entity A
        Entity B
            Entity A
               Entity B
                  and so on....... without and end
    What are we doing wrong? Or how can we avoid these behavior?
    Regards,

    Hi Kaylan:
    Thanks for your reply. You are rigth about the error that we are getting. This is our scenario.
    We have a ejb that in some of his method uses the entity Lote, and this entity has a relationship with entity Categoria. When we import the EJB using the model importer netweaver imports the EJB methods and the entities that they use.
    So after doing this besides the ejb's methods we got these two entities that are the ones that are generating the error, when we try to create a context node using the Categoria entity.
    @Entity
    @Table(name="TB_LOTE")
    public class Lote implements Serializable {
         @EmbeddedId
         private Lote.PK pk;
         @ManyToOne
         @JoinColumn(name="CO_CATEGORIALOTE")
         private Categoria coCategorialote;
         @Embeddable
         public static class PK implements Serializable {
              @Column(name="CO_LOTE")
              private String coLote;
              @Column(name="CO_ORDENFABRICACION")
              private String coOrdenfabricacion2;
                   ^ this.coOrdenfabricacion2.hashCode();
    @Entity
    @Table(name="TB_CATEGORIA")
    public class Categoria implements Serializable {
         @Id
         @Column(name="CO_CATEGORIA")
         private String coCategoria;
         @OneToMany(mappedBy="coCategorialote")
         private Set<Lote> tbLoteCollection;
    Regards,
    Jose Arango

  • Out of memory error while importing work repository.

    any suggestions? The model is created. But project isnt.
    thanks in advance.
    Edited by: user9546555 on Jun 25, 2009 5:35 AM

    Hi,
    I tried 4-5 times . all the time i got out of memory error. Then i changed the odiparam file and increased heap size to 4 times higher.
    Next time i imported it worked just Fine
    thanks anyway.

  • Out of Memory error end erratic behavior

    Brief description of the issue: while importing images at their current location, some of them would show in grid view with an exclamation mark, and LR would not allow me to adjust them. Removing and importing the same set of images again, the subset of troubled images changed. At some stage, trying to develop one of the images, I got an "Out of Memory" written in red in the center pane. PS CS opens the same images without any problem, and Windows Task Manager indicates there is plenty of available physical and virtual memory.
    Here what I did in detail.
    While I was importing images at their current location into the library from DVDs, I started to see en exclamation mark in the upper right corner of several images in the grid view. When I selected any of those images and hit "D" to develop them, I got "An unknown error occurred" in the Develop module, and LR would not allow me to do any adjustment.
    I have tried removing the images from the Library and importing them again, and then some of the troubled images were not the same as before, and LR would allow me to develop some of the previously troubled images.
    PS CS File Browser shows them all correctly, and also PS can open any of the images without any issue.
    I have copied some of the troubled images to my hard disk, and then tried to import them into LR from there. The same image sometimes worked, sometimes didn't. Finally, when trying to develop one of those, I got an "Out of Memory" error message printed in red and upside down in the middle of the picture.
    Windows Task Manager was reporting 833824 KB of Available Physical Memory out of 2095536 KB, and was reporting as Commit Charge: Total 1281084 KB, Limit 5080272 KB, Peak 1707720 KB.
    Any idea what is going on? It looks to me like instability after I imported a few hundred pictures in a row.

    You are ABSOLUTELY right that I had explorer windows open when I got the export failed messages!!!! I do all my printing at costco, so I have Lr export my final pics to a 'jpeg finals' directory, and then individual sub-directories for each folder they came from, and then manually copy from each of these sub directories to the root directory on my CF card for transport to Costco.
    Will see if it happens in the future without that window open. Still wouldnt help the upside down OOM messages, tho thanks for the update that the team is working on it.
    These two issues and the UI lag are really all that I can ***** about too much, which is pretty amazing given my beta frustrations. I still wish I wasnt locked to the DB. I still cannot in good conscience recommend Lr to most new DSLR users. But for my own use I'm pretty happy. I wish I could get better highlight and shadow recovery like I got in RSP but I'm sure that is user error and n00bishness more than a failure of the app. I'm also not happy that I can't toggle the crop tool to the way I want to work permanently but I guess that ship has sailed too.

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

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

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

  • Adobe X Pro 10.1.10 Out of Memory error message

    Hello One, Hello All
    Since updating our Adobe X Pro machines to version update 10.1.10, we occasionally receive an "Out of Memory" error message, which depending on what we are doing, may force us to shutdown all Adobe windows and re-open Adobe, or simply click OK and continue working with the PDF document like nothing is wrong. It seems to have no rhyme or reason to when or why it occurs. I do not see any warnings or errors in the Windows Event Log. It happens with files we have created, and also happens with files received from internal and external sources through email. It is affecting our high end machines: Lenovo X Series and W Series laptops with Windows 8.1 3rd/4th gen i5 CPUs, 8+GB RAM, 128+GB SSD's. We have all system and Windows updates applied. We have Trend Micro and Malwarebytes real-time protection and system scans do not find any malware.
    I have found a few other recent threads on Adobe forum related to this error message but the responses are weak at best with no definitive fix. The system and user temp folders size are less than 100MB each so this cannot be the issue. When the error occurs I check task manager and system utilization, including memory, is well below 100%.
    We did not have this issue prior to version update 10.1.10.
    Really hoping Adobe can step in to help here and hoping boilerplate responses are not used.

    Hi wayne103,
    We released a new security update yesterday that is v10.1.11
    Please update to this version and check the performance.
    I have seen this error message occur while opening a 3rd party created pdf that has corrupted file structure.
    Please let me know if the issue occurs for some specific files or random
    Also let me know the PDF producer for these pdfs.
    Regards,
    Rave

  • E71 keeps giving out of memory error; I can't find...

    My Nokia E71 (it's black so it may be an E71x, I guess) keeps giving me out of memory errors. I use my phone for nothing but voice calls, text messages, and emails. I have cleared all call logs, deleted all emails except 5 (they have no attachments) and cleared deleted emails, and deleted all text messages. I went into file manager and made sure there are no images, videos, etc. on the phone. I set up options to use memory card for emails. I've turned the phone off, waited 15 or 20 seconds, and turned it back on.
    I did all this a couple weeks ago. Ever since then. every couple days I get these out of memory errors, and the phone memory shows me 119 MB used and something like 300K free. I'm at the point where every few emails that come in, I have to delete all emails, erase all text messages, etc. or the phone is just too low on memory to operate.
    What else can I try? I don't have any additional applications installed. I've even tried to delete built-in apps such as RealPlayer but it didn't seem like that was possible.
    This is getting really annoying. Please help!

    @EricHarmon
    Although all user data would be deleted, have you tried resetting device to "Out of box" state by keying in *#7370# followed by 12345 (default Nokia lock code unless altered by user)?
    Happy to have helped forum with a Support Ratio = 42.5

  • Large Pdf using XML XSL - Out of Memory Error

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

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

  • N97 out of memory errors

    The product is N97, you don’t have in you drop down list!!!
    I have had my n97 for about 10 days now and everything was going brilliant. It is a stunning piece of kit.
    However on day 11. I repowered the n97, it kept on hanging the eventually got to boot after 20 attempts, but it was useless could not look up contacts. So I had taskman installed and killed loads of processes and uninstalled all the apps. It became usable as a very basic phone, but sluggish. Could use browser, maps, photos.
    The problem is I keep on experiencing out of memory errors on the phone, when I try to do basic things. I don’t know how to resolve this. I have rebooted, reset the phone to factory settings.
    Deleted data, uninstalled more apps and still no joy!! I cannot connect to ovi/pc suite to up grade the phone or roll it back.
    Symptoms the phone is sluggish it is still virtually unusable. It just barely make phones and is slow to respond to touch-screen presses and key presses.
    The taskman app says the is 47 mb free on C: drive. So I cant see what the problem is!!!
    I have always bought nokia for 10 years, never experience this sort of thing before.  I am really disappointed with this.
    Anybody else experienced this? Any ideas?
    Many thanks
    Gd
    Solved!
    Go to Solution.

    Copyless thanks for the tip.  Kudos added :-)
    I had the same problem a friend was trying to bluetooth some videos to me and I was getting Memory problem, How embarasing after a few min of my mates being impressed with the phone, and me praising it and talking about so much space and blah blah blah.
    I could not receive videos via bluetooth because they were 5MB.  WHY on EARTH can they not default this to the E: drive.
    Whoever made that decision in NOKIA should be fired what an idiot.
    Also  when I finally got to get the pictures on the phone via a computer I could not see them via the "Photos"  I had to go via the File Manager and see one by one.  AARRRRRRRRGHHH  I am getting to the point that I am going to return this phone.
    N97 Black unlocked using the 3 Network (UK). Product Code 0586308. Firmware V20.0.019. Made In Finland.Custom version V20.019.235.10.

  • Out of memory error - from parsing a "fixed width file"

    This may be fairly simple for someone out there but I am trying to write a simple program that can go through a "fixed width" flat txt file and parse it to be comma dilmeted.
    I use a xml file with data dictionary specifications to do the work. I do this because there are over 430 fields that need to be parsed from a fixed width with close to 250,000 lines I can read the xml file fine to get the width dimensions but when I try to apply the parsing instructions, I get an out of memory error.
    I am hoping it is an error with code and not the large files. If it is the latter, does anyone out there know some techniques for getting at this data?
    Here is the code
       import java.io.*;
       import org.w3c.dom.Document;
       import org.w3c.dom.*;
       import javax.xml.parsers.DocumentBuilderFactory;
       import javax.xml.parsers.DocumentBuilder;
       import org.xml.sax.SAXException;
       import org.xml.sax.SAXParseException;
        public class FixedWidthConverter{
          String[] fieldNameArray;
          String[] fieldTypeArray;
          String[] fieldSizeArray;      
           public static void main(String args []){
             FixedWidthConverter fwc = new FixedWidthConverter();
             fwc.go();
             fwc.loadFixedWidthFile();
            //System.exit (0);
          }//end of main
           public void go(){
             try {
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                Document doc = docBuilder.parse (new File("files/dic.xml"));
                // normalize text representation            doc.getDocumentElement ().normalize ();
                System.out.println ("Root element of the doc is " +
                     doc.getDocumentElement().getNodeName());
                NodeList listOfFields = doc.getElementsByTagName("FIELD");
                int totalFields = listOfFields.getLength();
                System.out.println("Total no of fields : " + totalFields);
                String[] fldNameArray = new String[totalFields];
                String[] fldTypeArray = new String[totalFields];
                String[] fldSizeArray = new String[totalFields];
                for(int s=0; s<listOfFields.getLength() ; s++){
                   Node firstFieldNode = listOfFields.item(s);
                   if(firstFieldNode.getNodeType() == Node.ELEMENT_NODE){
                      Element firstFieldElement = (Element)firstFieldNode;
                      NodeList firstFieldNMList = firstFieldElement.getElementsByTagName("FIELD_NM");
                      Element firstFieldNMElement = (Element)firstFieldNMList.item(0);
                      NodeList textFNList = firstFieldNMElement.getChildNodes();
                      //System.out.println("Field Name : " +
                               //((Node)textFNList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      //fldNameArray[s] = ((Node)textFNList.item(0)).getNodeValue().trim();
                      NodeList typeList = firstFieldElement.getElementsByTagName("TYPE");
                      Element typeElement = (Element)typeList.item(0);
                      NodeList textTypList = typeElement.getChildNodes();
                      //System.out.println("Field Type : " +
                               //((Node)textTypList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      //fldTypeArray[s] = ((Node)textTypList.item(0)).getNodeValue().trim(); 
                      NodeList sizeList = firstFieldElement.getElementsByTagName("SIZE");
                      Element sizeElement = (Element)sizeList.item(0);
                      NodeList textSizeList = sizeElement.getChildNodes();
                      //System.out.println("Field Size : " +
                               //((Node)textSizeList.item(0)).getNodeValue().trim());
                      //loads values into an array
                      fldSizeArray[s] = ((Node)textSizeList.item(0)).getNodeValue().trim();   
                   }//end of if clause
                }//end of for loop with s var
                //setFldNameArray(fldNameArray);
                //setFldTypeArray(fldTypeArray);
                setFldSizeArray(fldSizeArray);
                 catch (SAXParseException err) {
                   System.out.println ("** Parsing error" + ", line "
                      + err.getLineNumber () + ", uri " + err.getSystemId ());
                   System.out.println(" " + err.getMessage ());
                 catch (SAXException e) {
                   Exception x = e.getException ();
                   ((x == null) ? e : x).printStackTrace ();
                 catch (Throwable t) {
                   t.printStackTrace ();
          }//end go();
           public void setFldNameArray(String[] s){
             fieldNameArray = s;
          }//end setFldNameArray
           public void setFldTypeArray(String[] s){
             fieldTypeArray = s;
          }//end setFldTypeArray
           public void setFldSizeArray(String[] s){
             fieldSizeArray = s;
          }//end setFldSizeArray
           public String[] getFldNameArray(){
             return fieldNameArray;
          }//end setFldNameArray
           public String[] getFldTypeArray(){
             return fieldTypeArray;
          }//end setFldTypeArray
           public String[] getFldSizeArray(){
             return fieldSizeArray;
          }//end setFldSizeArray 
           public int getNumLines(){
             int countLines = 0;
             try {
                    //File must be in same director and be the name of the string below
                BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   countLines++;
                in.close();
                 catch (IOException e) {}    
             return countLines;
          }//end of getNumLines
           public void loadFixedWidthFile(){
             int c = getNumLines();
             int i = 0;
             String[] lineProcessed = new String[c];
             String chars;
             try {
                    //File must be in same director and be the name of the string below
                BufferedReader in = new BufferedReader(new FileReader("files/FLAT.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   //System.out.println(str.length());
                   lineProcessed[i] = parseThatLine(str);
                   i++;
                in.close();
                 catch (IOException e) {}     
                //write out the lineProcess[] array to another file
             writeThatFile(lineProcessed);
          }//end loadFixedWidthFile()
           public void writeThatFile(String[] s){
             try {
                BufferedWriter out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
                for(int i = 0; i < s.length -1; i++){
                   out.write(s);
    }//end for loop
    out.close();
    catch (IOException e) {}
    }//end writeThatFile
    public String parseThatLine(String s){
    int start = 0;
    int end = 0;
    String parsedLine = "";
    int numChars = getFldSizeArray().length;
    //Print number of lines for testing
    //System.out.println(numChars);
    String[] oArray = getFldSizeArray();
    //String chars = oArray[0];
    //System.out.println(chars.length());
    //oArray
    for(int i = 0; i < numChars -1; i++ ){
    if(i == 0){
    start = 0;
    end = end + Integer.parseInt(oArray[i])-1;
    else
    start = end;
    end = end + Integer.parseInt(oArray[i]);
    parsedLine = parsedLine + s.substring(start, end) + "~";
    }//end for loop
    return parsedLine;
    }//End of parseThatLine
    I have tried to illeminate as many arrays as I can thinking that was chewing up the memory but to no avail.
    Any thoughts or ideas?
    Message was edited by:
    SaipanMan2005

    You should not keep a String array of all the lines of the file read.
    Instead for each line read, parse it, then write the parsed line in the other file:      public void loadFixedWidthFile() {
             BufferedReader in = null;
             BufferedWriter out = null;
             try {
                //File must be in same director and be the name of the string below
                in = new BufferedReader(new FileReader("files/FLAT.txt"));
                out = new BufferedWriter(new FileWriter("files/outfilename.txt"));
                String str;
                while ((str = in.readLine()) != null) {
                   //System.out.println(str.length());
                   str = parseThatLine(str);
                   //write out the parsed str to another file
                   out.write(str);
             catch (IOException e) {
                e.printStackTrace(); // At least print the exception - never swallow an exception
             finally { // Use a finally block to be sure of closing the files even when exception occurs
                try { in.close(); }
                catch (Exception e) {}
                try { out.close(); }
                catch (Exception e) {}
          }//end loadFixedWidthFile()Regards

  • Thread: Out of memory error

    I'm running a program that reads a file of more than 20k lines. Each line of this file is being processed by a thread. Sometimes the program is being halted with the out of memory error.
    What can I do to solve this problem ? Is it better to change the logic of this program and instead of calling a new thread for each line, call few threads to be responsible of processing multiple lines ?
    The current java version is 1.4.2.13. Upgrading it to the most recent version can solve the problem ?
    I'm running it with the following configuration:
    "-Xms1024m -Xmx2048m -XX urvivorRatio=10"
    Thanks a lot,
    Marcos.

    Indeed this design is flawed. It is an old system that came to my hands and now I have to fix some bugs on it.
    What is the difference between calling thousand of threads and having this backport of concurrent to take care of it ? I mean, isn't the jvm responsible for managing the both cases ?
    Using the backport of concurrent and defining a limited size thread pool, what will happen if the number of lines in the file is greater than the size of this pool ?
    Do you have an example or a link to where I can get a good example on how to use it ?
    Thanks for helping!

  • Java Memory Management/Out of Memory

    Hi Guys,
    I have a few questions about java memory management
    Because i keep encounter a lot of out of memory error which i think java does not handle Vector/ArrayList re initialisation automatically
    Asumme i have 2 million record in database and , i will process every 80000 and store it in Vector
    while(true)
    list = new Vector();
    list = GetResultFromDatabase() // Process Every 80000
    if list.size() > 0 =======> My VEctor list contain 80000
    //loop the 800000
    //Process Some logic and data
    list.clear();
    list = null;
    If u See , i need to call list.clear and list = Null every process so it wont cause me out of memory
    Before i put that 2 lines , i always hit out of memory Exception.
    Seems like garbage collector cannot claim memory if i dont declare
    Is Memory Occupied by VEctor cannot be recoverable if we dont explitcitynya clear it and set it to NULL??
    Because in term of logic wise it wont cause a problem if i just
    do in this statement after it process like below
    list = new Vector() which will reinstatiate the object.
    Thanks.

    Damm i should hacve read your post again
    Look here:
    while(true)
    list = new Vector();What uer doing is craeting a new vector object everytime the while does an ityteration so when your while loop does 40000 loops there will be 40000 new objects in jou memory
    i sugest moving the decleration outside the while loop:
      list = new Vector();
    while(true)
    ///rest of loop
    } This could also be a problem
    hope it help :-)
    werns

  • Scaling images and Out of memory error

    Hi all,
    Does anyone knows why this code throws an out of memory error?
    It loads an image (2048x1166 pixels) and saves it at bufi1 (BufferedImage). After that:
    1- Rescale bufi1 to bufi13A (x3).
    2. Rescale bufi1 to bufi12 (x2).
    3. Rescale bufi1 to bufi13B (x3).
    At 3, the code throws an oome. Why?
    Thanks in advance!
    import java.io.*;
    import javax.imageio.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    public class TestScalePercent {
      public static void main(String[] args) {
        TestScalePercent tsp=new TestScalePercent();
        BufferedImage bufi1=null;
        try {
          bufi1 = ImageIO.read(new File("foo.png"));//2048x1166 pixels
        } catch (Exception e){
          e.printStackTrace();
        BufferedImage bufi13A=tsp.scale(bufi1,3,3);//--> OK
        BufferedImage bufi12=tsp.scale(bufi1,2,2);//--> OK
        BufferedImage bufi13B=tsp.scale(bufi1,3,3);//-->OOM error!
      public BufferedImage scale(BufferedImage bufiSource, double scaleX, double scaleY){
        AffineTransform tx = new AffineTransform();
        tx.scale(scaleX,scaleY);
        AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
        BufferedImage bufiop=op.filter(bufiSource, null);//--> Creates the OOM error...
        return op.filter(bufiop, null);
    }

    How much memory does your machine have?
    That image is quite large. If my math is correct and
    assuming the image has 32-bit color the original
    image takes up 76.5 megs of memory by itself. Then
    you are trying to create three other versions of it.
    It isn't lying to you, it is indeed probably running
    out of memory to hold the images.OK. Now I'm wondering if is it possible to free memory between bufi13A - bufi12, and bufi12 - bufi13B? I've tried to invocate the garbbage collector but nothing happens...
    Thanks!

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

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

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

Maybe you are looking for

  • Flash Player crashes in Google Chrome

    Flash Player in Google Chrome constantly becomes unresponsive and crashes. On different games, both on facebook and zynga.com. I'm using the "bundled" version. Should I try a different version? If so what?

  • Yellow Discoloration

    Unless otherwise noted, your Submission should either be a technical support question or a technical support answer. Locked by an Apple Discussions Host I have a three week old Macbook. The plastic on the palm rest and on the screen bezel where you o

  • Oracle 10g FRM-41051 on a non-database text item with a LOV

    Hi all, I'm struggling with a problem I'm convinced must have a really simple solution, but for the life of me I can't figure it out! I have a data block called query. It is a non-DB block with a number of items, with either LOVs or drop down lists.

  • Truncate always checked for the some of the dimension tables

    Hi, I found common dimension tables across Finance,Supply Chain and Sales by querying in DAC. In the task level most of the target tables checked as Truncate For Full Load. but some of the tables defined as truncate always, why they defined as trunca

  • CFCHART xml attributes

    I have CFMX7 and I've linked my cfchart to a custom xml style: <cfchart format="flash" style="jio_bar"> But other than adding placement="right" to the <legend isVisible="false" showColumnLegend="true"> tag, I have not been able to find a difinitive l