Urgent: Out of message Exception when parsing large message with JavaMail

I am using JavaMail to parse the message. If the size of the message I try to parse exceeds my memory setting, I will got the Out of memory error. I understand that, and it is reasonable.
The question I have is: At the time I try to parse the message, I only want to know what the displayable text content of the message and some information about the attachement files like the attchment file name, file type, and file size. So I want to parse the message to get only those information without the body of the attachment files. In this case, I can avoid the "Out of memory" exception in most case. Is there anyway to do this with JavaMail 1.2?
Thanks.

Hi try to read only the header information of the mail it will give you the details

Similar Messages

  • Array out of bounds exception when outputting array to file

    Could someone please tell me why i'm getting this array out of bounds exception?
    public class Assignment1 {
    public static void main(String[] names)throws IOException {
    BufferedReader keyboard = null;
    String userChoice;
    String inputFile = null;
    String studentData;
    String searchFile = null;
    String searchName;
    String stringIn;
    PrintWriter outputFile;
    FileWriter fWriter = null;
    BufferedReader fReader = null;
    int first;
    int last;
    int mid;
    int midValue;
    int i;
    int number;
    // creates keyboard as a buffered input stream
    keyboard = new BufferedReader(new InputStreamReader(System.in));
    //prompts user to choose 1 or 2 to make a corresponding choice
    System.out.println("Please Enter: ");
    System.out.println("1 to Create a File: ");
    System.out.println("2 to Search a File: ");
    userChoice = keyboard.readLine(); //user enters 1 or 2
    // converts a String into an int value
    number = Integer.parseInt(userChoice);
    fReader = new BufferedReader(new FileReader("studentData.txt"));
    if (number == 1) {          
    System.out.println("Please Enter the File Name to Create: ");
    studentData = keyboard.readLine();
    File file = new File("studentData.txt");
    fWriter = new FileWriter("studentData.txt");
    outputFile = new PrintWriter(fWriter);
    names = new String[200];
    i=0;
    //keep looping till sentinel
    while (studentData != "end" && studentData != null &&
    i < names.length) {
    if (studentData.equals("end")) break; //break and call sort
    System.out.println("Enter a name and press Enter. " +
    "Type 'end' and press Enter when done: ");
    studentData = keyboard.readLine();
    //loop for putting the names into the array
    for(i=0; i<names.length; i++) ;
    outputFile.println(names);
    } [b]outputFile.close();

    package assignment1;
    import java.io.*;
    import java.util.*;
    public class Assignment1 {
        public static void main(String[] names)throws IOException {
           BufferedReader keyboard = null;
           String userChoice;
           String inputFile = null;
           String studentData;
           String searchFile = null;
           String searchName;
           String stringIn;
           PrintWriter outputFile;
           FileWriter fWriter = null;
           BufferedReader fReader = null;
           int first;
           int last;
           int mid;
           int midValue;
           int i;
           int number;
           // creates keyboard as a buffered input stream
           keyboard = new BufferedReader(new InputStreamReader(System.in));
           //prompts user to choose 1 or 2 to make a corresponding choice
           System.out.println("Please Enter: ");
           System.out.println("1 to Create a File: ");
           System.out.println("2 to Search a File: ");
           userChoice = keyboard.readLine();    //user enters 1 or 2
           // converts a String into an int value
           number = Integer.parseInt(userChoice); 
           fReader = new BufferedReader(new FileReader("studentData.txt"));
           if (number == 1) {          
               System.out.println("Please Enter the File Name to Create: ");
               studentData = keyboard.readLine();
               File file = new File("studentData.txt");
               fWriter = new FileWriter("studentData.txt");
               outputFile = new PrintWriter(fWriter);
               names = new String[200];
               i=0;
                //keep looping till sentinel
                while (studentData.equals("end") && studentData != null &&
                       i < names.length) {
                   if (studentData.equals("end")) break;   //break and call sort
                   System.out.println("Enter a name and press Enter. " +
                                       "Type 'end' and press Enter when done: ");
                    studentData = keyboard.readLine();
                    //loop for putting the names into the array
                    for(i=0; i<names.length; i++) ;
                    outputFile.println(names);
    } outputFile.close();
    //call selectionSort() to order the array
         selectionSort(names);
         // Now output to a file.
    fWriter = new FileWriter("studentData.txt");
    outputFile = new PrintWriter(fWriter);
    } else if (number == 2) {
    System.out.println("Please Enter a File Name to search: ");
    searchFile = keyboard.readLine();
    inputFile = ("studentData.txt");
    } if (searchFile == "studentData.txt") {                      
    // Input from a file. See input file streams.
    fReader = new BufferedReader(new FileReader("studentData.txt"));
    System.out.println("Please enter a Name to search for: ");
    searchName = keyboard.readLine();
    //enter binary search code
    first = 0;
    last = 199;
    while (first < last)
    mid = (first + last)/2; // Compute mid point.
    if (searchName.compareTo(names[mid]) < 0) {
    last = mid; // repeat search in bottom half.
    } else if (searchName.compareTo(names[mid]) > 0) {
    first = mid + 1; // Repeat search in top half.
    } else {
    // Found it.
    System.out.println("The Name IS in the file.");
    } // did not find it.
    System.out.println("The Name IS NOT in the file.");
    } else //if userChoice != 1 or 2, re-prompt then start over
    System.out.println("Please Enter 1 or 2 or correctly " +
    "enter an existing file!!");
    // fWriter = new FileWriter("studentdata.txt");
    //outputFile = new PrintWriter(fWriter); //output
    public static void selectionSort(String[] names) {
    //use compareTo!!!!
    int smallIndex;
    int pass, j = 1, n = names.length;
    String temp;
    for (pass = 0; pass < n-1; pass++)
    //Code for Do/While Loop
    do {
    //scan the sublist starting at index pass
    smallIndex = pass;
    //jtraverses sublist names[pass+1] to names[n-1]
    for (j = pass+1; j < n; j++)
    //if smaller string found, smallIndex=that position
    if (names[j].compareTo(names[smallIndex]) < 0)
    smallIndex = j;
    temp = names[pass]; //swap
    names[pass] =names[smallIndex];
    names[smallIndex] = temp;
    } while (j <= names.length);
    //File file = new File("studentData.txt");
    This is the output window:
    init:
    deps-jar:
    compile:
    run:
    Please Enter:
    1 to Create a File:
    2 to Search a File:
    1
    Please Enter the File Name to Create:
    test
    Exception in thread "main" java.lang.NullPointerException
    at assignment1.Assignment1.selectionSort(Assignment1.java:134)
    at assignment1.Assignment1.main(Assignment1.java:73)
    Java Result: 1
    BUILD SUCCESSFUL (total time: 9 seconds)

  • Contacts are gone...except when composing a message?

    Backstory:
    I originally got my iPhone 4S in June of last year. Before moving to iOS, I used Android. To get my contacts to show up on my 4S I added a "CardDAV" account to sync my contacts from my google account to my iPhone. In October of last year, the account password was reset and I lost access to the account. Every time I entered the contacts app, the phone would prompt me to enter the password for my CardDAV account. This persisted for about two months, and then the phone finally just stopped asking me for the account password.
    A couple weeks ago, I went to my iCloud settings and flipped the "Contacts" sync to on.. because I planned on upgrading my phone soon. Fast forward to yesterday, I delete the CardDAV account from my settings because it hasn't synced my contacts with Google for over a year. As soon as I delete the CardDAV account, all of my contacts disappear. My contacts app says I have no contacts. I went to iCloud to see if my contacts were backed up like I told it to, and there is only one entry in my contacts, which is myself. Since iCloud didn't save my contacts like I thought it was doing, I finally guessed my password and was able to login to my Google account. After looking, the last time it synced my contacts was October of last year.
    If neither iCloud or Google was saving my contacts... where did they go, and how do I get them back?
    Thank you for your help!

    EDIT: Sorry, I forgot to add what I mentioned in the title. While trying to move around my phone to try and find out where my contacts may be, I found that if I go to the messaging app and compose a message, I can type a contacts name in and send them a message as long as I have a thread in the app with them. In the app itself, all of my message threads still show up as phone numbers.

  • Systemd and journal - no messages, except when prompted: possible?

    Hi,
    I'm looking for an alternative for plymouth - which isn't working properly here - for a 'clean' boot and shutdown. I have managed to modify:
    MaxLevelConsole=emerg
    On /etc/systemd/journald.conf to minimize console messages at boot, but still, there are some... I was wondering if it is possible for journald to spit console messages only when user interaction is actually needed (for example when fsck requests to be ran manually)?
    Last edited by lmello (2013-06-21 19:08:47)

    Hi RandomGrin, 
    Maybe option 2.”Disable the HP Digital photography options” will help.  Further details can be found on the following Link. 
    Best Regards,
    Tom_S
    Although I am an HP employee, I am speaking for myself and not for HP.
    Click "Accept as Solution" if it solved your problem, so others can find it.
    Click the KUDOS Thumbs Up on the left to say “Thanks” for helping!
    I work for HP, supporting the HP Experts.

  • How to get the filename when parsing a file with d3l

    All
    After some time have experience with interconnect, IStudio I need the following info. Is it possible to get the filename when parsing a flat file using a d3l? This is needed because we need to store the filename together with the data into the database.
    Any examples or directions to some documents are welcome.
    Regards
    Olivier De Groef

    has anyone some info on this

  • Illustrator CS6 (Mac) crashes when opening large documents with drop shadows

    I have a Macbook Pro ver. 10.6.8 i7 Core, 8 Gb Ram, and I am running Adobe Illustrator CS6.
    I have a document that is 18" x 42" and contains drop shadows. It was created using CS6.
    When I apply a graphic style (gradient and drop shadow) It has a progress bar that says "Drop Shadow" and it fills up and freezes. I recreated the document, and I am having the same issue repeatedly.
    In order to do what I needed, I had to ungroup the letters recieving the graphic style and apply it to each letter individually. If I try applying it to more than one object, the freeze happens again.
    I saved the file I created, and now I can not open it. On load it has a progress bar that says "Drop Shadow" and it fills up and freezes.
    I can open the same document in CS4 on the same system with no issues, it takes less than 5 seconds to load.
    What is going on?

    That's a good idea, but it was already set at the lowest resolution, so no luck, still freezes.
    The worst part is that when you open it in CS4, it does that weird layer grouping/clipping mask thing with the layers so you can't easily edit the file, if I save the file in the legacy version CS4 and open it in CS6, it retains the strange layer grouping. Although it does open it still doesnt solve my problem because now I just have a horrible to manage file.
    PS has anyone figured out how to fix the layer grouping issue with legacy (Cs4 and below) Illustrator files?

  • Error when parsing SOAP message from JSP

    i write a class to call SOAP message from a servlet on jdev 1013
    when i run the class alone it works fine
    soapMessage = this.buildSOAPMessagee();
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    soapMessage.writeTo(output);
    SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
    SOAPConnection conn = connf.createConnection();
    SOAPMessage smsg= conn.callsoapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
    smsg.writeTo(out);
    but when running same class same method from jsp page...i have Exception
    javax.xml.soap.SOAPException: Unable to get header stream in saveChanges     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686)     at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702)     at test.test2.ret(test2.java:341)     at untitled1.jspService(_untitled1.java:45)     [untitled1.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.io.IOException: SOAP exception while trying to externalize: Error parsing envelope: (1, 1) Start of root element expected.     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:220)     at oracle.j2ee.ws.saaj.soap.MessageImpl.getHeaderBytes(MessageImpl.java:522)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:574)     ... 23 moreCaused by: javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected.     at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:104)     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:76)     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:215)     ... 25 moreCaused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.     at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)     at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:333)     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)     at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:78)     ... 27 more
    dose anybody can help why that happend when running the code from JSP

    i write a class to call SOAP message from a servlet on jdev 1013
    when i run the class alone it works fine
    soapMessage = this.buildSOAPMessagee();
    ByteArrayOutputStream output = new ByteArrayOutputStream();
    soapMessage.writeTo(output);
    SOAPConnectionFactory connf = SOAPConnectionFactory.newInstance();
    SOAPConnection conn = connf.createConnection();
    SOAPMessage smsg= conn.callsoapMessage, "http://190.0.0.16:8988/mmsc/httpReceiver");
    smsg.writeTo(out);
    but when running same class same method from jsp page...i have Exception
    javax.xml.soap.SOAPException: Unable to get header stream in saveChanges     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:576)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:622)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChanges(MessageImpl.java:686)     at oracle.j2ee.ws.saaj.soap.MessageImpl.writeTo(MessageImpl.java:702)     at test.test2.ret(test2.java:341)     at untitled1.jspService(_untitled1.java:45)     [untitled1.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.0.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:60)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:416)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:719)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:376)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:218)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:119)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:230)     at oracle.oc4j.network.ServerSocketAcceptHandler.access$800(ServerSocketAcceptHandler.java:33)     at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:831)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.0.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)     at java.lang.Thread.run(Thread.java:595)Caused by: java.io.IOException: SOAP exception while trying to externalize: Error parsing envelope: (1, 1) Start of root element expected.     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:220)     at oracle.j2ee.ws.saaj.soap.MessageImpl.getHeaderBytes(MessageImpl.java:522)     at oracle.j2ee.ws.saaj.soap.MessageImpl.saveChangesMimeEncoded(MessageImpl.java:574)     ... 23 moreCaused by: javax.xml.soap.SOAPException: Error parsing envelope: (1, 1) Start of root element expected.     at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:104)     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:76)     at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getContentAsStream(SOAPPartImpl.java:215)     ... 25 moreCaused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.     at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:320)     at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:333)     at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:295)     at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:201)     at oracle.j2ee.ws.saaj.soap.soap11.SOAPImplementation11.createEnvelope(SOAPImplementation11.java:78)     ... 27 more
    dose anybody can help why that happend when running the code from JSP

  • Why i'm getting out of memory exception when trying to comparing two Lists ?

    First this is a paint event.
    In the paint event i draw a rectangle and then adding the pixels coordinates inside the rectangle area to a List:
    private void pictureBox1_Paint(object sender, PaintEventArgs e)
    if (cloudPoints != null)
    if (DrawIt)
    e.Graphics.DrawRectangle(pen, rect);
    pointsAffected = cloudPoints.Where(pt => rect.Contains(pt));
    CloudEnteringAlert.pointtocolorinrectangle = pointsAffected.ToList();//cloudPoints;
    Bitmap bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height, PixelFormat.Format32bppArgb);
    CloudEnteringAlert.Paint(e.Graphics, 1, 200, bmp);
    I'm drawing a rectangle thats the rect(Rectangle) variable and assigning to pointsAffected List only the pixels coordinates that are inside the rect area ! cloudPoints contain all the pixels coordinates all over the image !!! but pointsAffected contain only
    the coordinates of pixels inside the rectangle area.
    Then the mouse up event:
    private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
    StreamWriter w = new StreamWriter(@"c:\diff\diff.txt");
    pixelscoordinatesinrectangle = new List<Point>();
    pixelscoordinatesinrectangle = pointsAffected.ToList();
    DrawIt = false;
    for (int i = 0; i < trackBar1FileInfo.Length; i++)
    DrawIt = true;
    trackBar1.Value = i;
    LoadPictureAt(trackBar1.Value, sender);
    pictureBox1.Load(trackBar1FileInfo[i].FullName);
    ConvertedBmp = ConvertTo24(trackBar1FileInfo[trackBar1.Value].FullName);
    ConvertedBmp.Save(ConvertedBmpDir + "\\ConvertedBmp.bmp");
    mymem = ToStream(ConvertedBmp, ImageFormat.Bmp);
    backTexture = TextureLoader.FromStream(D3Ddev, mymem);
    scannedCloudsTexture = new Texture(D3Ddev, 512, 512, 1, Usage.Dynamic, Format.A8R8G8B8, Pool.Default);
    Button1Code();
    pictureBox1.Refresh();
    newpixelscoordinates = new List<Point>();
    newpixelscoordinates = pointsAffected.ToList();
    if (pixelscoordinatesinrectangle != null && newpixelscoordinates != null)
    IEnumerable<Point> differenceQuery =
    pixelscoordinatesinrectangle.Except(newpixelscoordinates);
    // Execute the query.
    foreach (Point s in differenceQuery)
    w.WriteLine("The following points are not the same" + s);
    else
    am1 = pixelscoordinatesinrectangle.Count;
    am2 = newpixelscoordinates.Count;
    //MessageBox.Show(pixelscoordinatesinrectangle.Count.ToString());
    w.Close();
    Once i draw the rectangle when finish drawing it i'm creating a new List instance and store the pixels in the rectangle area in the pixelscoordinatesinrectangle List.
    Then i loop over trackBar1FileInfo that contains for example 5000 images files names from the hard disk.
    This is the problem part:
    pictureBox1.Refresh();
    newpixelscoordinates = new List<Point>();
    newpixelscoordinates = pointsAffected.ToList();
    if (pixelscoordinatesinrectangle != null && newpixelscoordinates != null)
    IEnumerable<Point> differenceQuery =
    pixelscoordinatesinrectangle.Except(newpixelscoordinates);
    // Execute the query.
    foreach (Point s in differenceQuery)
    w.WriteLine("The following points are not the same" + s);
    else
    am1 = pixelscoordinatesinrectangle.Count;
    am2 = newpixelscoordinates.Count;
    I'm doing refresh for the pictureBox1 so it will go one each image to the paint event and will create a new List pointsAffected will have each time a different pixels coordinates.
    So newpixelscoordinates should be with new pixels coordinates each loop itertion.
    Then i'm comparing both Lists newpixelscoordinates and pixelscoordinatesinrectangle for a different items.
    And write those who are not the same to a text file.
    So i'm getting a very large text file with many pixels coordinates that are not the same in both Lists.
    The problems are:
    1. Does the comparison i'm doing is right ? I want to compare one list index against other listi ndex.
       For example in the List newpixelscoordinates in index 0 if i have x = 233 y = 23 and in the List pixelscoordinatesinrectangle in index 0 there is x = 1 y = 100 then write this as not the same to the text file.
      What i want to do is to check the whole List items against the other List items and if some of the items are not the same write this items to the text file.
    Next itertion new image new Lists with new pixels coordinates do the same comparison.
    The List pixelscoordinatesinrectangle is not changing it's storing the first pixels coordinates when i drawed the rectangle first time. Only the List newpixelscoordinates change each time, Should change each itertion.
    2. The exception i'm getting is on the line:
    newpixelscoordinates = new List<Point>();
    I added this line since i thought maybe i didn't clear it each time but it didn't help.
    Before adding this line the exception was on the line:
    newpixelscoordinates = pointsAffected.ToList();
    The exception is: OutOfMemoryException: Out of memory
    System.OutOfMemoryException was unhandled
    HResult=-2147024882
    Message=Out of memory.
    Source=System.Drawing
    StackTrace:
    at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
    at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
    at System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
    at System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
    at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
    at System.Windows.Forms.Control.WmPaint(Message& m)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    InnerException:

    Hi Chocolade1972,
    >> Does the comparison i'm doing is right ? I want to compare one list index against other listi ndex.
    I think you could use “Object.Equals” and the link below might be useful to you:
    # Object.Equals Method (Object)
    https://msdn.microsoft.com/en-us/library/bsc2ak47(v=vs.110).aspx
    >> OutOfMemoryException: Out of memory
    This error is very common, and when there is not enough memory to continue the execution of a program, it would be thrown.
    It would be helpful if you could provide us a simple code to reproduce your issue.
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • When sending large messages through iMail, they disappear from the Sent fol

    This is a peculiar problem that we only see with our (only) Mac/iMail user. The client is iMail that uses IMAP/SMTP to comm with our Exchange server. The iMail user is able to send and receive email just fine. However, we just noticed that whenever he sends messages with large attachments (at least a couple of MB), the messages appear briefly in his Sent folder but then immediately disappear. We do know that the recipients receive the message. We did not find any rules in iMail that would cause that to happen, and the Exchanger server is not setup to do anything with messages based on size. We can send a message with the same attachments (and resulting size) from Outlook and Thunderbird clients, and the message stays in the Sent folders in those.
    Thanks for any advice
    MJ

    I'm not sure if this is the same problem, but I'd also welcome advice: I'm trying to send an email via Mail, with quite a large attachment. I've made a .zip file of it to try to save space; however, when I click on 'Send', it appears in my Outbox - but never makes it into the Send box.
    I can't fathom why this would be - if anyone has any suggestions - especially for how to send this thing! it's quite urgent! - I'd be really grateful.

  • Exception when parsing schema with XJC

    Using the command "xjc -d C:\Temp -p sbxml C:\Temp\sb2.xsd" in attempt to generate java classes for my schema I get the error below. The schema is well-formed and valid according to XMLSpy. The schema in question is found below the error. Thanks.
    Mark
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
    at com.sun.msv.verifier.identity.IDConstraintChecker.feedAttribute(IDConstraintChecker.java:218)
    at com.sun.msv.verifier.Verifier.startElement(Verifier.java:204)
    at org.iso_relax.verifier.impl.VerifierFilterImpl.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
    at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:874)
    at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:591)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScanner
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
    at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:371)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:151)
    at com.sun.xml.xsom.impl.parser.XSOMParser.parse(XSOMParser.java:116)
    at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:511)
    at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
    at com.sun.tools.xjc.Driver.run(Driver.java:268)
    at com.sun.tools.xjc.Driver.main(Driver.java:88)
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- edited with XMLSPY v5 U (http://www.xmlspy.com) by Mark (CMH) -->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:element name="INFO_EX">
              <xs:annotation>
                   <xs:documentation>Collection of data for any number of days</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="DAILY_INFO" minOccurs="0" maxOccurs="unbounded">
                             <xs:annotation>
                                  <xs:documentation>Collection of data for all areas for a single day</xs:documentation>
                             </xs:annotation>
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="AREA_INFO" type="AREA_INFO_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                                  </xs:sequence>
                                  <xs:attribute name="DATE_TODAY" type="xs:date" use="required"/>
                             </xs:complexType>
                        </xs:element>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="AREA_INFO_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of data for a single area for a single day</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="FIELD_OBS" type="FIELD_OBS_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="AVALANCHE" type="AV_TYPE" minOccurs="0" maxOccurs="unbounded"/>
                   <xs:element name="NOTABLE" type="NOTABLE_TYPE" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
              <xs:attribute name="AREA_ABBREV" type="AREA_ABBREV_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="FIELD_OBS_TYPE">
              <xs:annotation>
                   <xs:documentation>Collection of a day's field observations</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE"/>
                   <xs:element name="SKY_PM" type="SKY_TYPE"/>
                   <xs:element name="SKY_AM" type="SKY_TYPE"/>
                   <xs:element name="SKI_ELEV_MAX" type="xs:unsignedShort"/>
                   <xs:element name="SKI_ELEV_MIN" type="xs:unsignedShort"/>
                   <xs:element name="SKI_METERS" type="xs:unsignedShort"/>
                   <xs:element name="SKI_QUALITY">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="P"/>
                                  <xs:enumeration value="F"/>
                                  <xs:enumeration value="G"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="HI_TEMP" type="xs:decimal"/>
                   <xs:element name="LO_TEMP" type="xs:decimal"/>
                   <xs:element name="XPORT_AM" type="TRANSPORT_TYPE"/>
                   <xs:element name="XPORT_PM" type="TRANSPORT_TYPE"/>
                   <xs:element name="HN24" type="xs:int"/>
                   <xs:element name="FO_DATE" type="xs:date" minOccurs="0"/>
                   <xs:element name="W_SPD_AM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="W_SPD_PM" type="WIND_SPEED_TYPE"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="AV_ACTIVITY" type="xs:string"/>
                   <xs:element name="PRECIP_AM" type="PRECIP_TYPE"/>
                   <xs:element name="PRECIP_PM" type="PRECIP_TYPE"/>
                   <xs:element name="FO_REMARK" type="xs:string"/>
                   <xs:element name="NIL_NEW" type="xs:boolean"/>
                   <xs:element name="PERCENT_OBS" type="xs:unsignedShort"/>
                   <xs:element name="HS" type="xs:integer"/>
                   <xs:element name="W_DIR_AM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="W_DIR_PM" type="WIND_DIRECTION_TYPE"/>
                   <xs:element name="SFC2" type="SURFACE_TYPE"/>
                   <xs:element name="SFC1" type="SURFACE_TYPE"/>
                   <xs:element name="XPORT_DIR_AM" type="TRANSPORT_DIRECTION_TYPE"/>
                   <xs:element name="XPORT_DIR_PM" type="TRANSPORT_DIRECTION_TYPE"/>
              </xs:sequence>
              <xs:attribute name="FO_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="NOTABLE_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a notable event</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="AV_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="PARTY_SIZE" type="xs:unsignedShort"/>
                   <xs:element name="CAUGHT" type="xs:unsignedShort"/>
                   <xs:element name="PARTLY_BURIED" type="xs:unsignedShort"/>
                   <xs:element name="BURIED" type="xs:unsignedShort"/>
                   <xs:element name="INJURED" type="xs:unsignedShort"/>
                   <xs:element name="FATALITIES" type="xs:unsignedShort"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="NTBL_IMG" type="xs:hexBinary" minOccurs="0"/>
                   <xs:element name="NTBL_TIME" type="xs:time"/>
                   <xs:element name="NTBL_DATE" type="xs:date"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="NTBL_GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
              </xs:sequence>
              <xs:attribute name="NOTABLE_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:complexType name="AV_TYPE">
              <xs:annotation>
                   <xs:documentation>Data concerning a single avalanche</xs:documentation>
              </xs:annotation>
              <xs:sequence>
                   <xs:element name="LENGTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="LENGTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="REMARK" type="xs:string"/>
                   <xs:element name="LWC">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Dry"/>
                                  <xs:enumeration value="Moist"/>
                                  <xs:enumeration value="Wet"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_SIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:float">
                                  <xs:minInclusive value="1"/>
                                  <xs:maxInclusive value="5"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="SKIABLE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Y"/>
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="N-Y"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="GEO_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="NUM">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:pattern value="[0-9]*"/>
                                  <xs:pattern value="Sev"/>
                                  <xs:pattern value="Num"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WIDTH_MIN" type="xs:unsignedInt"/>
                   <xs:element name="WIDTH_MAX" type="xs:unsignedInt"/>
                   <xs:element name="MAIN_IMGLINK_ID" type="SB_ID_TYPE" minOccurs="0"/>
                   <xs:element name="THICK_MAX" type="xs:unsignedInt"/>
                   <xs:element name="THICK_MIN" type="xs:unsignedInt"/>
                   <xs:element name="DTMOD" type="xs:dateTime"/>
                   <xs:element name="TYPE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Slab"/>
                                  <xs:enumeration value="Loose"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_DATE" type="xs:date"/>
                   <xs:element name="AV_TIME" type="xs:time"/>
                   <xs:element name="AV_TRIGGER">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="15"/>
                                  <xs:pattern value="N[aci].*|S[acry].*|H[acry].*|X[hcryer].*"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="BEDSFC_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="RG"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="CR"/>
                                  <xs:enumeration value="IM"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="AV_LEVEL">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="Old"/>
                                  <xs:enumeration value="Storm"/>
                                  <xs:enumeration value="Ground"/>
                                  <xs:enumeration value="Glacier"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ASPECT">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="N"/>
                                  <xs:enumeration value="NE"/>
                                  <xs:enumeration value="E"/>
                                  <xs:enumeration value="SE"/>
                                  <xs:enumeration value="S"/>
                                  <xs:enumeration value="SW"/>
                                  <xs:enumeration value="W"/>
                                  <xs:enumeration value="NW"/>
                                  <xs:enumeration value="All"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_DATE"/>
                   <xs:element name="TIMERANGE" type="xs:unsignedInt"/>
                   <xs:element name="INCLINE">
                        <xs:simpleType>
                             <xs:restriction base="xs:unsignedInt">
                                  <xs:minInclusive value="0"/>
                                  <xs:maxInclusive value="180"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="ELEV_MIN" type="xs:unsignedInt"/>
                   <xs:element name="ELEV_MAX" type="xs:unsignedInt"/>
                   <xs:element name="AV_CUTBLOCK">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="1"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="LOC_DESCRIPTION">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:maxLength value="30"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="WKLYR_FORMANDSIZE">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="PP"/>
                                  <xs:enumeration value="SH"/>
                                  <xs:enumeration value="FC"/>
                                  <xs:enumeration value="DF"/>
                                  <xs:enumeration value="WG"/>
                                  <xs:enumeration value="DH"/>
                                  <xs:enumeration value=""/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:element>
                   <xs:element name="NTBL" type="xs:boolean"/>
              </xs:sequence>
              <xs:attribute name="AV_ID" type="SB_ID_TYPE" use="required"/>
         </xs:complexType>
         <xs:simpleType name="SB_ID_TYPE">
              <xs:annotation>
                   <xs:documentation>Reference type</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:maxLength value="10"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="AREA_ABBREV_TYPE">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="AD"/>
                   <xs:enumeration value="BB"/>
                   <xs:enumeration value="BU"/>
                   <xs:enumeration value="BA"/>
                   <xs:enumeration value="CA"/>
                   <xs:enumeration value="GL"/>
                   <xs:enumeration value="GO"/>
                   <xs:enumeration value="MO"/>
                   <xs:enumeration value="MB"/>
                   <xs:enumeration value="RE"/>
                   <xs:enumeration value="KO"/>
                   <xs:enumeration value="VA"/>
                   <xs:enumeration value="ST"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SKY_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of sky observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="CLR"/>
                   <xs:enumeration value="OVC"/>
                   <xs:enumeration value="BKN"/>
                   <xs:enumeration value="SCT"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="PRECIP_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts choices of precipation observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="NIL"/>
                   <xs:enumeration value="S-1"/>
                   <xs:enumeration value="S1"/>
                   <xs:enumeration value="S2"/>
                   <xs:enumeration value="S3"/>
                   <xs:enumeration value="S4"/>
                   <xs:enumeration value="RV"/>
                   <xs:enumeration value="RL"/>
                   <xs:enumeration value="RH"/>
                   <xs:enumeration value="RS"/>
                   <xs:enumeration value="G"/>
                   <xs:enumeration value="ZR"/>
                   <xs:enumeration value=""/>
                   <xs:enumeration value="RM"/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_SPEED_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of wind speed observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="C"/>
                   <xs:enumeration value="L"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="X"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Enumeration of directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="TRANSPORT_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of transport observations</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Nil"/>
                   <xs:enumeration value="Prv"/>
                   <xs:enumeration value="M"/>
                   <xs:enumeration value="I"/>
                   <xs:enumeration value="U"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="SURFACE_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts the choices of the surface descriptions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="PP"/>
                   <xs:enumeration value="DF"/>
                   <xs:enumeration value="RG"/>
                   <xs:enumeration value="FC"/>
                   <xs:enumeration value="DH"/>
                   <xs:enumeration value="WG"/>
                   <xs:enumeration value="SH"/>
                   <xs:enumeration value="IM"/>
                   <xs:enumeration value="CR"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
         <xs:simpleType name="WIND_DIRECTION_TYPE">
              <xs:annotation>
                   <xs:documentation>Restricts possible observed wind directions</xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:enumeration value="N"/>
                   <xs:enumeration value="NE"/>
                   <xs:enumeration value="E"/>
                   <xs:enumeration value="SE"/>
                   <xs:enumeration value="S"/>
                   <xs:enumeration value="SW"/>
                   <xs:enumeration value="W"/>
                   <xs:enumeration value="NW"/>
                   <xs:enumeration value="V"/>
                   <xs:enumeration value=""/>
              </xs:restriction>
         </xs:simpleType>
    </xs:schema>

    myhrem, I've just come across exactly the same problem after amemding my schema. Fortunatley I hadn't changed much so it was possible to find out what caused the error. It is the empty enumeration element where value is equal to "" that causes xjc to throw the error.
    I don't know if its right or wrong, in my case I was able to remove the empty element from the xsd.

  • Error message -36 when copying large  files from Firewire drive

    I have kept several large audio files as backup on an external LaCie Firewire drive. When trying to copying them back, almost all of them starts to copy, then stops and (after a minute or so) report error message -36.
    I have run both Apple's Disktools and the latest Diskwarrior, but no errors are reported. I gues the audio files must have become corrupted... What do you suggest that I do? The contain valuable audio information that I really don't want to get lost.
    Helge K.

    Not helping but others are having the same problem...
    http://discussions.apple.com/thread.jspa?messageID=2564624

  • Out of memory error when writing large file

    I have the piece of code below which works fine for writing small files, but when it encounters much larger files (>80M), the jvm throws an out of memory error.
    I believe it has something to do with the Stream classes. If I were to replace my PrintStream reference with the System.out object (which is commented out below), then it runs fine.
    Anyone else encountered this before?
         print = new PrintStream(new FileOutputStream(new File(a_persistDir, getCacheFilename()),
                                                                false));
    //      print = System.out;
              for(Iterator strings = m_lookupTable.keySet().iterator(); strings.hasNext(); ) {
                   StringBuffer sb = new StringBuffer();
                   String string = (String) strings.next();
                   String id = string;
                   sb.append(string).append(KEY_VALUE_SEPARATOR);
                   Collection ids = (Collection) m_lookupTable.get(id);
                   for(Iterator idsIter = ids.iterator(); idsIter.hasNext();) {
                        IBlockingResult blockingResult = (IBlockingResult) idsIter.next();
                        sb.append(blockingResult.getId()).append(VALUE_SEPARATOR);
                   print.println(sb.toString());
                   print.flush();
    } catch (IOException e) {
    } finally {
         if( print != null )
              print.close();
    }

    Yes, my first code would just print the strings as I got them. But it was running out of memory then as well. I thought of constructing a StringBuffer first because I was afraid that the PrintStream wasn't allocating the memory correctly.
    I've also tried flushing the PrintStream after every line is written but I still run into trouble.

  • Out of memory error when creating large matrix

    hello,
    i have to create a matrix of 100000 cols and 10000 rows for store numeric values, 0 and 1, but when the program is executing , the error "outofmemory no stack trace available" appear.
    �how can I resolve this? Is neccesary to modify the JVM?
    Urgent !!!!!!!!!!!!!!!
    Thanks in advance.

    Which is 125 MiB of memory, minimum.Doesn't follow:
    http://en.wikipedia.org/wiki/Sparse_matrix
    If this were for sparse data a simple list of Integers would represent the same data just as effectively as a matrix.
    If the data is not sparse, a one-dimensional byte array would be my choice.

  • Getting javax.mail.internet.ParseException when parsing MIME message

    Hi All,
    The MIME Content Type is as below.
    Content-Type: application/pdf;
    name="ecm-000669.pdf";
    Content-Disposition: attachment;
    filename="ecm-000669.pdf";
    When executing the following statement
    ContentType ct = new ContentType(contentType);
    where contentType is application/pdf;
    name="ecm-000669.pdf";
    Getting the below error
    javax.mail.internet.ParseException
         at javax.mail.internet.ParameterList.<init>(ParameterList.java:61)
         at javax.mail.internet.ContentType.<init>(ContentType.java:83)
         at oracle.apps.fnd.wf.common.MIMEUtils.handleContent(MIMEUtils.java:488)
         at oracle.apps.fnd.wf.mailer.EmailParser.processSingleContent(EmailParser.java:1851)
         at oracle.apps.fnd.wf.mailer.EmailParser.parseBody(EmailParser.java:2166)
         at oracle.apps.fnd.wf.mailer.EmailParser.parseEmail(EmailParser.java:1195)
         at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processSingleMessage(IMAPResponseHandler.java:255)
         at oracle.apps.fnd.wf.mailer.IMAPResponseHandler.processMessage(IMAPResponseHandler.java:92)
         at oracle.apps.fnd.cp.gsc.SvcComponentProcessor.process(SvcComponentProcessor.java:659)
         at oracle.apps.fnd.cp.gsc.Processor.run(Processor.java:283)
         at java.lang.Thread.run(Thread.java:534)
    The error is not happening when I remove the semi colon at the end of content-type header as shown below
    Content-Type: application/pdf;
    name="ecm-000669.pdf"
    Can you please tell that semi colon at the end of Content-Type header is not supported in MIME standard? This MIME is coming from the rediff email client. Is there any parameter in Java Mail API to avoid these kind of issues?

    Yes, a trailing semicolon violates the MIME syntax spec.
    You can work around this bug in the client by setting the System property "mail.mime.parameters.strict" to "false",
    as described here: http://javamail.kenai.com/nonav/javadocs/javax/mail/internet/package-summary.html

  • Font sizes for message change when  mailbox or message list is changed

    When changing the preferences for message font to something a bit more readable (ie, 14 pt), that doesn't seem to actually affect the message font size except on the message I am actually looking at at that instant. It always reverts back to size of the message list font!
    How do I get the message list to be smaller (ie 10 pt) and the message font to be bigger (ie 14 pt)? Changing the prefs doen't seem to do it.
    1.33 ghz 15 Alum G4 PB, 350 mhz G3 iMac, 2 ghz Dual G5   Mac OS X (10.4.8)  

    Thank you very much for sharing that information.  It is great to hear verification that the mask assignment change did resolve your problem.   That is the latest resolution that TAC has recommended, but we have to restart the WCCP service on all redundant edge routers to be able to implement this, so planning the outage window is taking some time.   We've been told that TAC will set this up in a lab and test for us by our Cisco SE.  We're hoping to get verfication that this actually resolves the problem before we take the outage.   
         If you could, can you tell me if this resolved the issue 100% or do you still have any performance issues when making a change to your WCCP ACL going to your bluecoat equipment?    We may also need to implement this in our redirects to BlueCoat from our Nexus.  Do you happen to have a link to how to make this change in Bluecoat?   Thanks again!

Maybe you are looking for

  • Error in Tax account determination

    Hi experts, When i am trying to release by billing document by using t-code VF02 i am getting error: "Error in account determination table T030K Key xxx MWS" I checked config but could not find any thing Can anyone help me to resolve this? thanks, Va

  • Images Not Being Saved as 16-bit

    Hello, We are using a Basler acA2000-340km camera.  I am able to capture frames in 10-bit and 12-bit pixel bit depth successfully.  However when I try to save those frames to disk they are only being saved in 8-bit format.  I tried using both .tif an

  • Mail is cutting my messages...

    I've used Mail for a long time and is very happy - but... Suddenly Mail is cutting my messages - started yesterday... Have anyone experienced this? It looks like an "end of file" is put in the middle of my message... In my sent box everything appears

  • Inspection for second operation

    hi all i have maintain inspection orgin 03 & 04 for sfg material in material master also in routing i have assign control key having inspection check box on for the 03 line item (0010,0020,0030). my first operation shows perfect inspection lot after

  • Field on Document Header using BAPI for posting

    Hi there. I need to fill the BKPF-BRNCH field (the Branch Number header field in transaction FB01) to post a document by means of the BAPI_ACC_DOCUMENT_POST function module, but I haven't find the field in the DOCUMENTHEADER table, and I can't figure