Read/write XML via OO4O

We have some ASP code (Active Server Pages) that uses OO4O to select/insert data in an Oracle 8i rel. 2 database (The OO4O objects are from the same release 8.1.6). Now we would like to enhance it to read and store some XML documents directly (the XML documents are about 10 KB and have nested master/detail like structure).
Our first idea was to write a stored procedure with a string argument to save the XML document, and to write a stored function also returning a string to retrieve the same data. But it appears that there is a 4KB limitation here (we thought it was a 32 KB limitation, but have only been able to get 4 KB?).
Then we tried to use the RAW parameter type (although the documentation recommends not to), but this apparently requires the data top be transformed to binary format (the XML is in ISO8859-1 format).
Have you any suggestions on how to overcome these limitations?
Or are we simply going in the wrong direction (Is there a better way to use XML via OO4O than with stored procedures)?
Regards
Tom Bjerre.
NB: The stored procedures written in Java look like:
public static String get_xml(String key) throws SQLException{...}
public static void set_xml(String key, String xmlStr) throws SQLException{...}
with call specs of:
CREATE OR REPLACE PACKAGE TEST AUTHID DEFINER AS
FUNCTION GET_XML ("key" IN VARCHAR2)
RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'Test.UtilXML.get_xml(java.lang.String) return java.lang.String';
PROCEDURE SET_XML ("key" IN VARCHAR2, "xmlStr" IN VARCHAR2)
AS LANGUAGE JAVA
NAME 'Test.UtilXML.set_xml(java.lang.String, java.lang.String)';
END TEST;
null

CHAR is limited to 2k.
VARCHAR2 is limited to 4k.
You should be using CLOB if you're
saving XML strings.

