Writing XML to file problem

I have the following code, worked just fine in JRE 1.4.2 but when I try to run it on a JRE 1.5 runtime it does not.
Code:
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
Document document = documentBuilder.newDocument();
Element configNode = document.createElement("config");
configNode.setAttribute("name", "something");
document.appendChild(configNode);
code to write the document to a file.
In JRE 1.5 the XML file that is written to the file looks like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
[config: null]
In JRE 1.4.2 the XML file that is written to the file looks like this:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<config name="something">
</config>
In JRE 1.5, after document.appendChild(configNode); I can do document.getDocumentElement(); and it returns the [config: null].
What has changed in 1.5 that breaks creating XML documents? And what is the new correct way to do it?
Any help would be greatly appreciated.

Hmm, ok. We were doing the following to write out the file:
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(
                                            new FileOutputStream(configFile)));
         out.write(headerString); // headerString being <?xml version="1.0" encoding="ISO-8859-1" ?>
         out.newLine();
         out.newLine();
         out.write(document.getDocumentElement().toString());
         out.flush();
         out.close();And before document.getDocumentElement returned the XML so we were able to just write it out, but in 1.5 it was returning the [config: null] thing.

Similar Messages

  • Log4j: XML configuration file problem

    Hello,
    I set up some logging in my existing application with log4j and an xml configuration file. Now I made some changes to my package structure, and some problems occured. So I thougt of setting the logging level of one of my loggers (named myapp.iointerface.DBAccess in the config file). So the only change I did was adding a <param name="Level" value="TRACE"/> to my logger. Now, log4j complains when it reads the configruation file:
    log4j:WARN Continuable parsing error 36 and column 11
    log4j:WARN The content of element type "logger" must match "(level?,appender-ref*)".My config file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
         <appender name="RootConsole" class="org.apache.log4j.ConsoleAppender">
              <param name="Threshold" value="DEBUG"/>
              <param name="Target" value="System.err"/>
              <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %nIn Zeile Nummer: %L %m %n%n"/>
              </layout>
         </appender>
         <appender name="LoginInfo" class="org.apache.log4j.FileAppender">
              <param name="Threshold" value="TRACE"/>
              <param name="File" value="${user.dir}/login_info.log"/>
              <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %nIn Zeile Nummer: %L %m %n%n"/>
              </layout>
         </appender>
         <appender name="DBConnectionInfo" class="org.apache.log4j.FileAppender">
              <param name="Threshold" value="TRACE"/>
              <param name="File" value="${user.dir}/db_connection.log"/>
              <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern" value="%d{dd MM yyyy HH:mm:ss} %p %C %n%m %n%n"/>
              </layout>
         </appender>
         <logger name="myapp.windows.MainFrameController" additivity="false">
              <appender-ref ref="LoginInfo"/>
         </logger>
         <logger name="myapp.iointerface.DBAccess" additivity="false">
              <param name="Level" value="TRACE"/>
              <appender-ref ref="DBConnectionInfo"/>
         </logger>
         <root>
              <param name="Level" value="DEBUG"/>
              <appender-ref ref="RootConsole"/>
         </root>
    </log4j:configuration>Does anybody know what's wrong with that? I don't understand and found nothing googling it netiher. The strange thing is, that logging messages with level TRACE are recorded in the destination file, but the level id DEBUG.
    Thx,
    Julien

    If you look at the error, the parser expects level and not Level
    So :
    <param name="Level" value="TRACE"/>should be :
    <param name="level" value="TRACE"/>Same goes for :
    <param name="Level" value="DEBUG"/>That will solve the problem (even though it is not a critical error)!

  • Writing in INF file  Problem!

    Hi
    I've successfully read from INF file by the following code :
        public String Read_INI(String Path , String Attribute)
            Properties p = new Properties();
            try
                p.load(new FileInputStream(Path));
            catch (Exception e)
                    System.out.println(e);
            return p.getProperty(Attribute);
        }Now I'm facing a problem in writing in INF file
    i used this code but it doesn't work!
        public void Write_INI(String Value, String Attribute, String Path)
            Properties p = new Properties();
            try
                   p.load(new FileInputStream(Path));
                   p.setProperty(Attribute, Value);
            catch (Exception e)
                    System.out.println(e);
        }any ideas ?

    thnx very much :)
    just i added :
                   p.store(new FileOutputStream(Path), Value);after :
         p.setProperty(Attribute, Value);

  • URGENT : Writing to UNIX file problem !

    Hi friends,
    I am stuck at a crucial point while uploading a UNIX file from ABAP program.
    I am using open dataset & then transfer to...the file path.
    But when I go and check the UNIX file it is split into 2 lines (it is supposed to be a
    record with 1 line with 1500 characters) ! It shows a maximum of 255 chars in one line.Moreover,while I download to a text file via Txn CG3Y,some data are missing or truncated etc.
    Please suggest how can I create a record with 1500 characters in UNIX and download it successfully with full data or how can I ensure proper data has been transferred as the record display is truncated.I checked the program its fine,only after transferring I get the problem.
    Thanks,
    Sandip.

    The files would not get truncated. The file actually exists in App. server but you will be able to see only uptil 255 characters. You can check the same by downloading it onto Pres. server by specifying  file type as BIN when you are downloading through CG3Y

  • "encoding = UTF-8" missing while writing XML file using file Adapter

    Hi,
    We are facing an unique problem writing xml file using file adapter. The file is coming without the encoding part in the header of xml. An excerpt of the file that is getting generated:
    <?xml version="1.0" ?>
    <customerSet>
    <user>
    <externalID>51017</externalID>
    <userInfo>
    <employeeID>51017</employeeID>
    <employeeType>Contractor</employeeType>
    <userName/>
    <firstName>Gail</firstName>
    <lastName>Mikasa</lastName>
    <email>[email protected]</email>
    <costCenter>8506</costCenter>
    <departmentCode/>
    <departmentName>1200 Corp IT Exec 8506</departmentName>
    <businessUnit>1200</businessUnit>
    <jobTitle>HR Analyst 4</jobTitle>
    <managerID>49541</managerID>
    <division>290</division>
    <companyName>HQ-Milpitas, US</companyName>
    <workphone>
    <number/>
    </workphone>
    <mobilePhone>
    <number/>
    </customerSet>
    </user>
    So if you see the header the "encoding=UTF-8" is missing after "version-1.0".
    Do we need to configure any properties in File Adapter?? Or is it the standard way of rendering by the adapter.
    Please advice.
    Thanks in advance!!!

    System.out.println(nodeList.item(0).getFirstChild().getNodeValue());

  • Attempt to process file failed with Exception in XML Parser-format problem

    Hi all,
    Iam getting an unusual error in the J2EE stack in XI.
    And the message is:
    006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
    This means that error occured during content conversion of XML to the prescribed file format.
    Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
    Thanks in advance...
    karun

    Hi Bhavesh,
    Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
    The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
    2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
    2006-11-30 17:30:50 Success Start converting XML document content to plain text
    2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
    2006-11-30 17:31:07 Error Exception caught by adapter framework: null
    2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
    2006-11-30 17:31:07 Success The message status set to WAIT.
    2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
    2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
    2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

  • Problem in writing to the file

    I use this labview code to read and save some electrical measurement data from a set of instruments. I am having a problem that the code stops writing to the file after a while. It stops responding too. The only way to stop it then is to use the task manager and kill it. The code was written for an older version of labview but now I am using labview 9. Everything else seems updated but there's a section that uses Write characters to file vi and that may be causing the problem. I made a few futile attempts to change it. I would highly appreciate if someone takes a look at it and could tell me what's going wrong.
    Attachments:
    JANUS 2.2_4K Probe edit (2).vi ‏60 KB

    I will second aeastet's advice - please look into how state machines and producer/consumer loops work and use them.  Your program is very inefficient, but is very similar to what I would have written before I learned about state machines and producer/consumer loops.  Start with the LabVIEW help and go from there.  These forums and the National Instruments website can give you lots of help.
    Two things that will help you for this particular problem:
    At every loop iteration, you are opening the file, seeking to the end of it, appending data, then closing the file.  This is very slow and the code you use, as mentioned above, will not work if the file size exceeds 2GBytes.  I would recommend you open the file once, then use the write primitive to write to it until you finish, then close it.  You do not need the write character to file VI.  No seeking.  No repetitive opening and closing.  You can either open and close outside the loop, or use case structures and boolean flags (as you have done for other things) to open and close inside the loop.
    After you write to the file, if you choose to graph, you are reopening the file, reading the entire thing, and plotting this data.  This is another major slowdown that will only get worse as your file gets bigger.  You would be far better off caching the data in a shift register and plotting it on demand.  It would probably take less memory, as well.  You may want to read the tutorial Managing Large Data Sets in LabVIEW.
    One last tip.  You use Value properties to read and set the values of front panel controls.  Local variables are far faster (about three orders of magnitude).  However, do not make the mistake of using local variables for data storage.  Data is wires.  Local variables are a way to communicate to the front panel.  You seem to have this down, but a reminder to others reading this thread is in order.
    Let us know if you need more explanation or help.  Good luck!
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • Writing XML files

    Hello all
    There's a vast amount of information on the java.sun.com site about parsing XML files:
    * creating DOM trees in memory from an XML file
    * setting up event handlers to be called when an XML file is parsed
    * transforming XML files using XSL.
    However, I can find very little information anywhere about writing XML files in the first place! I'm already aware of two ways to do this:
    (1) create a DOM in memory and write this to a file. If the data is large, though, this isn't feasible.
    (2) just output the XML elements directly to some file as text. This doesn't take account of the encoding, or special characters, and the document is not necessarily then syntactically valid.
    Is there some API which I haven't yet come across that is designed specifically for writing XML data to files? If it's built in to Java 2, then goodness knows how I've missed it all this time; if it's third-party, I'd be grateful for any links.
    Thanks for your help
    Rich Fearn

    I know pastes can be horrible, but this is a working example which I find useful: SAX XML output ;)
    import java.io.*;
    // SAX classes.
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    //JAXP 1.1
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import javax.xml.transform.sax.*;
                    //AlphabetXMLOut(file, alphabets);
    class AlphabetXMLOut {
            public void run(){
                    try{
                            FileOutputStream fos = new FileOutputStream("output.xml");
                            PrintWriter out = new PrintWriter(fos);
                            StreamResult streamResult = new StreamResult(out);
                            // PrintWriter from a Servlet
                            //PrintWriter out = response.getWriter();
                            //StreamResult streamResult = new StreamResult(out);
                            SAXTransformerFactory tf = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
                            // SAX2.0 ContentHandler.
                            TransformerHandler hd = tf.newTransformerHandler();
                            Transformer serializer = hd.getTransformer();
                            serializer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1");
                            serializer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"users.dtd");
                            serializer.setOutputProperty(OutputKeys.INDENT,"yes");
                            hd.setResult(streamResult);
                            hd.startDocument();
                            AttributesImpl atts = new AttributesImpl();
                            // USERS tag.
                            hd.startElement("","","USERS",atts);
                            // USER tags.
                            String[] id = {"PWD122","MX787","A4Q45"};
                            String[] type = {"customer","manager","employee"};
                            String[] desc = {"Tim@Home","Jack&Moud","John D'oe"};
                            for (int i=0;i<id.length;i++){
                                    atts.clear();
                                    atts.addAttribute("","","ID","CDATA",id);
    atts.addAttribute("","","TYPE","CDATA",type[i]);
    hd.startElement("","","USER",atts);
    hd.characters(desc[i].toCharArray(),0,desc[i].length());
    hd.endElement("","","USER");
    hd.endElement("","","USERS");
    hd.endDocument();
    fos.close();
    }catch (IOException e){
    System.err.println ("Unable to write to file");
    System.exit(-1);
    }catch (TransformerConfigurationException tce){
    System.err.println("Error in: TransformerConfigurationException");
    }catch (SAXException spe) {
    // Error generated by the parser
    System.err.println("Error in: (SAXException");
    // Use the contained exception, if any
    Exception x = spe;
    if (spe.getException() != null)
    x = spe.getException();
    x.printStackTrace();
    -Hope this helps

  • Error writing to temporary file location. If this problem persists contact customer support. (-70)

    I've been trying to update/install Creative Cloud applications via Adobe Application Manager and no matter which application I try to install I receive this error: "Error writing to temporary file location. If this problem persists contact customer support. (-70)"
    Prior to this I was having trouble running updates to an application, and it told me I needed "Administrative Privleges" to do so. I have tried everything I can think of with the assistance of the Apple Store. Can anyone at Adobe help me?

    You do not have the permission on the TMP folder for write because of which you are facing the issue.
    Tmp folder is hidden on the Mac hence you have to unhide it first to check the permission and getting it corrected.
    I would recommend you to check the install/update from
    1) New user account
    2) Run the Disk repair utitlity
    if these steps doesn't help then contact support to get the permission corrected.

  • Problem writing to a file on a shared drive

    I am having problems with my application not writing to a file on a shared drive. Actually it works perfect on one computer, but not on any other computer. Any ideas on why this would not work. Here is my code below, I think this may be an issue with permissions on the shared drive but have played with those until I am sick of it and nothing works. Any help on getting it to write to a file on a shared drive would be great.
    report2 = new JButton("Provider Order Entry");
                        report2.addActionListener(new ActionListener() {
                             public void actionPerformed (ActionEvent e) {
                                  if (e.getSource() == report2) {
                                       try {
                                            File file = new File("z:\\Provider Order Entry Reports\\ACCESSFILE.RMD");
                                            FileReader checkAccess = new FileReader(file);
                                            BufferedReader checkAccessBuff = new BufferedReader(checkAccess);
                                            boolean eof = false;
                                            while (!eof) {
                                                 String line = checkAccessBuff.readLine();
                                                 if (line != null) {
                                                      eof = true;
                                                      checkAccess.close();
                                                      checkAccessBuff.close();
                                                      if (!poeSelectionWindow.isShowing()) {
                                                           poeSelectionWindow.setSize(575, 200);
                                                           poeSelectionWindow.setBackground(blue);
                                                           JFrame.setDefaultLookAndFeelDecorated(false);
                                                           poeSelectionWindow.setVisible(true);
                                                      else if (poeSelectionWindow.isShowing()) {
                                                           poeSelectionWindow.setVisible(false);
                                       catch (IOException error) {
                                            Component controllingFrame = null;
                                            JOptionPane.showMessageDialog(controllingFrame,
                                                       "YOU DO NOT HAVE ACCESS TO THIS OPTION" + "\n" +
                                                       "PLEASE CONTACT IRM SUPPORT TO REQUEST ACCESS ",
                                                       "ACCESS DENIED",
                                                       JOptionPane.ERROR_MESSAGE);
                                            try {
                                                 File errorFile = new File("Z:\\LOG\\LOGGER.log");
                                                 String username = System.getProperty("user.name");
                                                 InetAddress addr = InetAddress.getLocalHost();
                                                 Date date = new Date();
                                                 BufferedWriter bw = new BufferedWriter(new FileWriter(errorFile, true));
                                               bw.write("ACCESS ATTEMPTED ON: Provider Order Entry Report BY:" + username + " At Workstation/IP: "
                                                         + addr + " " + date);
                                               bw.newLine();
                                               bw.flush();
                                               bw.close();
                                            catch (IOException error1) {
                                                 System.out.println("Error-- " + error1.toString());
                                            catch (NullPointerException NPE) {
                                                 System.out.println("Error -- " + NPE.toString());                                                       
                                       catch (NullPointerException NPE) {
                                            System.out.println("Error -- " + NPE.toString());                                                       
                        });

    So how do I stop the
    NPE from occurring.By not dereferencing a null reference.
    Thingamabob xyz = doSomethingWhichMightReturnNull();
    if (xyz != null)
    // go ahead and use xyz here
    If you leave out the above "if" statement check, and just willy-nilly try to use xyz when it is null, you'll get the NPE.
    It is occurring on the file
    name. I have never been able to stop the file name
    from throwing a NPE.I don't know how that translates to some lines of your code.

  • Problem writing a segmented file to a a socket

    I have something like this:
    temp.out.writeObject("sot");
    temp.out.flush();
    temp.out.writeObject(fileName);
    temp.out.flush();
    for (int j=0;j<size;j=j+256){
                   byte[] temporary = new byte[256];
                   f.read(temporary,j,256);
                   System.out.println("J este " + j);
                   temp.out.writeObject(String.valueOf(j));
                   temp.out.flush();
                   temp.out.writeObject(temporary);
              temp.out.flush();
    temp.out.writeObject("-3");
         temp.out.flush();
    The problem is that it writes ok the "sot", it's writing ok the file name, and the first 256 bytes.
    After that the for stops at j=0. I don't get it ..

    sorry, I'm not really any good at reading other peoples code, but if it does what I think it does, here is how I do it
    int iHaveRead = 1;
              while(iHaveRead > 0){
              try {
    InBuffer = new byte[4096] ;
    iHaveRead = Sinput2.read(InBuffer, 0, 4096) ;
              } catch(IOException e) {
              System.out.println("Error on Input " + e) ;
              iHaveRead = -1 ;
              if(iHaveRead != -1){
              iToWrite = ProcData(iHaveRead) ;
              // write to Soutput
              try {
              Soutput.write(OutBuffer, 0, iToWrite) ;
    Soutput.flush() ;
    } catch(IOException e) {
              System.out.println("Error on Output " + e) ;
    iHaveRead = -1 ;
    where procData turns inbuffer to outbuffer and returns the size

  • Has anyone ever had a problem with their iphone 4 not syncing and/or writing a backup file?

    Has anyone ever had a problem with their iphone 4 not syncing and/or writing a backup file?  Itunes locks up when i attempt a sync as well as when I transfer my purchases from my phone to Itunes. I'm running Itunes 10.4.1 on iOS 4.3.5.  All of this is running on an 8 year old hp pavillian laptop running XP Pro that is fully updated. Could my phone have a bug or a hardware problem. Are there any known problems with  iOS 4.3.5?  Pretty frustrating problem so I'm hoping that someone has heard of this and can offer some suggestions on a solution.  Thanks a bunch.

    Did you used to have service and now suddenly you don't?
    This happened to me a few years back, and several other iPhone users in my neighborhood, and after a while on the phone with AT&T they figured out that a technician had recently adjusted the receiver/sender on the tower and it was slightly off. They sent them back up and I actually had a better signal after than I did before it went out.
    I would call AT&T and explain the issue you are having and see if they can fix it.
    If you never had service there then like wjosten said it's probably just a bad zone.
    Hope you get it sussed out.
    -PM

  • Problem writing object to file

    Hi everyone,
    I am creating an index by processing text files. No of files are 15000 and index is a B+ Tree. when all files processed and i tried to write it to the file it gives me these errors.
    15000 files processed.
    writing to disk...
    Exception in thread "main" java.lang.StackOverflowError
            at sun.misc.SoftCache.processQueue(SoftCache.java:153)
            at sun.misc.SoftCache.get(SoftCache.java:269)
            at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:244)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1029)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:380)
            at java.util.Vector.writeObject(Vector.java:1018)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1245)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1069)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:380)
            at java.util.Vector.writeObject(Vector.java:1018)
            at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
    ..........can anyone point out the mistake im doing?
    thanks

    the B+ Tree is balanced and is perfectly working without writing to the file. and i am using default writeObject() method of ObjectOutputStream.
      try {
                                FileOutputStream   f_out   = new   FileOutputStream ("tree.idx");
                                ObjectOutputStream obj_out = new   ObjectOutputStream (new BufferedOutputStream (f_out));   
         for (int x = 0, l = files.length; x < l; x++) {
              ProcessTree(files[x].toString());
                    System.out.println("Writing main index to the disk...");
                    obj_out.writeObject (tree); 
                    obj_out.flush();
                    obj_out.close();
                    } catch (Exception e)
          System.out.println (e.toString ());
          System.out.println("Error Writing to Disk!");
        }

  • Problem generating XML data file through XSD

    Hello there,
    I'm trying to generate an XML data file as per the below steps:
    Making a normal schema in query transform.
    Mapping desired source column into query schema.
    Right click on query transform and generating XML schema (XSD) in my local system.
    In object library XML file format adding the XSD with schema as a root element.
    Creating target instance from object library XML file.
    In target file specifying file creation path in my local system. 
    After performing above steps and executing the job getting below error.
    Any help on this will be much appreciated.
    Regards,
    Jagari

    I found some code looking at a similar issue - I don't know how to recover other data (in I guess) the rest of the HTML in the code. I need to find a better reference with details and examples.
    I fixed it by changing:
        ssDebug.trace(moreStuff.xliff.file.body.trans-unit); // - error
    to:
       ssDebug.trace(moreStuff.file.body['trans-unit']); //- no error
    with expected output (no error):
    <trans-unit id="001" resname="IDS_ZXP7_JAM_01">
      <source>If, while you are printing, your printer stops, ...</source>
    </trans-unit>
    <trans-unit id="002" resname="IDS_ZXP7_JAM_02">
      <source>look at the Operator Control Panel (OCP) for the fault description.</source>
    </trans-unit>
    <trans-unit id="003" resname="IDS_ZXP7_JAM_03">
      <source>If the fault is a card jam, open and close the Print Cover (or Options Cover).</source>
    </trans-unit>
    <trans-unit id="004" resname="IDS_ZXP7_JAM_04">
      <source>The printer will initialize and move the jammed card to the Reject Bin.</source>
    </trans-unit>
    <trans-unit id="005" resname="IDS_ZXP7_JAM_TITLE">
      <source>Card Jam</source>
    </trans-unit>

  • Xml action file upload problem. No roles created

    Hi all
    I'm trying to upload to a SAP WAS 6.40 Server an action xml file through visual administration console.
    My xml action file defines the actions and the roles. I can upload it it has no effects on the system (the roles are not created in my system). I have stopped and started my SAP WAS, but it has no effects.
    Can anybody help me?
    Here is a part of my xml action file:
              <PERMISSION CLASS="es.metromadrid.siar.autorizaciones.Autorizacion" NAME="MenuParametrosJubilacionesParcialesPermission" VALUE="" /></ACTION> <ACTION NAME="ActionMenuParametrosJubilacionesParcialesDisplay" ><DESCRIPTION LOCALE="es" VALUE="Parámetros Jubilaciones Parciales"/><PERMISSION CLASS="es.metromadrid.siar.autorizaciones.Autorizacion" NAME="MenuParametrosJubilacionesParcialesPermission" VALUE="" />

    I've now found that the upload operation, when run from Safari, can also fail without the dynamic action/processing graphic option set to no. After the page submit the URL goes to the wwv_flow.accept procedure, runs for about 20 or so seconds and then fails.
    This is starting to sound like a bug, but whether the bug is in Apex or in Safari I'm not sure at this point. It would appear to be Safari given that it works fine in the other browsers I mentioned, but it would be nice to get some independent feedback or verification of this situation.
    If you have any ideas about this situation I am all ears. Thanks.
    Earl
    BTW, I did a search on metalink and didn't come up with anything right away. I'll try again but I'm not holding my breath.

Maybe you are looking for

  • Open Letter to Palm Regarding the Palm Treo 755p

    Dear Palm, As a devoted Palm user for the past 15+ years, I have been praising the versatility, convenience and user friendly Palm hardware/software to my colleagues and family for as many years. As a result many have purchased Palm products and have

  • Mtl.txt and undo.txt in trash after reboot.

    I have recently noticed after a restart that along with the recovered file folder there are several mtl.txt with a matching undo.txt files. If there is more than one of each they are date stamped like this "2009-10-09 00/50/47 -0500undo.txt". When I

  • IPhoto 6.0.6 crashes at startup

    Hello forum! I get crashes at startup with iPhoto 6.0.6 and I've been unsuccsessfull in resolving it on my own. Here's what I've done: * I've repaired premissions with disk utility - that made no difference. * I've deleted the iPhoto.plist file - not

  • Contact backup on pc

    trying to backup my contacts on my pc! any good apps for this?

  • About Variable defining

    hello, 1)Is 'Long variable' the same as 'long variable'? will they both compile? 2) i wrote a small program, and the named the CLASS Fruit. I then saved the file as fruit.java (notice the capitalization) . When i typed javac fruit.java, an error was