I am getting [lecture:null] output while parsing a lecture tag

I tell you that it was working fine a few days ago but now it's giving the probelem. I am tired any one would have to take a look.
Suppose rootElement is the document root tag object
---------now
NodeList lectures=rootElement.getElementsByTagName("lecture");
int allLectures=lectures.getLength();
if(allLectures==0)
     out.println("you have not created any <b>lecture</b> TAGS.");
     return;
Element lecture=null;
lecture=(Element)lectures.item(1);
out.print(lecture);
ERROR: the lecture is shown as [lecture:null].. any remidie????
This was working fine a few weeks ago. But now it's still giving this error using JAXP
I have tried XML4J too.
xml code is:
<?xml version='1.0'?>
<courseMaterial courseId="1">
<lecture id="1" title="Polymorphism">
<paragraph>Polymorphism is the combination of two words, one is "Poly" that means many and other is "Morphism" that means shapes. So the polymorphism means "Many shapes" or "Many faces". So the idea of Polymorphism comes up with the fact that "One thing having many faces".</paragraph>
<heading>Pointers to base class</heading>
<paragraph>One of the greater advantages of deriving classes is that a pointer to a derived class is type-compatible with a pointer to its base class. This section is fully dedicated to taking advantage of this powerful C++ feature. For example, we are going to rewrite our program about the rectangle and the triangle of the previous section considering this property:</paragraph>
<example>Human is a one thing but all humans have different properties.</example>
<paragraph>The function main creates two pointers that point to objects of class CPolygon, that are ppoly1 and ppoly2. These are assigned to the addresses of rect and trgl, and because they are objects of classes derived from CPolygon they are valid assignations.</paragraph>
<paragraph>The only limitation of using ppoly1 and ppoly2 instead of rect and trgl is that both ppoly1 and ppoly2 are of type CPolygon* and therefore we can only refer the members that CRectangle and CTriangle inherit from CPolygon. For that reason when calling to the area() members we have not been able to use them (*ppoly1 and *ppoly2).</paragraph>
<paragraph>To make it possible for the pointers to class CPolygon admit area() as a valid member, this should also have been declared in the base class and not only in its derived ones. (see the following section).</paragraph>
<heading>Virtual members</heading>
<paragraph>In order to declare an element of a class which we are going to redefine in derived classes we must precede it with the keyword virtual so that the use of pointers to objects of that class can be suitable.</paragraph>
<heading>Abstract base classes</heading>
<paragraph>Basic abstract classes are something very similar to the class CPolygon of our previous example. The only difference is that in our previous example we have defined a valid area() function for objects that were of class CPolygon (like object poly), whereas in an abstract base class we could have simply left without defining this function by appending =0 (equal to zero) to the function declaration.</paragraph>
</lecture>
<lecture id="2" title="Polymorphism1">
<paragraph>Polymorphism is the combination of two words, one is "Poly" that means many and other is "Morphism" that means shapes. So the polymorphism means "Many shapes" or "Many faces". So the idea of Polymorphism comes up with the fact that "One thing having many faces".</paragraph>
<heading>Pointers to base class</heading>
<paragraph>One of the greater advantages of deriving classes is that a pointer to a derived class is type-compatible with a pointer to its base class. This section is fully dedicated to taking advantage of this powerful C++ feature. For example, we are going to rewrite our program about the rectangle and the triangle of the previous section considering this property:</paragraph>
<example>Human is a one thing but all humans have different properties.</example>
<paragraph>The function main creates two pointers that point to objects of class CPolygon, that are ppoly1 and ppoly2. These are assigned to the addresses of rect and trgl, and because they are objects of classes derived from CPolygon they are valid assignations.</paragraph>
<paragraph>The only limitation of using ppoly1 and ppoly2 instead of rect and trgl is that both ppoly1 and ppoly2 are of type CPolygon* and therefore we can only refer the members that CRectangle and CTriangle inherit from CPolygon. For that reason when calling to the area() members we have not been able to use them (*ppoly1 and *ppoly2).</paragraph>
<paragraph>To make it possible for the pointers to class CPolygon admit area() as a valid member, this should also have been declared in the base class and not only in its derived ones. (see the following section).</paragraph>
<heading>Virtual members</heading>
<paragraph>In order to declare an element of a class which we are going to redefine in derived classes we must precede it with the keyword virtual so that the use of pointers to objects of that class can be suitable.</paragraph>
<heading>Abstract base classes</heading>
<paragraph>Basic abstract classes are something very similar to the class CPolygon of our previous example. The only difference is that in our previous example we have defined a valid area() function for objects that were of class CPolygon (like object poly), whereas in an abstract base class we could have simply left without defining this function by appending =0 (equal to zero) to the function declaration.</paragraph>
</lecture>
</courseMaterial>

what do you expect from this code out.print(lecture); ?
lecture is an Element, toString() is not implemented, so print correctly displays some fuzzy pointer information, nothing more...

