Leak memory in xerces DomParser

Hey,
I have " leak memory " in my Java application (Stand alone).
I suspect that this leak caused by xerces DomParser.
i reached to this conculsion after using in Jprobe as a memory debuger.
Does any one has a similar problem?
Thank you.
code:
DOMParser parser = new DOMParser();
parser.parse(new InputSource(new FileInputStream(schemaFile)));

Hey, which Version of Xerces do you use?

Similar Messages

  • Imapd service "Leak  Memory"

    I already have Java Communications Suite 6 Working , but, I have a Leak Memory problems with imapd process.
    I have the server with 30 imapd process, 30 mshttpd process, and 30 pop process running to balance the load of the users.
    All work fine(the CPU is 100% idle, the RAM is 80% available=6GB) when I access via browser(Chrome,Firefox), too when I access it with the traditional clients IMAP (Outlook, ThunderBird,etc).
    The problem is that if one user want to copy(not just view) locally all your emails to your laptops/pc, the imapd process eat more than 3GB(instead of 80MB) of RAM and the system is getting slower.
    If the user cancel this process(copy via IMAP all your emails) the process dont freedom doesn't release the memory and the system getting slower.
    Actually my solution is:
    # kill -9 <PID_imapd>
    Some times when I kill the process the problem going to other imapd process, so in this case the solution is:
    /opt/sun/comms/messaging/sbin/stop-msg
    /opt/sun/comms/messaging/sbin/start-msg
    I think that this problem is a bug but I dont know what is the patch.
    May you help me? Any idea?
    My system is:
    A X2100 with one socket AMD Opteron 2600Mhz, 8GB RAM, 2 x disks 750GB in mirror with Solaris Volume Manager, Soalris 10 HW 10/08.
    Thanks.
    Jaime

    Jorth, maybe we are not well explained,
    the normal operation of imapd process(one process) need no more that 200MB, when a user is linked to it.
    Check my example:
    ================================================================================================================
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
    818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
    607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
    16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
    798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
    *16673 mailsrv 220M 97M sleep 59 0 0:00:06 0.0% imapd/6*
    *16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
    *16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
    *16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
    *16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
    *16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
    *16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
    *16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
    *16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
    *902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
    NPROC USERNAME SWAP RSS MEMORY TIME CPU
    78 mailsrv 2439M 2329M 28% 0:11:53 0.5%
    14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
    136 root 965M 727M 8.9% 2:15:20 50%
    1 webservd 264M 326M 4.0% 0:16:43 0.3%
    1 noaccess 90M 100M 1.2% 0:01:13 0.0%
    Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
    ================================================================================================================
    When we run an aplication like OutLook to copy locally to the laptopn all the mail via IMAP, "ONE imapd process" eat more memory that need it and never released.
    Example:
    ================================================================================================================
    PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
    *16673 mailsrv 2856M 2534M sleep 59 0 0:00:06 45% imapd/6* <---------------this process eat memory and slow the system(CPU/RAM)
    874 root 610M 421M sleep 59 0 0:14:51 0.1% java/160
    818 webservd 413M 285M sleep 59 0 0:16:43 0.3% webservd/95
    607 root 326M 45M sleep 59 0 0:07:01 0.1% webservd/58
    16719 mailsrv 283M 50M sleep 59 0 0:00:06 0.0% imapd/5
    798 root 237M 37M sleep 59 0 0:04:04 0.1% ns-slapd/48
    *16677 mailsrv 210M 42M sleep 59 0 0:00:05 0.0% imapd/5*
    *16696 mailsrv 205M 36M sleep 59 0 0:00:04 0.0% imapd/5*
    *16695 mailsrv 200M 38M sleep 59 0 0:00:04 0.0% imapd/6*
    *16685 mailsrv 197M 38M sleep 59 0 0:00:08 0.0% imapd/5*
    *16682 mailsrv 195M 40M sleep 59 0 0:00:04 0.0% imapd/5*
    *16681 mailsrv 193M 46M sleep 59 0 0:00:04 0.0% imapd/5*
    *16690 mailsrv 187M 52M sleep 59 0 0:00:03 0.1% imapd/6*
    *16687 mailsrv 187M 40M sleep 59 0 0:00:05 0.0% imapd/5*
    *902 icsuser 185M 24M sleep 59 0 0:00:05 0.0% cshttpd/2*
    NPROC USERNAME SWAP RSS MEMORY TIME CPU
    78 mailsrv 2439M 2329M 80% 0:00:5 0.5%
    78 mailsrv 2439M 2329M 10% 0:11:53 0.5%
    14 icsuser 1064M 233M 2.8% 0:06:55 0.0%
    136 root 965M 727M 8.9% 2:15:20 50%
    1 webservd 264M 326M 4.0% 0:16:43 0.3%
    Total: 237 processes, 1042 lwps, load averages: 1.91, 1.90, 1.89
    ===================================================================================================
    The rest of the imapd process(29) in this moment just load 40-50MB(when those are free).
    If we kill the process 16673 the user connect to the next imapd process and the problem persist whit the same patology: eat memory and CPU, and slow the system.
    So, we think that is not normal and maybe we need patch the system to solve the problem.
    We will to test the 64Bit version in this moment and we will post the results.
    Thank
    Jaime

  • Why does Firefox 4 (4.0.1 specifically) leak memory?

    '''Answer:''' I figured it out.
    History lesson first. Ever since the 4.0.1 update, Firefox 4 has been crashing A LOT. It's gotten so bad that FF4.0.1 will eat memory with no end in sight and eventually Windows (Win 7 64-bit) forcefully close the program due to an out of memory error.
    I have 8 GB of RAM installed. And, it would crash once it exceeds 1.5 GB of RAM used by Firefox 4. I've seen Firefox 4 go up to 1.85 GB of RAM in Task Manager. This is with 20 tabs open.
    With the add-on Leak-Monitor, I've narrowed down the issue. Having only Leak-Monitor as the extension installed, all pop-ups point to how '''poorly Firefox 4 handles Javascript'''!
    MSNBC Leak Monitor issue:
    [http://www.octoberasian.com/tech/text/FF4-Leak-Monitor_MSNBC.txt Leak Monitor log from MSNBC.com]
    I've gotten more pop-ups from even support.mozilla.com because of the Javascript on this website.
    Firefox 4.0.1 is leaking memory from every Javascript on every website I load. It's leaking memory as we speak with only this page loaded (one tab).
    FIX IT! Firefox 4 is poorly handling Javascript, especially when multiple tabs are opened.

    octoberasian: I, too, am experiencing this phenomenon. I shut my system down, pulled the EIC cable, held down the power button - then replugged and rebooted. I closed down every unneeded application that I have set to auto-start. Finally, I opened a single Firefox 4.0.1 window and let it sit. It began with consuming 43 Mb of memory. By afternoon - about 5 hours later - it was up to 203 Mb. There is definitely something very wrong with this version. It does the same on all the machines we have, sans our server. We don't use the server for anything but being a server & it has some version of Firefox 3 on it anyway. No Java Scripts were running, nor were any Adobe ARM or any plugins. I noticed when plugins run - the memory leakage goes into overdrive. Hey, I'm just sayin'...

  • Skype 6.4 continues to leak memory at an astonishing rate? Hard crashes ALL my Macs

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

    Last version of Skype 6.3 leaked memory like a river full of rapids. And once it gobbled up 1.5gigs or so of memory, it HARD crashed my iMac requiring a hard reboot. It only takes about 30 minutes for skype to do this. My iMac (2012 Core i7 3.4ghz 32 gigs RAM) is at Mac OSX 10.7.5 and it is repeatable every time. I have to set timers to remind me to restart Skype every 30 minutes.
    We thought 6.4 would fix the issue but no luck doing exact same thing. My colleague is across the country on an iMac with 10.7.5 same issues. Repeatable on my Macbook Pro running 10.8. If he let's it run, he gets the black screen of death and have to hard restart. Just like me.
    This issue has been around for several weeks and is making skype unusuable for us and we rely on it heavily. Note we are PAYING customers. to Skype.
    This ONLY happens if we use the video feature. Submitted to Skype, wondering if anyone else having issue?

  • DS 5.1sp2 SLAPI plugins leak memory

    I am running DS 5.1sp2, on Solaris 9/SPARC, and have been encountering problems with the ns-slapd process leaking memory when using SLAPI plugins.
    We have written our own bind pre-operation plugin function which, when enabled, causes ns-slapd to leak memory at a pretty rapid rate. I have a simple test where I perform a simple ldapsearch in an endless loop. The ns-slapd process starts off with a VSS of ~617MB (we have a fair amount of cache enabled) ; after a few minutes of my test, the VSS grows by several MB. With the plugin disabled, I can run the same test for hours with no growth in the VSS of ns-slapd.
    I have also performed this test with my plugin disabled, and the "testbind" plugin function (the one provided in <server root></server>/plugins/slapd/slapi/examples/testbind.c) enabled. I see even more rapid memory leakage than with my plugin.
    Are there known issues with SLAPI memory management? Is there anything I can do other than restarting ns-slapd on a regular basis (in production, this memory leak causes VSS growth of several hundred MB in the course of a few days).

    I think if you want to modify the result before it is returned, your plugin needs to be invoked post-op as well. Your plugin can be both at the same time, just make sure your init function knows what to do when called a second time.
    Moreover, without looking at the stack trace, it is hard to make any progress. Do you still have the core file? Can you paste the pstack and pflags output ?
    # Run "file" on the core to see if its a 32 or 64 bit core
    # cd /path/to/ns-slapd
    # pstack <corefile>
    # pflags corefile
    Alternatively, see if you can reproduce the problem with a small plugin. Smaller the better. I'll give it a go.

  • GetOracleDecimal seems to leak memory?

    Hello, I am using the C# statement below to retrieve a decimal value from an OracleDataReader, adjust the precision, then assign it to a .NET decimal type:
    decimal volume = (decimal)OracleDecimal.SetPrecision(reader.GetOracleDecimal(5), 28);
    Over time, the service that hosts this method leaks memory. After some investigation, I found that "Oracle.DataAccess.Types.OpoDecCtx" types were collecting in the finalize queue. Any ideas on how to resolve this? I can't explicitly Dispose() an OracleDecimal...
    I'm using ODP.NET version 2.102.2.20.
    Thanks

    Thanks for the reply. I am using .NET 2.0 SP2. I upgraded the ODP.NET client to 2.111.7.20 but am still seeing leakage of the OracleDecimal structs.
    Here's a snippet of output from WinDbg:
    Ready for finalization 32874 objects (0b4de540->0b4fe6e8)
    Statistics:
    MT Count TotalSize Class Name
    00fb8cec 32816 656320 Oracle.DataAccess.Types.OpoDecCtx
    With each pass of the service the Count and TotalSize grow in increments equal to the number of rows I'm querying...
    Just for laughs I changed the GetOracleDecimal statement to GetDecimal and the memory issue went away (because I'm no longer creating OracleDecimals). But I need to use the higher precision type to prevent overflows..
    Thanks again..

  • Does ReportDocument leak memory?

    <p class="ssiBODYCOPY">Using CrystalDecisions.CrystalReports.Engine.ReportDocument XI R2.<br /><br />w3wp.exe memory use raises while a report is generated (which is expected), yet it does not seem to be ever released after. If you keep generating same report again and again, IIS eventually runs out of memory.<br />A report does not call any external DLLs or COM objects.<br />Calling repDoc.Dispose() does not seem to help.<br /><br />Please help.<br /></p>

    Methods:
    Dispose()
    GC.WaitForPendingFinalizers()
    GC.Collect()
    Details:
    I created a C# application that connects to BOXI.
    It does not specifically use the ReportDocument object, but was also encountering serious memory issues.
    I was also using the Dipose method to mark objects for garbage collection.
    .Net garbage collection happens automatically (at some time or another), but you can force it using GC.Collect(). I tried this, but was still leaking memory.
    Until I found GC.WaitForPendingFinalizers(), which causes the garbage collector to wait until all disposed objects have completely finished their destructors. I think this made the difference with BOXI objects, because they are nested.
    After I was using all three methods, I had no more memory issues. I realize this information may be out of date, but I posted it for future seekers.

  • Flash is killing Safari, which is leaking memory ...

    I just saw in Activity Monitor that the Flash plugin is using 147% of the CPU, with one Flash movie playing in one of 12 open Tabs
    And Safari seems to leak memory as well, after a day or two it easily can use up to 3GB(!) of RAM.
    I am now quitting Safari routinely every 2 to 3 hours to get the CPU usage down and free RAM for other stuff, but I don't think this method makes for a great user experience.

    Hi,
    Use ClickToFlash... that way you have control of Flash content.
    http://clicktoflash.com/
    Carolyn

  • Simple JSP leaks memory?

    Simple HelloWorld.jsp leaks memory significantly. Tested with SoapUI setup with 40 clients driving load. At around invocation 100,000 the WLS server simply leaks enough memory to hit the upper heap size and dies. I'm running V10.3.2 (latest) in Production mode with the JRocket JVM. I also tried the same test with HelloWorld.HTML file and found no memory leaks, it runs HTML test fine up to 1,000,000 invocations with no memory or thread leaks.
    This test can not be any simpler.
    Also, performance goes down significantly as memory leaks! I go from 500tps down to 100tps just prior to running out of memory.
    The JSP file is extremely simple, here's the code:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Hello World JSP</title>
    </head>
    <body>
    <p>Hello World!</p>
    </body>
    </html>
    Why would such a simple JSP file cause the WebContainer to leak memory? I'm at a loss here.
    Edited by: user9200447 on Feb 26, 2010 10:47 AM

    It depends on the test being run. One possibility is it may be due to implicit session objects.
    Try using session=false otherwise session objects are created implicitly for this jsp. Dependng on sesson timeout, hits and java heap memory size you can run out of memory
    HTH

  • How to avoid the case of leaks memory in Object Oriented Programming

    Hi, Everyone, I am writing a simple web-baed application for JSP and Servlet, I pass all data from JSP to Servlet, It is due to the number of row of record are variable, so I should write a Java Instance class to stored to specific data in a Java Object, and then stored those object in a arraylist In the Servlet class, and then pass the arraylist in to a session, to pass the session from the servlet to another JSP......
    But some thing I am worried about is that if the no of row of record user input is large, then the number of object stored in the arraylist will also large. I am worried it will serious leaks memoary in my server. Because my server always occurs "Out Of Memoary Exception" in Tomcat, So If I use the above method. I affarid the memory will be further leaking in my server. So What can I do? Is it having any better method to prevent memory leaking when using Object Oriented Programming(Except using Hibernate)?
    Can Anyone be help me?
    Thank you very much for All, THX

    Because many people say that the large amount of
    using Object will lead to "memory leak", I am worried
    about the size of object I use is too large and then
    it will construct "memory leak". No it will not! You get a 'memory leak' by holding references to objects you no longer require.
    >
    The detail of my case is that:
    In my web application, there is a session variable
    pass through from one servlet to another jsp/servlet.You should only place small amounts of data in the session. If you need forward from a Servlet to a JSP (or JSP to Servlet) then you should place the data object in the request (using the setAttribute() method), not in the session. In this way, when the session is re-claimed so will be the data object.
    And this session variable is stored a Instance Object
    (which is a class write by me) with the following
    issue:
    1) This instance object having "has-a relationship"
    with another four instance object (all are the
    classes write by me)
    2) This instance object having "has relationship"
    with a arraylist, this arraylist is stored about 4-5
    instance object(all are the classes write by me) .
    If this object having the above issue, Will this
    object construct a "leaks memory" when this object
    stored in the session and pass through servlet to
    another jsp/servlet?
    Message was edited by:
    sabre150

  • Parsing string w/ Xerces DOMParser

    I am a beginner at this and am using Xerces DOMParser in Java. I can parse a file just fine with the DOMParser.parse() method.
    However I also want to be able to pass a string and parse that string. The DOMParser.parse() method appears to be expecting the String parameter to be a filename.
    How can I feed the parser a string or a stream and have it parse that rather than have it looking for a file?
    Many thanks,
    Teresa

    David is absolutely right. In addition, there's actually no problem feeding a stream to the parser, see http://java.sun.com/j2se/1.4.1/docs/api/javax/xml/parsers/DocumentBuilder.html. I'm not sure if you're using JAXP or the Xerces native interface (and I don't know about the native API), but I think as a beginner you should start with JAXP anyway.

  • SystemUIServer leaks memory, possibly related to spotlight

    SystemUIServer leaks memory. Immediately after reboot it occupies about 8 to 9 MB (real) on my system. Climbing to more than 17MB after only 30 minutes. After 3 days, 20 hours of uptime total real memory consumption of the SystemUIServer process was 441MB. Upon researching the process I found this forum devoted to Spotlight and interaction with SystemUIServer. Testing, I found Spotlight was unresponsive, the tool would not pull down and it didn't respond to the keboard shortcut.
    Killing SystemUIServer brings the process memory usage back down but it continues to climb as it runs. Spotlight became responsive.
    System is fully patched and updated.
    I also noticed after rebooting from update that iSync logs messages like the following in console.log:
    2007-08-09 05:54:54.180 SyncServer[3857] A Sync Server is already running on this computer, exiting process.

    I guess my question would be, does anyone know when Apple is going to fix either Spotlight or SystemUIServer so it doesn't leak/crash as seems to so common here in the discussion groups?
    Probably need a bit more troubleshooting...
    My uptime is now 3days 20 hours -odd coincidence.
    SystemUIServer is using 10.96MB Real Mem.
    So, I don't know if I would expect Apple to already believe that there is a problem needing to be fixed. Really, don't think anything in this forum can be considered "common." For a core function of the OS, the Spotlight forum is now one of the quietest of all the Tiger forums- only one that sees less action is UniversalAccess.
    Anyway, I'm not sure why you're having a problem with memory leaks in SystemUIServer or with Spotlight, and I'm not enough of a developer to tell you how you could debug it. All I can say is that your situation is not the norm and that there is likely something specific to your situation that is causing it. The unresponsiveness of Spotlight may very well be a side effect of the memory leak which is being caused by something else on the menubar.

  • Simple xerces DOMParser.  Why won't this validate? Very simple, xml schema

    I have written a java program called "Validate.java" to validate an xml file. The program uses the xerces DOMParser. When I try and validate a correct .xml file with a correct schema in an .xsd file I get the following errors:
    [Error] Document is invalid: no grammar found. line 2 column 6 - name5.xml
    [Error] Document root element "name", must match DOCTYPE root "null". line 2 column 6 - name5.xmlThe XML file, the XSD file, and the Validate.java program are all in the same directory. My CLASSPATH includes xml-apis.jar, xercesImpl.jar, and xercesSamples.jar.
    Here is the xml file (name5.xml):
    <?xml version="1.0"?>
    <name
        xmlns="http://www.myOwnURL.net/name"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.myOwnURL.net/name name5.xsd"
        title="Mr.">
      <first>John</first>
      <middle>Fitzgerald</middle>
      <last>Doe</last>
    </name>(I saved the file in the UTF-8 encoding, which causes it to look double spaced in some text editors.)
    The schema is in the following xsd file (name5.xsd):
    <?xml version="1.0"?>
    <schema
        xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.myOwnURL.net/name"
        xmlns:target="http://www.myOwnURL.net/name"
        elementFormDefault="qualified">
      <element name="name">
        <complexType>
          <sequence>
            <element name="first" type="string"/>
            <element name="middle" type="string"/>
            <element name="last" type="string"/>
          </sequence>
          <attribute name="title" type="string"/>
        </complexType>
      </element>
    </schema>(Again, the file is saved in UTF-8 format.)
    Here is the code for Validate.java:
    public class Validate implements org.xml.sax.ErrorHandler
        private String instance = null;
        private int warnings = 0;
        private int errors = 0;
        private int fatalErrors = 0;
        private org.apache.xerces.parsers.DOMParser parser = new org.apache.xerces.parsers.DOMParser();
        public Validate() // constructor
            parser.setErrorHandler(this); // Set the errorHandler
        public void setInstance(String s)
            instance = s;
        public boolean doValidate()
            try
                warnings = 0;
                errors = 0;
                fatalErrors = 0;
                try
                    // Turn the validation feature on
                    parser.setFeature( "http://xml.org/sax/features/validation", true);
                    // Parse and validate
                    System.out.println("Validating source document...");
                    parser.parse(instance);
                    // We parsed... let's give some summary info of what we did
                    System.out.println("\nComplete " + warnings + " warnings " + errors + " errors " + fatalErrors + " fatal errors");
                    // Return true if we made it this far with no errors
                    return ((errors == 0) && (fatalErrors == 0));
                catch (org.xml.sax.SAXException e)
                    System.err.println("\nCould not activate validation features - " + e.getMessage());
                    return false;
            catch (Exception e)
                System.err.println("\n"+e.getMessage());
                return false;
        public void warning(org.xml.sax.SAXParseException ex)
            System.err.println("\n[Warning] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            warnings++;
        public void error(org.xml.sax.SAXParseException ex)
            System.err.println("\n[Error] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            errors++;
        public void fatalError(org.xml.sax.SAXParseException ex) throws org.xml.sax.SAXException
            System.err.println("\n[Fatal Error] " + ex.getMessage() + " line " + ex.getLineNumber()
            + " column " + ex.getColumnNumber() + " - " + instance);
            fatalErrors++;
            throw ex;
        public static void main(String[] args)
            Validate validate1 = new Validate();
            if (args.length == 0)
                System.out.println("Usage : java Validate <instance>");
                return;
            // Set the instance
            if (args.length >= 1) validate1.setInstance(args[0]);
            // Validate (the doValidate returns either true or false depending on
            // whether there were any errors.)
            if (!validate1.doValidate()) return;
    }My question is: why do I get those errors??? Why doesn't everything just validate like it is supposed to??? Also, why does the error even mention DOCTYPE -- I thought that was for DTDs, and I am using XML Schema.
    I will be very grateful to anyone who can tell me what is going on here.
    Thanks,
    Jon

    I have solved my problem. I just needed to add the following line to my java program:
    parser.setFeature("http://apache.org/xml/features/validation/schema", true);I'm still not sure how I was supposed to know this, however. I guess spending three hours searching on google is what you are supposed to do. Also, I was thrown for a bit of a loop by the following official faq found at http://xml.apache.org/xerces2-j/faq-pcfp.html:
    [faq]
    Question: How can I tell the parser to validate against XML Schema and not to report DTD validation errors?
    Answer: Currently this is impossible. We hope that JAXP 1.2 will provide this capability via its schema language property. Otherwise, we might introduce a Xerces language property that will allow specifying the language against which validation will occur.
    [faq]
    I am very new to XML (less than a week), but that FAQ sure makes it sound like using only XML Schema and completely avoiding DTDs is impossible. On the other hand, I think that is what I was able to achieve by adding the above line to my code.
    Oh well.
    Jon

  • NetworkVariableDataSource.Bindings[VariableName].GetValue() leak memory

    Dear Sir,
    We are using Measurement Studio 8.5 for Visual Studio 2005. Our application reads 105 Netwrok Variables in every seconds. It does the the work done through NetworkVariableDataSource.Bindings[VariableName].GetValue(). So far we have tested and determined that the GetValue() methods leaks some memory and every seconds the memory consumption by the application goes up. How can we solve the problem? We are using c# lannguage.
    Best regards,
    Mamunur Rashid,
    TechnoVista Limited

    Duplicate Post

  • ClassCastExceptions in Java6 leak memory (not heap, but VM memory)

    I have been closely monitoring this reported bug for a while ( [6676058|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6676058] ), and still cannot get any answers. It was marked as Closed, duplicate of [6631248|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6631248] , but as you can see, issue 6631248 doesn't seem to exist (or at least it is not accessible). So I thought I would post here and see if anyone has any answers? When will this bug be fixed, or can we at least get some more information on it? I apologize if this is the wrong place to post such a message (sorry for the duplicate), but I have posted a few times on the bug report itself with no answers in sight.
    In my opinion, this is a major bug, since ClassCastExceptions are sometimes suppressed in code, so coming up with a workaround (especially for a large codebase) can be difficult. It is probably a problem for a lot more people who don't realize it yet. Currently, the only workaround is to try to find all the potential places where ClassCastExceptions could be thrown, and replace them with an explicit instanceof check. Using instanceof is not a good solution since it can change the behavior slightly (ie. it returns false for a null value). A fix for this memory leak would be much appreciated :).

    You're right, 6631248 isn't accessible. However, the bug was fixed in jdk 6 update 10 and in current jdk7 builds; the jdk7 fix is [changeset 9785f6d2dd97|http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/9785f6d2dd97].

Maybe you are looking for

  • Error when making a database call froman ejb

    Hello, I am getting the following error when accessing the database from an ejb - java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:      java.rmi.RemoteException      at com.sun.corba.ee.internal.iiop.ShutdownU

  • This report takes a long time

    Hello: I have this report and to run it takes a long time, how can I optimize it? thank you very much. ======= THIS IS MY REPORTS ======= { NAMEWIDTH 15 } { WIDTH 15 } { SUPFEED } <SUPSHARE {DECIMAL 2} { NOINDENTGEN } { SUPHEADING } {ROWREPEAT} <SPAR

  • Scanning using Canon mp540 and Photoshop

    Hi, maybe slightly off-topic here, but does anyone know of any generic (or Canon) software which can be used to scan from within Photoshop CS4? Canon have proved pretty poor in responding to this question and I'd just like to cut out one extra progra

  • Crystal XI runtimes - Accpac - Lotus

    Post Author: TASCAndy CA Forum: General We have a client who was running Accpac 5.2 which uses the Crystal 8.5 runtimes. They printed their reports to email using Lotus Notes. We upgraded them to Accpac 5.4 which uses the Crystal XI runtimes. This fe

  • Another instance of Contribute is doing a workflow operation

    Cannot publish.... get the message below: "Another instance of Contribute is doing a workflow operation..." Unable to select Yes | No on window that pops up with this message.