Similar Messages

  • Cluster and Read Write XML

    In my applications I allow users to save their settings. I used to do this in a Ini file. So I wrote a Vi that could write any cluster and it worked ok. When I discovered that in the newer versions of LabVIEW you could Read/Write From/To xml, I changed inmediatly because it have some advantages form me but I am having some trouble.
    Every time I want to save a cluster I have to use
    Flatten To XML -> Escape XML -> Write XML
    and to load
    Load From XML -> Unescape XML -> Unflatten from XML.
    I also do other important things each time I save or load settings. So it seems to be reasonable to put all this in just two subvi's. (One for loading, One for saving). The problem is that I want to use it with any cluster
    What I want with can be summarized as following:
    - SaveSettings.vi
    --Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    --Outputs
    ---Error Out
    -LoadSettings.vi
    Inputs:
    ---Filename
    ---AnyCluster
    ---Error In
    Outputs
    ---DataFromXML
    ---Error Out
    I have tried using variants or references and I was not able to make generic sub vi (sub vi that don't know what is in the cluster). I don't want to use a polymorphic vi because it will demand making one load/save pair per each type of settings.
    Thanks,
    Hernan

    If I am correct you still you need to wire the data type to the Variant To Data. How can you put in a subvi ALL that is needed to handle the read/write of the cluster? I don't want to put any Flatten To XML or Unflatten From XML outside.
    The solution I came out with INI files was passing a reference to a cluster control but it is real unconfortable because I have to itereate through all items.
    When a control has a "Anything" input, is there any way to wire that input to a control and remains "Anything"?
    Thanks
    Hernan

  • Read/write xml data from/to adobe livecycle forms (pdf)

    Hello,
    I need some help reading xml data from pdfs created by Adobe LiveCycle and also writing xml data back to the form.
    The forms have been created using PROD LC 8.2 and in the future they will be created using PROD LC 9.5.
    I am using Visual Basic .NET to access the data programatically.
    Can anyone help me with some hints? A library, SDK? Any information would be very helpful.
    I am quite new with this Electronic Forms issue and I do not even know where to start.
    Thank you,
    Ionel

    Hi lonel,
    Do you want an online solution?
    I mean, it follows this workflow:
    1. The user will open the PDF by clicking a link, and a server-side program will generate the PDF and prepopulate it with data from some data sources, and render the PDF to the client (Browser),
    2. The user will fill the PDF.
    3. The user will click a Submit button and save the PDF and Data on the server.
    4. If the user wants to edit the Submitted Form, he will click a link to open the save PDF and possibly prepopulate some fields with data from other data sources, and complete the cycle of filling and saved the PDF and Data on the server.
    5. While the user is filling the PDF (inside a Browser), there might be a need to perform some lookup on the server, and update the form parts accordingly as a result of the lookup process.
    For 1-4 above, I have developed a complete base library using ASP.NET which helps you to perform the above.
    You can goto my Google Workspace and you will find a bunch of documents, sample PDFs, collections and VB Classes. To best view them, login using some Google Account.
    For point 4 above, one way to perform this effect, is to regenerate the required XML Data (which has the saved data before and the new lookup data), remerge the entire XML result with and empty PDF Form, and render the XFA (PDF Form) back to the client. But, if the PDF has one or more signatures, it will not work. So, in this case, you can update the Form Fields of a Saved PDF Form with new Data from the server, but the net effect is that you will have to loose all the signatures that were added on the PDF before.
    For 5 (above) there are 3 methods:
    1. Using a Web Service as a Data Connection. This is very easy if you have a traditional Web Service. I have used this method several times and will use it again if the need be. But, there is a problem. If the result of the Web Service is an Array of some Data, and you want to remerge the XFA to get the required effect after executing the web service ... and ... if there are some Drop-Down-List (DDL) fields, the bindings of the DDL Items of those fields will be lost. But, you can rebuild them (on enter event of the DDL Field)  if you have saved them in the embedded XML Data.
    2. You can update few (not many) fields while the PDF is opened (under the Browser via IFRAME) by passing the new field values using the URL Query String method. I have not done this, but I like this method, and I think it is cool. You need to write a server side code to ensure the the new filed values are passed back to the client using the correct URL with the Query String, and you need to write some javascript code inside the PDF to parse the URL and get the new field values and update them accordingly. See this as an example:
    http://www.halnesbitt.com/pages/pdfqs.php
    3. This method is very advanced and uses message communication ques between the Browser and the PDF (which is opened inside IFRAME element) using HostContainer object. This method will enable 2-way communication between the Browser and the PDF on the client side using javascript. I'd love to use this method one day. See example here:
    http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm
    I hope this will be of help to you.
    Tarek.

  • Unusual read, write XML request.

    I have a program that builds a JTree based upon a template , and properties file passed to it.
    I need a program that will rip through an xml file such as this xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <Device>
      <Module name="Module 1">
               <status>
                    <device Name="Yellowfin Demo"
                                   Description="Beta Tag mapper"
                                   Location="Jim's 13 slot rack"
                                   Contact="Jim"
                                   Serial Number="" >                 
                    </device>
                     <network></network>
                     <chassis></chassis>
                     <chassis></chassis>
                </status>
                <projedit></projedit>
                <projmngt></projmngt>
                <admin>
                      <network></network>
                      <device></device>
                      <users></users>
                </admin>
                <logging></logging>
           </Module>          
    </Device>and create a properties file that has this information in it:
    Devices.Module 1.Status.Device.Name=Yellowfin Demo
    Devices.Module 1.Status.Device.Description=Beta Tag mapper
    Devices.Module 1.Status.Device.Location=Jim's 13 slot rack
    Devices.Module 1.Status.Device.Contact=Jim
    Devices.Module 1.Status.Device.Serial Number=
    Devices.Module 1.Status.Network.Ethernet 1.MAC Address=
    Devices.Module1.Status.Network.Ethernet 1.IP Adress=
    Devices.Module1.Status.Network.Ethernet 1.SubNet Mask=
    Devices.Module1.Status.Network.Ethernet 1.Default Gateway=
    Devices.Module1.Status.Network.Ethernet 2.MAC Address=
    Devices.Module1.Status.Network.Ethernet 2.IP Adress=
    Devices.Module1.Status.Network.Ethernet 2.SubNet Mask=
    Devices.Module1.Status.Network.Ethernet 2.Default Gateway=
    etc...This properties file is fead to the program and creates the JTree
    Is it possible?

    Yes, of course there's a way to do this whatever you have in mind actually. What makes your request unusual is that you have posted an ill-formed XML document and an output that is inconsistent with this document. An unambiguous description of how to construct the lines of the output file would also have been a great step forward to get a detailed answer.

  • Reading an XML file and write the contents to another xml file in java

    Hi,
    I am new to xml parsing.My requirement is that I am getting a message (xml) using ibm MQ in the ByteArrayInputStream format.I have to read this xml message and write to another file.
    I am creating a POC for this.
    First I used simple reading and writing concept but the output is "java.io.FileInputStream@3e25a5 "
    Sample xml file
    - <Client>
    <ClientId>1234</ClientId>
    <ClientName>STechnology</ClientName>
    <DTU_ID>567</DTU_ID>
    <ClientStatus>ACTIVE</ClientStatus>
    - <LEAccount>
    <ClientLE>678989</ClientLE>
    <LEId>56743</LEId>
    - <Account>
    <AccountNumber>9876543678</AccountNumber>
    </Account>
    </LEAccount>
    - <Service>
    <Cindicator>Y2Y</Cindicator>
    <PrefCode>980</PrefCode>
    <BSCode>876</BSCode>
    <MandatoryContent>MSP</MandatoryContent>
    </Service>
    </Client>
    code:
    import java.io.ByteArrayInputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              byte currentXMLBytes[] = inputStream.toString().getBytes();
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    Please suggest me how can I use DOM/SAX parser ,I can see several code on net for reading xml file using SAX/DOM parser but writing an xml file after reading it using ByteArrayInputStream I am not getting .A help through some example Link will also be helpful for me.
    Thanks
    Sumit
    Edited by: user8687839 on Apr 30, 2012 2:37 AM
    Edited by: user8687839 on Apr 30, 2012 2:43 AM

    Thanks I got the result.
    package com.sumit.collections;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    public class ByteArrayInputStreamToXml {
         public static void main(String srg[]) throws IOException{
              InputStream inputStream= new FileInputStream("C:\\soft\\test2\\sample1.xml");
              ByteArrayOutputStream buffer = new ByteArrayOutputStream();
              int nRead; byte[] data = new byte[1024];
              while ((nRead = inputStream.read(data, 0, data.length)) != -1) {
              buffer.write(data, 0, nRead); } buffer.flush();
              byte currentXMLBytes[]= buffer.toByteArray();
              /* byte currentXMLBytes[] = inputStream.toString().getBytes();*/
              ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(currentXMLBytes);
              OutputStream out = new FileOutputStream("C:\\soft\\test\\data.xml");
              int read=0;
              byte[] bytes = new byte[1024];
              while((read = byteArrayInputStream.read(bytes))!= -1){
              out.write(bytes, 0, read);
              out.write( '\n' );
              inputStream.close();
              out.flush();
              out.close();
              System.out.println("New file created!");
    }

  • How to read a XML document uploaded via browser in OWA_Content

    I've developed a PLSql procedure to upload xml documents (via browser) into owa_content, now i need to read this xml document to use XML packges for insert into a Table if someone have a tip... help me please!
    Thanks!

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • How to Read and Write .XML datas   (HELP Plz...)

    hai everybody
    how to read and write xml datas... plz give clean and simple example..
    bcoz me want to produce such type of module...
    if any one help me .. thats the only way me laid in software ladder
    plz....
    thank u in advance

    thank u for giving idiot..
    but before posting i search in google also..
    but i cant get what me expect..
    thus i posted...
    then who is ................?
    sorry javacoder01
    // plz help me
    Message was edited by:
    drvijayy2k2

  • Reading & writting code for XML doc

    I need help with writting a java code that will read the XML dopcument below & output it as given below. thanks.
    <?xml version="1.0"?>
    <!-- Employee expenses by department. -->
    <firm>
    <!-- Hmmm, suspicious. -->
    <dept name="Accounting">
    <emp name="Boswell" amt="437.46" />
    <emp name="Austen" amt="124.07" />
    <emp name="Johnson" amt="184.19" />
    <emp name="Boswell" amt="423.99" />
    <emp name="Keats" amt="321.14" />
    </dept>
    <!-- Why so much travel and always to Russia in summer? -->
    <dept name="Finance">
    <emp name="Tolstoi" amt="224.46" />
    <emp name="Turgenev" amt="532.11" />
    <emp name="Tolstoi" amt="149.08" />
    <emp name="Gogal" amt="643.26" />
    <emp name="Tolstoi" amt="265.91" />
    </dept>
    <!-- Marketing, smarketing -->
    <dept name="Marketing">
    <emp name="Mishima" amt="754.18" />
    <emp name="Kawabata" amt="398.07" />
    <emp name="Kawabata" amt="398.07" />
    </dept>
    <!-- High pay, high stress: deserve to travel -->
    <dept name="Technology">
    <emp name="Hesse" amt="156.44" />
    <emp name="Handke" amt="174.21" />
    <emp name="Hesse" amt="365.21" />
    <emp name="Hesse" amt="452.33" />
    </dept>
    </firm>
    OUTPUT:
    Accounting
    Austen --> $124.07
    Bosworth --> $861.45
    Johnson --> $184.19
    Keats --> $321.14
    Finance
    Gogal --> $643.26
    Tolstoi --> $639.45
    Turgenev --> $532.11
    Marketing
    Kawabata --> $796.14
    Mishima --> $754.18
    Technology
    Handke --> $174.21
    Hesse --> $973.98
    ----------------------------------------------------

    /* INTERFACE */
    import java.util.*;
    import java.util.regex.*;
    abstract public interface XMLInterface {
    abstract public void parse(String file_name);
    abstract public String getStartTag(String item);
    abstract public String getEndTag(String item);
    abstract public Map getAttributes(String item);
    abstract public int getXMLType(String item);
    public static final String start_tagSA =
    "<[\\s]*[\\w]+[\\s]*>";
    public static final String end_tagSA =
    "</[\\s]*[\\w]+[\\s]*>";
    public static final String pi =
    "<\\?[\\W\\w\\s]*\\?>";
    public static final String comment =
    "<!--[\\s]*[\\W\\w]+[\\s]*-->";
    public static final String elementSA =
    "<[\\s]*[\\w\\W]+[\\s]*[]?>";
    public static final String attribute =
    "[:\\w]+[\\s]*=[\\s]*([\\'|\"])[\\w\\d\\.$\\s]+\\1";
    public static final int XML_BAD_TYPE = 0;
    public static final int XML_COMMENT = -1;
    public static final int XML_ELEMENT = -2;
    public static final int XML_PI = -3;
    public static final int XML_START_TAG = -4;
    public static final int XML_END_TAG = -5;
    /* IMPLIMENTATION */
    import java.io.*;
    import java.util.*;
    import java.util.regex.*;
    public class ParserXML implements XMLInterface {
    public void parse(String file_name) {
    readFile(file_name);
    compile_patterns();
    Iterator it = records.iterator();
    while (it.hasNext()) {
    String next = (String) it.next();
    int type = getXMLType(next = next.trim());
    switch (type) {
    case XMLInterface.XML_START_TAG:
    System.out.println("Start tag: " + next);
    String tag = getStartTag(next);
    if (tag != null)
    System.out.println("\tTag is " + tag);
    break;
    case XMLInterface.XML_END_TAG:
    System.out.println("End tag: " + next);
    break;
    case XMLInterface.XML_ELEMENT:
    System.out.println("Element: " + next);
    Map m = getAttributes(next);
    if (m != null) {
    Set s = m.keySet();
    Iterator iter = s.iterator();
    while (iter.hasNext()) {
    Object key = iter.next();
    System.out.println("\tAttribute: " + key + " = " + m.get(key));
    break;
    case XMLInterface.XML_COMMENT:
    System.out.println("Comment: " + next);
    break;
    case XMLInterface.XML_PI:
    System.out.println("Processing instruction: " + next);
    break;
    default:
    System.out.println("Bad XML type: " + next);
    break;
    public int getXMLType(String item) {
    Matcher m = null;
    m = start_tagSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_START_TAG;
    m = end_tagSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_END_TAG;
    m = elementSA.matcher(item);
    if (m.matches()) return XMLInterface.XML_ELEMENT;
    m = comment.matcher(item);
    if (m.matches()) return XMLInterface.XML_COMMENT;
    m = pi.matcher(item);
    if (m.matches()) return XMLInterface.XML_PI;
    return XMLInterface.XML_BAD_TYPE;
    public String getStartTag(String item) {
    Matcher m = start_tagSA.matcher(item);
    if (m.find())
    return m.group();
    else
    return null;
    public String getEndTag(String item) {
    return null;
    public Map getAttributes(String item) {
    Matcher m = attribute.matcher(item);
    if (!m.find()) return null;
    m.reset();
    Map attributes = new HashMap();
    int n = 0;
    while (m.find(n)) {
    String[ ] key_value = m.group().split("=");
    attributes.put(key_value[0].trim(), key_value[1].trim());
    n = m.end();
    return attributes;
    private void readFile(String filename) {
    records = new ArrayList();
    try {
    BufferedReader input = new BufferedReader(new FileReader(filename));
    String record = null;
    while ((record = input.readLine()) != null)
    records.add(record);
    input.close();
    catch(Exception e) {
    e.printStackTrace();
    System.exit(-1);
    private void dump() {
    Iterator it = records.iterator();
    while (it.hasNext())
    System.out.println(it.next());
    private void compile_patterns() {
    elementSA = Pattern.compile(XMLInterface.elementSA);
    comment = Pattern.compile(XMLInterface.comment);
    pi = Pattern.compile(XMLInterface.pi);
    start_tagSA = Pattern.compile(XMLInterface.start_tagSA);
    end_tagSA = Pattern.compile(XMLInterface.end_tagSA);
    attribute = Pattern.compile(XMLInterface.attribute);
    private List records;
    private Pattern elementSA;
    private Pattern comment;
    private Pattern pi;
    private Pattern start_tagSA;
    private Pattern end_tagSA;
    private Pattern attribute;
    /* DRIVER */
    class ParseDriver {
    public static void main(String[ ] args) {
    if (args.length < 1) {
    System.out.println("ParseDriver <filename>");
    return;
    ParserXML parser = new ParserXML();
    parser.parse(args[0]);

  • XML Reader/Writer

    Is there a simple class for Reading an XML file in, getting it's elements/attributes etc, and one for writing to an XML file?
    Here is a simple XML file contents:
    <?xml version="1.0" ?>
    <java>
    <temp value="98.6 F" />
    </java>
    It's just a few lines of basic text. Right now I am just reading/writing using a standard BufferedReader, PrintWriter combo and the logic flows based on a known tag-flow. But
    what if I dont know what and where different tags in a file? Isent there a Reader-Writer for
    this that will collect the tags and their attributes/values for me???

    Hi there,
    Why do you want to re-invent the wheel when some cars running on these wheels already exists.
    There are APIs that specialize in parsing a XML Document to it's shreds.
    Xerces by http://xml.apache.org/xerces is one of them. The choice that you have is either to use the SAX portion of the API or the DOM portion. The easiest alternative is to use neither and go for the JDOM api. http://www.jdom.org.
    If you want to learn more about xml processing with Java I would advise you read Brett McLaughlin's Java/XML book or look at http://www.ibiblio.org

  • Pls How do I read/write a xml file using java

    I want to read/write trough a server/client a file.xml from evt. the same computer, this is the code for the client
    import java.io.*;
    import java.net.*;
    class client
    public static void main (String args[]) throws Exception
    final String msg = "<beg>note</beg>";
    // BufferedReader in = new BufferedReader(new FileReader("note.xml"));
    final Socket clientSocket = new Socket ("localhost", 8000);
    final OutputStream clientStream = clientSocket.getOutputStream ();
    clientStream.write (msg.getBytes ());
    // clientStream.write (in.getBytes ());
    clientSocket.close ();
    // BufferedReader in = new BufferedReader(new FileReader("note.xml"));
    // System.out.println(in.readLine());
    I want to read it and put it in a buffer...
    please somebody help me!!!
    regards
    Harry

    Pls read this:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=271751
    And don't post the same message twice. It's annoying.

  • Read and Write XML files

    I work on a Flex application that will be used to record time entries for manufacturing plan. I have two problems to solve:
    1- Can I read an XML file from a local drive? (C: /temp/file)
    2- If the system where I call the web service is offline, I must create local file that are going to be read later vwhen the system will be up again. How can I create local file from Flex?

    A web-based app cannot access the local drive w/o user permission.
    Sometimes, folks upload local files to a server (also requiring user
    permission) and then request the file from the server.
    You can use local SharedObject to store data, although there are limits to
    how much data.
    The recommended option is to create an AIR app.  It will be able to access
    the local drive once it is installed.

  • Windows Server 2012 - Hyper-V - iSCSI SAN - All Hyper-V Guests stops responding and extensive disk read/write

    We have a problem with one of our deployments of Windows Server 2012 Hyper-V with a 2 node cluster connected to a iSCSI SAN.
    Our setup:
    Hosts - Both run Windows Server 2012 Standard and are clustered.
    HP ProLiant G7, 24 GB RAM, 2 teamed NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the primary host and normaly all VMs run on this host.
    HP ProLiant G5, 20 GB RAM, 1 NIC dedicated to Virtual Machines and Management, 2 teamed NIC dedicated to iSCSI storage. - This is the secondary host that and is intended to be used in case of failure of the primary host.
    We have no antivirus on the hosts and the scheduled ShadowCopy (previous version of files) is switched of.
    iSCSI SAN:
    QNAP NAS TS-869 Pro, 8 INTEL SSDSA2CW160G3 160 GB i a RAID 5 with a Host Spare. 2 Teamed NIC.
    Switch:
    DLINK DGS-1210-16 - Both the network cards of the Hosts that are dedicated to the Storage and the Storage itself are connected to the same switch and nothing else is connected to this switch.
    Virtual Machines:
    3 Windows Server 2012 Standard - 1 DC, 1 FileServer, 1 Application Server.
    1 Windows Server 2008 Standard Exchange Server.
    All VMs are using dynamic disks (as recommended by Microsoft).
    Updates
    We have applied the most resent updates to the Hosts, WMs and iSCSI SAN about 3 weeks ago with no change in our problem and we continually update the setup.
    Normal operation
    Normally this setup works just fine and we see no real difference in speed in startup, file copy and processing speed in LoB applications of this setup compared to a single host with 2 10000 RPM Disks. Normal network speed is 10-200 Mbit, but occasionally
    we see speeds up to 400 Mbit/s of combined read/write for instance during file repair
    Our Problem
    Our problem is that for some reason all of the VMs stops responding or responds very slowly and you can for instance not send CTRL-ALT-DEL to a VM in the Hyper-V console, or for instance start task manager when already logged in.
    Symptoms (i.e. this happens, or does not happen, at the same time)
    I we look at resource monitor on the host then we see that there is often an extensive read from a VHDX of one of the VMs (40-60 Mbyte/s) and a combined write speed to many files in \HarddiskVolume5\System Volume Information\{<someguid and no file extension>}.
    See iamge below.
    The combined network speed to the iSCSI SAN is about 500-600 Mbit/s.
    When this happens it is usually during and after a VSS ShadowCopy backup, but has also happens during hours where no backup should be running (i.e. during daytime when the backup has finished hours ago according to the log files). There is however
    not that extensive writes to the backup file that is created on an external hard drive and this does not seem to happen during all backups (we have manually checked a few times, but it is hard to say since this error does not seem leave any traces in event
    viewer).
    We cannot find any indication that the VMs themself detect any problem and we see no increase of errors (for example storage related errors) in the eventlog inside the VMs.
    The QNAP uses about 50% processing Power on all cores.
    We see no dropped packets on the switch.
    (I have split the image to save horizontal space).
    Unable to recreate the problem / find definitive trigger
    We have not succeeded in recreating the problem manually by, for instance, running chkdsk or defrag in VM and Hosts, copy and remove large files to VMs, running CPU and Disk intensive operations inside a VM (for instance scan and repair a database file).
    Questions
    Why does all VMs stop responding and why is there such intensive Read/Writes to the iSCSI SAN?
    Could it be anything in our setup that cannot handle all the read/write requests? For instance the iSCSI SAN, the hosts, etc?
    What can we do about this? Should we use MultiPath IO instead of NIC teaming to the SAN, limit bandwith to the SAN, etc?

    Hi,
    > All VMs are using dynamic disks (as recommended by Microsoft).
    If this is a testing environment, it’s okay, but if this a production environment, it’s not recommended. Fixed VHDs are recommended for production instead of dynamically expanding or differencing VHDs.
    Hyper-V: Dynamic virtual hard disks are not recommended for virtual machines that run server workloads in a production environment
    http://technet.microsoft.com/en-us/library/ee941151(v=WS.10).aspx
    > This is the primary host and normaly all VMs run on this host.
    According to your posting, we know that you have Cluster Shared Volumes in the Hyper-V cluster, but why not distribute your VMs into two Hyper-V hosts.
    Use Cluster Shared Volumes in a Windows Server 2012 Failover Cluster
    http://technet.microsoft.com/en-us/library/jj612868.aspx
    > 2 teamed NIC dedicated to iSCSI storage.
    Use Microsoft MultiPath IO (MPIO) to manage multiple paths to iSCSI storage. Microsoft does not support teaming on network adapters that are used to connect to iSCSI-based storage devices. (At least it’s not supported until Windows Server 2008 R2. Although
    Windows Server 2012 has built-in network teaming feature, I don’t article which declare that Windows Server 2012 network teaming support iSCSI connection)
    Understanding Requirements for Failover Clusters
    http://technet.microsoft.com/en-us/library/cc771404.aspx
    > I have seen using MPIO suggests using different subnets, is this a requirement for using MPIO
    > or is this just a way to make sure that you do not run out of IP adressess?
    What I found is: if it is possible, isolate the iSCSI and data networks that reside on the same switch infrastructure through the use of VLANs and separate subnets. Redundant network paths from the server to the storage system via MPIO will maximize availability
    and performance. Of course you can set these two NICs in separate subnets, but I don’t think it is necessary.
    > Why should it be better to not have dedicated wireing for iSCSI and Management?
    It is recommended that the iSCSI SAN network be separated (logically or physically) from the data network workloads. This ‘best practice’ network configuration optimizes performance and reliability.
    Check that and modify cluster configuration, monitor it and give us feedback for further troubleshooting.
    For more information please refer to following MS articles:
    Volume Shadow Copy Service
    http://technet.microsoft.com/en-us/library/ee923636(WS.10).aspx
    Support for Multipath I/O (MPIO)
    http://technet.microsoft.com/en-us/library/cc770294.aspx
    Deployments and Tests in an iSCSI SAN
    http://technet.microsoft.com/en-US/library/bb649502(v=SQL.90).aspx
    Hope this helps!
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Lawrence
    TechNet Community Support

  • Reading a XML file in a standalone java application

    Hi,
    What are my options if I have a standalone java application running outside any app. server and I need to read an XML file, probably read some of the attributes in the file...? Please explain clearly as I'm new to this. Appreciate your help.
    Thanks,
    Mahdad

    nope you don't need a DTD
    you have to write your Java code in a way that doesn't rely too much on the structure:
    - avoid getFirstChild().getFirstChild()... because you know that this element is first grandson of that element)
    - prefer using getElementByTagName() or some XPath() API
    but if the XML completely changes, well, yeah, you have to do some programmation: better think well your document structure in the beginning.

  • Reading an XML file stored in Oracle

    Is it possible to read an xml file stored in Oracle via Oracle methods?

    If by "read" you mean "read as text", then you can just select the document as a CLOB and return it.
    If by "read" you mean "read and parse", then you can use the Oracle XML Parser for PL/SQL to parse the CLOB into a DOM structure.
    My Building Oracle XML Applications book has lots of examples of doing this, but especially in chapter 5, "Processing XML with PL/SQL".
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • Reading my Xml file in Unity using C#

    Hi, i have to read a xml file like this:
    <UIs>
    <UI>
    <Titolo>
    <Ita>
    Mitocondri
    </Ita>
    <English>
    Mitochondrion
    </English>
    </Titolo>
    <Corpo>
    <Ita>
    I mitocondri sono gli organelli che producono ATP all'interno della cellula,aggiungine di nuovi per aumentare la produzione di ATP
    </Ita>
    <English>
    Mitochondrion
    </English>
    </Corpo>
    <Price>
    120
    </Price>
    <MaxNumber>
    1
    </MaxNumber>
    </UI>
    <UIs>
    How can i make a simple xml reader in c# to read this structure?
    Thanks!

    Try this.  The code writes your sample XML and then reads it back
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Xml;
    using System.Xml.Serialization;
    using System.Xml.Schema;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    const string FILENAME = @"c:\temp\Test.xml";
    static void Main(string[] args)
    UIs uIs = new UIs()
    uI = new UI()
    titolo = new Titolo()
    Ita = "Mitocondri",
    english = "Mitochondrion"
    corpo = new Corpo()
    ita = "I mitocondri sono gli organelli che producono ATP all'interno della cellula,aggiungine di nuovi per aumentare la produzione di ATP",
    english = "Mitochondrion"
    price = 120,
    maxNumber = 1
    XmlSerializer serializer = new XmlSerializer(typeof(UIs));
    StreamWriter writer = new StreamWriter(FILENAME);
    XmlSerializerNamespaces _ns = new XmlSerializerNamespaces();
    _ns.Add("", "");
    serializer.Serialize(writer, uIs, _ns);
    writer.Flush();
    writer.Close();
    writer.Dispose();
    XmlSerializer xs = new XmlSerializer(typeof(UIs));
    XmlTextReader reader = new XmlTextReader(FILENAME);
    UIs newUIs = (UIs)xs.Deserialize(reader);
    [XmlRoot("UIs")]
    public class UIs
    [XmlElement("UI")]
    public UI uI { get; set; }
    [Serializable, XmlRoot("UI")]
    public class UI
    [XmlElement("Titolo")]
    public Titolo titolo { get; set; }
    [XmlElement("Corpo")]
    public Corpo corpo { get; set; }
    [XmlElement("Price")]
    public int price { get; set; }
    [XmlElement("MaxNumber")]
    public int maxNumber { get; set; }
    [Serializable, XmlRoot("Titolo")]
    public class Titolo
    [XmlElement("Ita")]
    public string Ita { get; set; }
    [XmlElement("English")]
    public string english { get; set; }
    [Serializable, XmlRoot("Corpo")]
    public class Corpo
    [XmlElement("Ita")]
    public string ita { get; set; }
    [XmlElement("English")]
    public string english { get; set; }
    jdweng

Maybe you are looking for

  • I can't drag photos into my sd card in iPhoto

    I want to put pictures from my macbook pro into my sd card so i put my sd card into macbook then it shown in iPhoto so i try to drag my photos into it but i can't

  • HT4559 How do I get a list of the 200 new features for iOS 5

    How do I get lists of the apparent 200 new features of iOS 5 for some reason I cannot find any in support on this website or anywhere! Also I want a description of what each feature does. Mainly in safari but I'm getting a bit suspicious if any of th

  • *URGENT* Problem with my Zen Mic

    Okay so I tried updating the firmware to 2.0, no problem. I did that at my sister's house and when I tried to plug in my Zen into my computer to upload songs again, Windows didn't recognize it. So I repeatedly installed/uninstalled the drivers (downl

  • Camera Raw problem; images appearing soft and without definition on import

    Can anyone help? I am having problems with ACR version 4.6 ( I cannot upgrade ACR without upgrading to CS5). When I open a RAW image in ACR, the image appears soft, and with poor definition. As a result, they have failed quality control for upload to

  • Duplication of Serial Number

    We are doing Goods receipt for Order into warehouse through MB31 - 101 movement. There we're  selecting Production Order and entering the quantity. Based on the quantity entered we are getting  fill-in boxes to enter Serial Numbers in "Maintain Seria