Similar Messages

  • Getting the following error while parsing the values usng xml parser

    Hi
    I am getting the following error while parsing the values using the code in r12 instance on linux
    declare
    XML_PARSER XMLPARSER.PARSER;
    DOC XMLDOM.DOMDOCUMENT;
    DOCELEMENT DBMS_XMLDOM.DOMELEMENT;
    BEGIN
    -- NEW PARSER
    XML_PARSER := XMLPARSER.NEWPARSER;
    -- SET SOME CHARACTERISTICS
    XMLPARSER.SETVALIDATIONMODE(XML_PARSER, FALSE);
         IF P_DIR IS NOT NULL AND P_FILENAME IS NOT NULL
         THEN
         FND_FILE.PUT_LINE(FND_FILE.LOG,'DIRECTORY FOUND'||'-'||P_DIR);
         XMLPARSER.SETBASEDIR(XML_PARSER, P_DIR);     
         -- PARSE INPUT FILE
         FND_FILE.PUT_LINE(FND_FILE.LOG,'FILE FOUND'||'-'||P_FILENAME);
         XMLPARSER.PARSE(XML_PARSER, P_DIR || '/' || P_FILENAME);     
         -- GET DOCUMENT
         DOC := XMLPARSER.GETDOCUMENT(XML_PARSER);
         LOAD_SUPP(doc);
         ELSE
         DBMS_OUTPUT.PUT_LINE('DIRACTORY/FILENAME CANNOT BE NULL');
         END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('DATA NOTINSERTED'||sqlerrm);
         ROLLBACK;
    END
    I am getting the following error
    DIRACTORYL-/home/appldevORA-0000: normal, successful completion
    FILE NAME-suppliersample_data.xmlORA-0000: normal, successful completion
    DATA NOTINSERTEDORA-31001: Invalid resource handle or path name "/home/appldev/suppliersample_data.xml"
    ORA-06512: at "SYS.XDBURITYPE", line 11
    ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 142
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    ORA-29280: invalid directory path
    It could be great if some one could give a suggestion/solution.
    Thanks
    Ajesh

    Besides this is not the correct forum try to google the error message first before posting:
    http://ora-29280.ora-code.com/
    cheers

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Getting incorrect err message while parsing DTD

    Hi,
    When I try to parse the DTD given below, the DomParser reports a
    SAXException
    <!ELEMENT DataArea (Workers)>
    <!ELEMENT Workers (Worker*)>
    <!ELEMENT Worker (Age?,Lodging?,Skills?)>
    <!ATTLIST Worker
    WorkerName CDATA #REQUIRED>
    <!ELEMENT WorkerName (#PCDATA)>
    <!ELEMENT Age (#PCDATA)>
    <!ELEMENT Lodging (#PCDATA)>
    <!ELEMENT Skills (Skill*)>
    <!ELEMENT Skill (SkillName,Ability?,Description*)>
    <!ELEMENT SkillName (#PCDATA)>
    <!ELEMENT Ability (#PCDATA)>
    <!ELEMENT Description EMPTY>
    <!ATTLIST Description
    SkillDescription CDATA #IMPLICIT>
    <!ELEMENT SkillDescription (#PCDATA)>
    This is the exception
    Attribute value should start with quote.
    at oracle.xml.parser.v2.XMLError.flushErrors
    (XMLError.java:201)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:107)
    at oracle.xml.parser.v2.XMLError.error(XMLError.java:145)
    at
    oracle.xml.parser.v2.NonValidatingParser.parseAttrValue
    (NonValidatingParser.java:1156)
    at oracle.xml.parser.v2.ValidatingParser.parseAttlistDecl
    (ValidatingParser.java:297)
    at
    oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl
    (NonValidatingParser.java:454)
    at oracle.xml.parser.v2.NonValidatingParser.parseDTD
    (NonValidatingParser.java:166)
    at oracle.xml.parser.v2.DOMParser.parseDTD
    (DOMParser.java:282)
    at oracle.apps.ero.xml.XmlPseudoDom.readCanonicalXmlv2
    (XmlPseudoDom.java:804)
    at
    oracle.apps.ero.xml.test.XmlFrameworkTester.testXmlPseudoDom
    (XmlFrameworkTester.java:137)
    at oracle.apps.ero.xml.test.XmlFrameworkTester.main
    (XmlFrameworkTester.java:21)
    The code snippet that causes this exception is given below.
    DOMParser dp=new DOMParser();
    dp.setValidationMode(true);
    String dtd=getDTD(rootVO);
    Diagnostic.println("Attempting to Validate inbound xml
    against DTD:\n"+dtd);
    try
    dp.parseDTD(new StringReader(dtd),XML_ROOT_ELEMENT_NAME);
    Is this behaviour a known bug? Is there any known workaround?
    null

    Keki Burjorjee (Oracle) (guest) wrote:
    : Hi,
    : When I try to parse the DTD given below, the DomParser reports
    a
    : SAXException
    : <!ELEMENT DataArea (Workers)>
    : <!ELEMENT Workers (Worker*)>
    : <!ELEMENT Worker (Age?,Lodging?,Skills?)>
    : <!ATTLIST Worker
    : WorkerName CDATA #REQUIRED>
    : <!ELEMENT WorkerName (#PCDATA)>
    : <!ELEMENT Age (#PCDATA)>
    : <!ELEMENT Lodging (#PCDATA)>
    : <!ELEMENT Skills (Skill*)>
    : <!ELEMENT Skill (SkillName,Ability?,Description*)>
    : <!ELEMENT SkillName (#PCDATA)>
    : <!ELEMENT Ability (#PCDATA)>
    : <!ELEMENT Description EMPTY>
    : <!ATTLIST Description
    : SkillDescription CDATA #IMPLICIT>
    : <!ELEMENT SkillDescription (#PCDATA)>
    : This is the exception
    : Attribute value should start with quote.
    : at oracle.xml.parser.v2.XMLError.flushErrors
    : (XMLError.java:201)
    : at oracle.xml.parser.v2.XMLError.error(XMLError.java:107)
    : at oracle.xml.parser.v2.XMLError.error(XMLError.java:145)
    : at
    : oracle.xml.parser.v2.NonValidatingParser.parseAttrValue
    : (NonValidatingParser.java:1156)
    : at oracle.xml.parser.v2.ValidatingParser.parseAttlistDecl
    : (ValidatingParser.java:297)
    : at
    : oracle.xml.parser.v2.NonValidatingParser.parseMarkupDecl
    : (NonValidatingParser.java:454)
    : at oracle.xml.parser.v2.NonValidatingParser.parseDTD
    : (NonValidatingParser.java:166)
    : at oracle.xml.parser.v2.DOMParser.parseDTD
    : (DOMParser.java:282)
    : at oracle.apps.ero.xml.XmlPseudoDom.readCanonicalXmlv2
    : (XmlPseudoDom.java:804)
    : at
    : oracle.apps.ero.xml.test.XmlFrameworkTester.testXmlPseudoDom
    : (XmlFrameworkTester.java:137)
    : at oracle.apps.ero.xml.test.XmlFrameworkTester.main
    : (XmlFrameworkTester.java:21)
    : The code snippet that causes this exception is given below.
    : DOMParser dp=new DOMParser();
    : dp.setValidationMode(true);
    : String dtd=getDTD(rootVO);
    : Diagnostic.println("Attempting to Validate inbound xml
    : against DTD:\n"+dtd);
    : try
    : dp.parseDTD(new StringReader(dtd),XML_ROOT_ELEMENT_NAME);
    : Is this behaviour a known bug? Is there any known workaround?
    The reason for the error is a problem in your DTD. You should
    have <!ELEMENT Worker(Workername, Age?, Lodging?, Skills?)>
    instead of only <!ELEMENT Worker(Age?, Lodging?, Skills?)>.
    Further down, it's similar for !ELEMENT Skill, in which
    SkillDescription should be added.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

  • Strange outputs while parsing String to Double

    Hi All,
    I am writing a simple MIDlet on MIDP 2.0 and CLDC 1.1, where I need to convert two strings into Double calculate their difference and then display the result back on the screen.
    The code I am using is:
        double difference = Double.parseDouble("1235.7") - Double.parseDouble("1234.5");
        String result = (String)Double.toString(difference); The output generated is : 1.2000000000000455 which should be only 1.2
    If I replace the values with "1235" and "1234.1" the output is 0.900000000000091 which should be 0.9
    However, if I change the values to "1235.6" and "1234.1" the output generated is 1.5 which is perfectly fine. Means this happens only for some specific set of values.
    Has anyone ever faced such a situation or if anyone knows a proper workaround to fix this please help me out.
    Thanks.

    Is this normal? does this also happens in case of J2SE I have never tried a similar
    program on j2se.If you are talking about the innaccuracies in the calculations then yes. Look at the url I gave in my previous post, some guy was asking the same thing and it wasn't about J2ME.
    In fact, this happens in every other language as well. It a limitation of the format doubles are stored in.
    shmoove

  • I keep getting a null value

    i'm working on this project i'm trying to copy the fFile (in this case the fFile is the file that i'm trying to copy from the M: drive which is a tree directory) to the C: drive
    please i need any help that i can get
    thanks
    * MenuPanel.java
    * Created on August 16, 2007, 11:03 AM
    import java.util.zip.*;
    import java.util.concurrent.*;
    import java.util.concurrent.locks.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import java.sql.*;
    public class MenuPanel extends JFrame
    private JButton fMenuOpen;
    private JButton fMenuSave;
    private JButton fMenuClose;
    private JPanel northPanel;
    private JPanel southPanel;
    private Lock lockprograms;
    JTextArea fTextArea;
    JavaFilter fJavaFilter = new JavaFilter ();
    File fFile = new File ("file to be copy");
    File dir = new File("C:\\ActiveMachineData");
    /** Creates a new instance of MenuPanel */
    public MenuPanel(String title)
    super("Engineer Drive");
    // add a north panel
    northPanel = new JPanel();
    northPanel.setLayout(new GridLayout(0,3,1,2));
    fMenuOpen = new JButton("Check Out");
    northPanel.add(fMenuOpen);
    fMenuSave = new JButton("Save");
    northPanel.add(fMenuSave);
    fMenuClose = new JButton("Quit");
    northPanel.add(fMenuClose);
    add(northPanel);
    Container content_pane = getContentPane ();
    // Create a user interface.
    content_pane.setLayout ( new GridLayout (1,2) );
    // fTextArea = new JTextArea ("");
    content_pane.add ( northPanel, "north");
    setSize (300,100);
    //register the event
    OpenFileHandler handle = new OpenFileHandler(); //creates an event handler
    SaveFileHandler handle1 = new SaveFileHandler(); //creates an event handler
    QuitFileHandler handle2 = new QuitFileHandler(); //creates an event handler
    fMenuOpen.addActionListener(handle); //handle the event
    fMenuSave.addActionListener(handle1); //handle the event
    fMenuClose.addActionListener(handle2); //handle the event
    private class OpenFileHandler implements ActionListener
    public void actionPerformed(ActionEvent event)
    boolean status = false;
    //status = openFile ();
    status = copyFile();
    if (!status)
    JOptionPane.showMessageDialog (
    null,
    "Error copying file!", "Copy File Error",
    JOptionPane.ERROR_MESSAGE);
    else if (status)
    JOptionPane.showMessageDialog(null,
    "Coping File...", "sucess message",
    JOptionPane.INFORMATION_MESSAGE);
    private class SaveFileHandler implements ActionListener
    public void actionPerformed(ActionEvent event)
    boolean status = false;
    status = saveFile ();
    if (!status)
    JOptionPane.showMessageDialog(
    null,
    "IO error in saving file!!", "File Save Error",
    JOptionPane.ERROR_MESSAGE);
    private class QuitFileHandler implements ActionListener
    public void actionPerformed(ActionEvent event)
    try
    dispose ();
    DabaseLog bl = new DabaseLog();
    bl.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    bl.setSize(250, 200);
    bl.setLocation(300,300);
    bl.setVisible(true);
    catch(SQLException sqlException)
    JOptionPane.showMessageDialog(null, sqlException.getMessage(), "Database error", JOptionPane.ERROR_MESSAGE);
    catch(ClassNotFoundException classnotfound)
    JOptionPane.showMessageDialog(null, classnotfound.getMessage(), "Database error", JOptionPane.ERROR_MESSAGE);
    * Use a JFileChooser in Open mode to select files
    * to open. Use a filter for FileFilter subclass to select
    * for *.java files. If a file is selected then read the
    * file and place the string into the textarea.
    boolean copyFile ()
    // 8/29
    boolean checkOut = false;
    String file_string = readFile (fFile);
    JFileChooser fc = new JFileChooser ();
    fc.setDialogTitle ("Copy File");
    // Choose only files, not directories
    fc.setFileSelectionMode ( JFileChooser.FILES_AND_DIRECTORIES);
    // Start in Mfg-eng-01 directory
    fc.setCurrentDirectory (new File ("M:"));
    // Set filter for Java source files.
    fc.setFileFilter (fJavaFilter);
    // Now open chooser
    int result = fc.showOpenDialog (this);
    if (result == JFileChooser.CANCEL_OPTION)
    // return true;
    else if (result == JFileChooser.APPROVE_OPTION)
    // throw
    //8/29      
    // File srcfile= null;
    // File destFile= null;
    /* try
    InputStream in = new FileInputStream(dir+"\\"+fFile);
    System.out.print(dir);
    } catch (FileNotFoundException ex) {
    ex.printStackTrace();
    try
    OutputStream out = new FileOutputStream(dir+"\\"+fFile);
    } catch (FileNotFoundException ex) {
    ex.printStackTrace();
    // catch (IOException io)
    // System.out.print(io)
    //8/30
    try
    {  String Folder = "C:\\ActiveMachineData";
    File file = null;
    String dataString = null;
    // String document = new fFile();
    PrintWriter out =
    new PrintWriter (new BufferedWriter (new FileWriter (Folder+"\\"+file)));
    System.out.println(file);
    out.print (dataString);
    out.flush ();
    out.close ();
    catch (IOException e)
    return true;
    return true;
    // copyFile
    * Use a JFileChooser in Save mode to select files
    * to open. Use a filter for FileFilter subclass to select
    * for "*.java" files. If a file is selected, then write the
    * the string from the textarea into it.
    boolean saveFile ()
    File file = null;
    JFileChooser fc = new JFileChooser ();
    // Start in current directory
    fc.setCurrentDirectory (new File ("M:"));
    // Set filter for Java source files.
    fc.setFileFilter (fJavaFilter);
    // Set to a default name for save.
    fc.setSelectedFile (fFile);
    // Open chooser dialog
    int result = fc.showSaveDialog (this);
    if (result == JFileChooser.CANCEL_OPTION)
    return true;
    // if ()
    else if (result == JFileChooser.APPROVE_OPTION)
    fFile = fc.getSelectedFile ();
    if (fFile.exists ())
    int response = JOptionPane.showConfirmDialog (null,
    "Overwrite existing file?","Confirm Overwrite",
    JOptionPane.OK_CANCEL_OPTION,
    JOptionPane.QUESTION_MESSAGE);
    if (response == JOptionPane.CANCEL_OPTION)
    return false;
    return writeFile (fFile, fTextArea.getText ());
    else
    return false;
    } // saveFile
    /** Use a BufferedReader wrapped around a FileReader to read
    * the text data from the given file.
    public String readFile (File file)
    StringBuffer fileBuffer;
    String fileString=null;
    String line;
    try
    FileReader in = new FileReader (file);
    BufferedReader dis = new BufferedReader (in);
    fileBuffer = new StringBuffer () ;
    while ((line = dis.readLine ()) != null)
    fileBuffer.append (line + "\n");
    in.close ();
    fileString = fileBuffer.toString ();
    catch (IOException e )
    return null;
    return fileString;
    } // readFile
    * Use a PrintWriter wrapped around a BufferedWriter, which in turn
    * is wrapped around a FileWriter, to write the string data to the
    * given file.
    public static boolean writeFile (File file, String dataString)
    try
    System.out.println("system");
    PrintWriter out =
    new PrintWriter (new BufferedWriter (new FileWriter (file)));
    out.print (dataString);
    out.flush ();
    out.close ();
    catch (IOException e)
    return false;
    return true;
    } // writeFile
    }

    I apology ,
    basically what i'm trying to do is copy a file from one directory to another
    the Ffile is a string to get the file name from the JFileChooser.
    i did a System.out on different block of the code and this is what i'm getting, that's where the null is coming from.
    Database connected
    LOG_IN DATABASE AdmLogIN     
    AdmPassword     
    null
    BUILD SUCCESSFUL (total time: 23 seconds)
    also in the other directory that i want to copy the file i'm getting that null output
    boolean copyFile ()
    // 8/29
    String file_string = readFile (fFile);
    JFileChooser fc = new JFileChooser ();
    fc.setDialogTitle ("Copy File");
    // Choose only files, not directories
    fc.setFileSelectionMode ( JFileChooser.FILES_AND_DIRECTORIES);
    // Start in Mfg-eng-01 directory
    fc.setCurrentDirectory (new File ("M:"));
    // Set filter for Java source files.
    fc.setFileFilter (fJavaFilter);
    // Now open chooser
    int result = fc.showOpenDialog (this);
    if (result == JFileChooser.CANCEL_OPTION)
    // return true;
    else if (result == JFileChooser.APPROVE_OPTION)
    //8/30
    try
    {  String Folder = "C:\\ActiveMachineData";
    File file = null;
    String dataString = null;
    PrintWriter out =
    new PrintWriter (new BufferedWriter (new FileWriter (Folder+"\\"+file)));
    System.out.println(file);
    out.print (dataString);
    out.flush ();
    out.close ();
    catch (IOException e)
    return true;
    return true;
    // copyFile

  • Error while parsing AS2 message: AUTHENTICATION_ERROR #

    Hi Experts,
      While a Trdae Partner is trying to send a file through AS2 Seeburger, we are getting this error,
    "Error while parsing AS2 message: AUTHENTICATION_ERROR # "
    in Seeburger tool and could not able to receive the file from the Trade Partner.
    Can you please suggest any solutions.
    Thanks,
    Kumar

    Hi Kumar,
    The trading partner is sending you a signed message and this needs to be authenticated in SAP PI. This authentication is done via the "Authentication Required" checkbox in the AS2 sender channel. Also, in the sender agreement, you need to give correct values for the authentication certificates for this partner so that you are able to authenticate, decrypt & process the message in PI.
    In case you have access to the Seeburger Installation, you can take a look at the AS2 Config guide which explains more about this error.
    >>> Error while parsing AS2 message: AUTHENTICATION_ERROR
    Cause:
    An incoming AS2 message cannot be authenticated.
    Solution:
    - Check the authentication certificate settings.
    - Disable the u201Cauthentication requiredu201D flag, if messages without authentication are to be received.
    Hope this helps.
    Regards, Gaurav

  • How to get automatic message output

    Hi,
    How to get automatic message output while creating po cause i have done all setting in the config but still it does not work what else i have to do.
    And 1 more thing how we can maintain condition record for Printoutput & External send for one output type.
    Regards,
    Anant

    Hi,
    Please follow the below steops for the Output of Purchase Order
    1. Condition Table
    SPRO > Material Management> Purchasing -> Message -> Output Control->Condition Tables->Define Condition Table for Purchase Order
    Select:
    Purchasing Doc. Type, Purch. Organization, Vendor
    2. Access Sequences
    SPRO ->     -> Purchasing -> Message -> Output Control->Access Sequences->Define Condition Table for Purchase Order
    3. Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Types->Define Message Type for Purchase Order
    *4. Message Determination Schemas*
    4.1. Message Determination Schemas
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Maintain Message Determination Schema
    4.2. Assign Schema to Purchase Order
    SPRO -> Material Management-> Purchasing -> Message -> Output Control->Message Schema->Define Message Schema for Purchase Order-> Assign Schema to Purchase Order
    5. Partner Roles per Message Type
    SPRO -> Material Management-> Purchasing -> Message -> Output Control-> Partner Roles per Message Type ->Define Partner Role for Purchase Order
    6. Condition Record
    Navigation Path: SAP Menu-> Logistics -> Material Management -> Purchasing-> Master data-Messages- MN04
    Here you can maintain the condition record.
    All above steps u can do from transacton NACE also
    now when u create po in the messages u will get the out put method as u have maintained in the above steps.
    Regards,
    Manish

  • Error while parsing SRVCTL output.

    OS : Sun 5.10 SPARC Machine
    DB :11.2.0.1 (Cluster Nodes)
    On DB Control, while checking "Cluster Managed Database Services " getting below error.
    Error while parsing SRVCTL output. Ensure that SRVCTL is functioning properly. I have checked the status of all the processes on that node, looks gsd process is down and in the db control log file getting below error .
    at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
    at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
    at java.lang.Thread.run(Thread.java:595)
    2010-11-02 10:05:39,751 [Thread-42] ERROR db.rac parseStatusConfig.1010 - SrvctlDatabaseInfo.parseStatusConfig: no parsable status l
    ines.
    2010-11-02 10:38:50,440 [EMUI_10_38_49_/console/rac/racSitemap] WARN em.MetricEngine getCachedData.316 - Metric RAC_HOMETAB contain
    s no cached data!
    2010-11-02 10:38:51,260 [EMUI_10_38_49_/console/rac/racSitemap] WARN em.MetricEngine getCachedData.316 - Metric RAC_HOMETAB contain
    s no cached data!
    2010-11-02 10:39:11,514 [Thread-48] ERROR db.rac parseStatusConfig.1010 - SrvctlDatabaseInfo.parseStatusConfig: no parsable status l
    ines.
    What could be the issue ?

    what command did you execute?
    does it work from the second node?
    did you try rebooting the node?
    did you check clusterware services? some of the processess may have not started properly or died ...
    has it worked before ? or its a new installation ?

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

  • IMAP error messages "Error while parsing IMAP response"

    I'm getting thousands of IMAP errors every hour, can I shut those off?
    My console log is flooded with them and it keeps me from seeing anything else
    in the system log.  The IMAP errors happen continuously while Mail.app is running.
    It looks like debug output from Mail.app !?!
    IMAP server is Beehive Server -- it's my company email so I need to use it.
    Windows Outlook (Windows 7) shows no errors, possibly they're silently ignored
    on Windows.  My disk is writing almost continuously when Mail.appo is running.
    Sample error:  (thousands are generated per hour)
    Apr  8 10:29:18 Js-Coolio-iMac.local Mail[22903]: Error while parsing IMAP response (null): Incomplete response
              Remaining text: <    Gian Luigi<br>>
              Full text: <    Gian Luigi<br>>
    Any idea how to shut these off?  I reinstalled Mavericks, no improvement as expected
    since this seems to be Mail complaining about IMAP protocol issues.
    Thanks in advance for any suggestions.  And yes I've rebooted, reinstalled the IMAP account,
    reinstalled Mavericks, etc.
    Entrecheck follows...
    Hardware Information:
              iMac (27-inch, Late 2009)
              iMac - model: iMac11,1
              1 2.8 GHz Intel Core i7 CPU: 4 cores
              12 GB RAM
    Video Information:
              ATI Radeon HD 4850 - VRAM: 512 MB
    System Software:
              OS X 10.9.2 (13C64) - Uptime: 9 days 20:39:45
    Disk Information:
              ST31000528ASQ disk0 : (1 TB)
                        EFI (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) / [Startup]: 999.35 GB (801.18 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              OPTIARC DVD RW AD-5680H 
    USB Information:
              Seagate Backup+ Desk 3 TB
                        disk1s1 (disk1s1) <not mounted>: 209.7 MB
                        JOHN TM (disk1s2) /Volumes/JOHN TM: 2 TB (1.81 TB free)
                        LIU TM (disk1s3) /Volumes/LIU TM: 500 GB (203.45 GB free)
                        Untitled 3 (disk1s4) /Volumes/Untitled 3: 499.39 GB (498.94 GB free)
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
              Apple Internal Memory Card Reader
              Griffin Technology, Inc iMic USB audio system
              Apple, Inc. Keyboard Hub
                        Logitech USB Trackball
                        Apple, Inc Apple Keyboard
              Apple Computer, Inc. IR Receiver
              Apple Inc. Built-in iSight
    FireWire Information:
    Thunderbolt Information:
    Configuration files:
              /etc/hosts - Count: 4
    Kernel Extensions:
              com.seagate.driver.PowSecDriverCore          (5.2.4 - SDK 10.4)
              com.seagate.driver.PowSecLeafDriver_10_5          (5.2.4 - SDK 10.5)
    Launch Daemons:
              [System]          com.adobe.fpsaud.plist 3rd-Party support link
              [System]          com.barebones.textwrangler.plist 3rd-Party support link
              [System]          com.oracle.java.Helper-Tool.plist 3rd-Party support link
    Launch Agents:
              [System]          com.oracle.java.Java-Updater.plist 3rd-Party support link
              [System]          net.culater.SIMBL.Agent.plist 3rd-Party support link
    User Launch Agents:
              [not loaded]          com.adobe.ARM.[...].plist 3rd-Party support link
              [not loaded]          com.google.keystone.agent.plist 3rd-Party support link
              [not loaded]          com.leadertech.PowerRegister.SEA1.7c77b2ab072a21a06107fccae868ff4b.plist 3rd-Party support link
              [not loaded]          com.valvesoftware.steamclean.plist 3rd-Party support link
    User Login Items:
              Flux
              smcFanControl
              SpeechSynthesisServer
              AdobeResourceSynchronizer
              Flux (13.0)
    Internet Plug-ins:
              Default Browser: Version: 537 - SDK 10.9
              Flip4Mac WMV Plugin: Version: 3.1.0.24   - SDK 10.8 3rd-Party support link
              AmazonMP3DownloaderPlugin101750: Version: AmazonMP3DownloaderPlugin 1.0.17 - SDK 10.4 3rd-Party support link
              RealPlayer Plugin: Version: (null) 3rd-Party support link
              AdobePDFViewerNPAPI: Version: 10.1.3 3rd-Party support link
              FlashPlayer-10.6: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              MRJPlugin: Version: 1.0-JEP-0.9.0 3rd-Party support link
              QuickTime Plugin: Version: 7.7.3
              Flash Player: Version: 12.0.0.77 - SDK 10.6 3rd-Party support link
              iPhotoPhotocast: Version: 7.0
              AdobePDFViewer: Version: 10.1.3 3rd-Party support link
              JavaAppletPlugin: Version: Java 7 Update 51 3rd-Party support link
    Safari Extensions:
              Ghostery: Version: 5.1.0
              AdBlock: Version: 2.6.18
              Turn Off the Lights: Version: 2.3.0.5
    Audio Plug-ins:
              BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
              AirPlay: Version: 2.0 - SDK 10.9
              AppleAVBAudio: Version: 203.2 - SDK 10.9
              iSightAudio: Version: 7.7.3 - SDK 10.9
    iTunes Plug-ins:
              Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
    User Internet Plug-ins:
              WebEx: Version: 1.0 3rd-Party support link
              WebEx64: Version: 1.0 - SDK 10.5 3rd-Party support link
              Google Earth Web Plug-in: Version: 7.1 3rd-Party support link
    3rd Party Preference Panes:
              RCDefaultApp
              Flash Player  3rd-Party support link
              Flip4Mac WMV  3rd-Party support link
              Java  3rd-Party support link
              MenuMeters  3rd-Party support link
    Old Applications:
              asannotation2:          Version: 10.21.26.0 - SDK 10.5 3rd-Party support link
                        /Users/[redacted]/Library/Application Support/WebEx Folder/924/asannotation2.app
              convertpdf:          Version: 1.2 - SDK 10.5 3rd-Party support link
                        /Users/[redacted]/Library/Application Support/WebEx Folder/1224/convertpdf/convertpdf.app
              Neverwinter Nights 2:          Version: 1.23.1765 - SDK 10.5 3rd-Party support link
              Amazon MP3 Downloader:          Version: INFO_PLIST_VERSION - SDK 10.4 3rd-Party support link
              TurboTax Deluxe 2011:          Version: 2011.r17.007 - SDK 10.4 3rd-Party support link
              Ventrilo:          Version: 3.0.13 - SDK 10.5 3rd-Party support link
              /Users/[redacted]/Library/Application Support/WebEx Folder/1224
                        Cisco WebEx Meeting Center:          Version: 1207.04.2732.10 - SDK 10.5 3rd-Party support link
                        asannotation2:          Version: 8.25.31.0 - SDK 10.5 3rd-Party support link
                        atmsupload:          Version: 4.14.29.0 - SDK 10.5 3rd-Party support link
                        convertpdf:          Version: 1.2 - SDK 10.5 3rd-Party support link
    Time Machine:
              Skip System Files: NO
              Auto backup: YES
              Volumes being backed up:
                        Macintosh HD: Disk size: 930.71 GB Disk used: 184.55 GB
              Destinations:
                        JOHN TM [Local] (Last used)
                        Total size: 2 
                        Total number of backups: 51
                        Oldest backup: 2014-01-09 05:11:53 +0000
                        Last backup: 2014-04-04 08:40:29 +0000
                        Size of backup disk: Adequate
                                  Backup size 2  > (Disk used 184.55 GB X 3)
              Time Machine details may not be accurate.
              All volumes being backed up may not be listed.
    Top Processes by CPU:
                   2%          WindowServer
                   1%          EtreCheck
                   0%          SystemUIServer
                   0%          com.apple.WebKit.Networking
                   0%          softwareupdated
    Top Processes by Memory:
              344 MB          Safari
              258 MB          mds_stores
              258 MB          com.apple.IconServicesAgent
              172 MB          softwareupdated
              172 MB          soffice
    Virtual Memory Information:
              3.05 GB          Free RAM
              5.12 GB          Active RAM
              2.71 GB          Inactive RAM
              1.05 GB          Wired RAM
              7.04 GB          Page-ins
              15 MB          Page-outs

    try Mail is not syncing an imap account correctly
    (https://discussions.apple.com/message/21904088#21904088) , it just worked for me.

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • Issue while parsing the chinese character from Mime Message

    Hi,
    I have a issue with the chinese characters while parsing the mime message (MimeBodypart). In the MimeMessage charset is mentioned as "gb2312". i am using the MimeBodyPart.getContent() to get the content. When mimetype is html, it will be uploaded as a file to an FTP site (wapache commons net - ftp client). When uploaded file is viewed, the content is displayed as garbage text.
    i tried the following but it didnt work. i got the inputstream from the Mimebodypart. and then created InputStreamReader and used the encoding "GB18030" while initializing the content. i got the String out of it and stored in the file. i just replaced "Gb2312" with "UTF-8" in the html string. While creating the output file, i used the UTF-8 encoding. when opened this file using IE, it is displaying the character without any issues. i examined the file and the file encoding is UTF-8 as expected.
    but when i upload the file to FTP site and view, the text is not displayed correctly. It seems the file encodig is ANSI. i used the Notepad++ to examine these files. Please note that we use apache comments net - FTp client to upload the file.
    below are my questions:
    am i doing the right thing? it seems mime message was created using outlook.
    How to upload a file to FTp withe file base encoding is "UTF-8" or some other ?
    below are few references
    http://www.anyang-window.com.cn/tag/java-gb2312/
    JavaMail: Chinese Simplified Character Problem

    Thank you for the Replies. i am using the binary mode and it works fine for most of the files. i found that the issue here is not while uploading but the content itself. the characters present in the Mimemessge is not as per the charset. Hence i could not upload the content as it is. This happens only when charset is GB2312 (chinese). it seems that Mimemessage contains the characters which cannot be represented by Gb2312 but can be represented by Gb18030. Hence i converted the content using from Gb18030 to UTF-8 and created a file. i used the SetControlEncoding("utf-8") to upload the file and it is working fine.

  • Ignoring the DOCTYPE element while parsing the xml

    I am using JAXB parser to read from and write into my xml file using java code. My xml file contains a DOCTYPE element pointing to a .dtd file which does not exist, due to which I get a FileNotFoundException when JAXB tries to read the xml file. Hence, after unmarshalling the xml file using jaxb, I use a SAXParser to get an XMLReader which removes this DOCTYPE element as given below -
    SAXParserFactory parserFactory = SAXParserFactory.newInstance();
    parserFactory.setValidating(false);
    XMLReader reader = parserFactory.newSAXParser().getXMLReader();
    reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
    After making the required changes to the xml file and marshalling it back, I then use an XMLWriter to add the DOCTYPE element back to the xml file as given in the code snippet below -
    SAXReader saxReader = new SAXReader();
    Document document = saxReader.read(_file);
    document.addDocType(rootElement, publicUri, systemUri);
    XMLWriter output = new XMLWriter(new FileWriter( _file ));
    output.write( document );
    output.close();
    Right now I am using both, the JAXB parser to read from and write into the xml file and SAXParser/SAXRader just to delete/add the DOCTYPE element. I want to avoid using two different parsers in my class and want to know if JAXB provides any mechanism to delete and then add this element while parsing the xml file.

    Standard answer for this FAQ: set an EntityResolver on your parser that sends an empty string instead of the DTD. The API docs have an example that you could modify to do that.

  • ORA-20100: Error occurred while parsing: Start of root element expected.

    I've been searching everywhere for a reason to the following error message: ORA-20100: Error occurred while parsing: Start of root element expected.
    I get this when attempting to parse an XML file stored as a CLOB using the xmlparser.parseClob procedure
    Any help would be much appreciated.

    I initially used US ASCII but then tried several unicode formats as created by XML Spy (UTF16, Unicode16, Unicode32). All had the exact same result.
    Exactly what would be the most helpful output? The XML documents are varied, mostly very simple, but do you want the CLOB printed some other way?
    --Joan Armstrong
    null

Maybe you are looking for

  • Open and close visa inside a while loop

    Hi, I need to read a position from a control unit device continuously or even by click a button, for this I have to put "visa configure serial port" and" "visa close" inside a while loop. Dose it make any problem?

  • Ogg support for Creative MediaSource Pla

    Hi I just started using the Creative MediaSource Player that came with the Soundblaster X-Fi Plantinum and I am trying to find out if there is ogg support for it. It doesn't seem to recognize ogg files. Does anyone know of a plugin or some way to ena

  • Make to Order- Avoid creating Firmed Planned Orders

    Hi Gurus, I am using strategy 50 for one of my materials and when i create sales order agains that material a firmed planned order is created automatically. As this is firmed planned order in case i stock in material for that sales order and fullfill

  • I want to install free app but my credit card has no money how can I do that?

    MMy credit card has no money right now but I still want to install free apps, how can I do that?

  • Export and import user master records

    Hi, We are planning for system refresh activity. So I am planning Production server data to copy in Quality server. I want retain Quality server users like that only.  Is there any way I can export user master records and import it later? Please advi