Writing own getLineNumber for parsing XML Schema

I'm creating a XML Schema tool that checks that the user is creating valid Schema text.
What I want to do is if the user has nested an element within a parent that it's not meant to. for example:
<element name = "1">
        <element name = "2"/>
</element>I want to return to the user the line number that the problem has occured.
Because as far as the SAXParser is concerned this is valid XML I can't catch a SAXParseException.
I'm using DOM to store the XML structure.
Is there another way I can parse the document so that I can store the line number it orginially came from?
Many thanks
Alex

Thats great, thanks.
My problem now is how can I access the parent node using SAX().
I have an arraylist for the parent of valid children, I need to check that the child node is infact one of these nodes.
The problem being using SAX() I can access the previous node but if their are sibling nodes this will not identify the parent.
This is the code I have so far:
public class TestHandler extends DefaultHandler
     int lineNo = 1;
     public void startElement(String namespaceURI, String localname, String rawname, Attributes atts) throws SAXException
          SAX sax = new SAX();
          ArrayList nodes = sax.getSchemaNodes();
          for(int i = 0; i < nodes.size(); i++)
               SchemaNode sn = (SchemaNode)nodes.get(i);
               if(sn.getName().equals(localname))
                    System.out.println(sn.getName() + " = " + lineNo);
     public void endElement(String namespaceURI,String localname,String rawname) throws SAXException
     public void characters(char [] buf,int offset,int len)
          lineNo++;
}Cheers Alex

Similar Messages

  • Problem in parsing XML Schema

    I am trying to parse XML Schema using XSOM. The Schema has <xs:include>s
    e.g. I have first.xsd which includes second.xsd and second.xsd again includes third.xsd.
    First.xsd
    <xs:include schemaLocation="../Second.xsd">....
    Second.xsd
    <xs:include schemaLocation="Third.xsd">....
    When I parse "First.xsd" parser passes the correct path "C:/XSDSchema/Second.xsd"(First.xsd resides in "C:/XSDSchema/Schema/") to the EntityResolver's resolveEntity method. But for Second.xsd it passes "Third.xsd" only (Third.xsd resides in "C:/XSDSchema/" ) .
    Any Idea ?????

    Here is a screenshort of the part of my workflow:
    In the mappings of the "Set Value" activity, I have one line with those properties:
    Location: /process_data/bonusValidationForm/object/data/xdp/datasets/data/BonusValidationForm/buMan agerID
    Expression: /process_data/currentUser/object/@userId
    Where:
    bonusValidationForm is a process variable of my workflow that point my xdp form
    buManagerID is the textfield I want to set
    currentUser is a process variable (type User) that was well setted by the task Find BU Manager

  • Java API - Editor class for an XML schema

    Hi,
    i am very interesting in Java API. I would like to make an editor class for an XML schema. (I will create XML files in the current project based on this XML schema.) What step's are require for this editor class?
    Regards
    Gabor

    DavidThi808 wrote:
    jtahlborn wrote:
    you can provide a schema when parsing an xml document in order to check for schema conformance, but that isn't going to affect your XPath queries at all. DOM content is never anything but strings.In the case of both dom4j/jaxen and the .NET runtime the values returned from XPath queries when a schema is provided are typed. So you get back numbers, dates, and booleans as well as strings. And for numbers you get correct comparisons so 20 > 1.i guess it's possible. i use schemas when parsing xml, and i've used xpath (infrequently), but i'm not sure that i've ever used them together in a way that i would see functionality like that.
    FYI, you use http://docs.oracle.com/javase/6/docs/api/javax/xml/parsers/DocumentBuilderFactory.html#setSchema%28javax.xml.validation.Schema%29 to specify a schema while parsing with a DocumentBuilder.

  • Maximum length for an XML schema

    Hi everybody,
    Is there a limit on the maximum length for an XML schema? I am trying to register an XML schema using dbms_xmlschema.registerSchema(). The schema registration process seems to go fine when the length of the schema is short. But the registration process always hangs when I increase the XML schema with additional types/elements. Is there a limit on the maximum length of the XML schema with regards to registering it to Oracle?
    Thanks!
    IK

    Hi Erhan,
    Let's say I have a really big XML schema in file "schemaA.xsd", like so:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sampleA="http://abc.com/schemaA" targetNamespace="http://abc.com/schemaA">
    <xsd:element name="Employee">
    <xsd:sequence>
    <xsd:element name="Address" type="sampleA:AddressType"/>
    <xsd:element name="Contact" type="sampleA:ContactInfoType"/>
    </xsd:element>
    <xsd:complexType name="AddressType">......</xsd:complexType>
    <xsd:complexType name="ContactInfoType">....</xsd:complexType>
    </xsd:schema>
    I can separate this schema into multiple smaller schemas (<32KB) by using the proper imports:
    In file "sampleA.xsd":
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sampleB="http://abc.com/schemaB"
    xmlns:sampleA="http://abc.com/schemaA" targetNamespace="http://abc.com/schemaA">
    <xsd:import namespace="http://abc.com/schemaB" schemaLocation="schemaB.xsd"/>
    <xsd:element name="Employee">
    <xsd:sequence>
    <xsd:element name="Address" type="sampleB:AddressType"/>
    <xsd:element name="Contact" type="sampleB:ContactInfoType"/>
    </xsd:element>
    </xsd:schema>
    And in file "sampleB.xsd", I might have something like this:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sampleB="http://abc.com/schemaB" targetNamespace="http://abc.com/schemaB">
    <xsd:complexType name="AddressType">......</xsd:complexType>
    <xsd:complexType name="ContactInfoType">....</xsd:complexType>
    </xsd:schema>
    So, you see how I have separated that one really big XML schema in file "schemaA.xsd" into two XML schema files: "schemaA.xsd" and "schemaB.xsd". Also, I have added <import> tags in schemaA.xsd to refer to elements, complext types, etc. defined in schemaB.xsd. So long as these schema files are < 32KB, I can register them (using dbms_xmlschema.registerSchema()) without any problems into Oracle.
    Let me know if what I said above is not too clear. Hope you find your solution soon!
    Thanks!
    Irene

  • Parse XML Schema in Java

    Hi all.
    I need to parse an XML Schema and get the following information out of
    it:
    list of elements allowed in schema
    list of attributes for each element - which are required and which
    optional
    given an element name get elements that it can contain
    etc.
    Parsing with JDOM XPath seems to be complicated, because there are
    many ways to say something in schema, although it would be my
    preferred way.
    I also looked at JAXB and Xerces, but their APIs seem to be more
    complicated than I need.
    Is there a simple API for doing what I need?
    Thank you very much for help.
    Anna

    I looked at JAXB, the problem there is that as I understand it, it first converts the schema to a bunch of
    Java classes and then I need to compile them and use.
    I am looking for something more straightforward, that will allow me to load the schema and do queries, but I can't find anything.
    About Xerces - I can't find any good examples for querying schema, all are about validating xml
    with given schema, which is not what I need. This is also true about JAXP.
    I will be really glad if someone new some good links with examples of Xerces/JAXB used for
    querying schema.
    Hope that I don't ask for to much.
    Thank you very much for help.
    Anna

  • Parse XML Schema File?

    Dear Sun Developer Network,
    I suppose maybe I should start at the beginning.
    Can anyone outline the first few steps involved in parsing an XML schema file into a traversable data structure in Java?
    I'd like to get a get a discussion started here about this, because I have some questions about the process as I currently understand it, and the more advanced (i'm supposing they're more advanced) questions that I've been asking in the past have gone completely unanswered in this forum. So perhaps, starting from the beginning, and working through to the difficulties I'm encountering would be a better approach to solving those issues.
    Thank you,
    Nels

    >
    Many thanks for your reply! My next question is,
    s, if parsing an XML schema file can be done with a
    SAX or dom parser, then why has Sun bothered to
    develop the JAXB api? What is the difference?
    Hi Nels,
    SAX and DOM are technologies for parsing and JAXB is a technology for databinding. They are 2 different technologies.
    Parsing gives you acess to raw xml
    DataBinding does the parsing and goes one step ahed and loads the data from xml to java objects. It is a higher level of abstraction over parsing
    schema is a specification which helps to define the rules for a valid xml document. It also happens to be xml. DTD is a kind of limited schema which is non xml.
    hope you got the diffrence.
    ps: did you try the -J-Xmx switch with javac to resolve yhe OutOfMemory exception I suggested in your previous post
    Regards,
    Rajagopal

  • How do you create an xsd file for an xml schema in BI Publisher?

    Helllo.
    I hope this is a really daft question for somebody..
    How I create an xsd file to be used as an xml schema to attach to a Data Definition that Ive created? I've obv. got the xml and rtf files ready and attached. I've looked through the relevant docs (XML Publisher Report Designer's Guide.pdf & XML Publisher Administration and Developer's Guide.pdf) but can't find where..
    Once this has been done then I can run the template via ORACLE Financials for the reports I've converted.
    many thanks..
    Steven

    I don't think you need to have an XSD it's an optional field. If you really want to create one use this site: http://www.hitsw.com/xml_utilites/
    I believe I answered your question, don't forget to give me the points.
    Ike Wiggins
    http://bipublisher.blogspot.com

  • Script for parsing xml data and inserting in DB

    Thank you for reading.
    I have the following example XML in an XML file. I need to write a script that can insert this data into an Oracle table. The table does not have primary keys. The data just needs to be inserted.
    I do not have xsd file in this scenario. Please suggest how to modify Method 1 https://community.oracle.com/thread/1115266?tstart=0 mentioned so that I can call the XML mentioned below and insert into a table
    Method 1
    Create or replace procedure parse_xml is 
      l_bfile   BFILE; 
      l_clob    CLOB; 
      l_parser  dbms_xmlparser.Parser; 
      l_doc     dbms_xmldom.DOMDocument; 
      l_nl      dbms_xmldom.DOMNodeList; 
      l_n       dbms_xmldom.DOMNode; 
      l_file      dbms_xmldom.DOMNodeList; 
      l_filen       dbms_xmldom.DOMNode; 
      lv_value VARCHAR2(1000); 
       l_ch      dbms_xmldom.DOMNode; 
    l_partname varchar2(100); 
    l_filename varchar2(1000); 
      l_temp    VARCHAR2(1000); 
      TYPE tab_type IS TABLE OF tab_software_parts%ROWTYPE; 
      t_tab  tab_type := tab_type(); 
    BEGIN 
      l_bfile := BFileName('DIR1', 'SoftwareParts.xml'); 
      dbms_lob.createtemporary(l_clob, cache=>FALSE); 
      dbms_lob.open(l_bfile, dbms_lob.lob_readonly); 
      dbms_lob.loadFromFile(dest_lob => l_clob,    src_lob  => l_bfile,    amount   => dbms_lob.getLength(l_bfile)); 
      dbms_lob.close(l_bfile);  
      dbms_session.set_nls('NLS_DATE_FORMAT','''DD-MON-YYYY'''); 
      l_parser := dbms_xmlparser.newParser; 
      dbms_xmlparser.parseClob(l_parser, l_clob); 
      l_doc := dbms_xmlparser.getDocument(l_parser); 
        dbms_lob.freetemporary(l_clob); 
      dbms_xmlparser.freeParser(l_parser); 
      l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'/PartDetails/Part'); 
        FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP 
        l_n := dbms_xmldom.item(l_nl, cur_emp); 
        t_tab.extend; 
        dbms_xslprocessor.valueOf(l_n,'Name/text()',l_partname); 
        t_tab(t_tab.last).partname := l_partname; 
        l_file := dbms_xslprocessor.selectNodes(l_n,'Files/FileName'); 
        FOR cur_ch IN 0 .. dbms_xmldom.getLength(l_file) - 1 LOOP 
          l_ch := dbms_xmldom.item(l_file, cur_ch); 
          lv_value := dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(l_ch)); 
          if t_tab(t_tab.last).partname is null then t_tab(t_tab.last).partname := l_partname; end if; 
          t_tab(t_tab.last).filename := lv_value; 
        t_tab.extend; 
       END LOOP; 
       END LOOP; 
        t_tab.delete(t_tab.last); 
      FOR cur_emp IN t_tab.first .. t_tab.last LOOP 
      if t_tab(cur_emp).partname is not null and  t_tab(cur_emp).filename is not null then 
        INSERT INTO tab_software_parts 
        VALUES 
        (t_tab(cur_emp).partname, t_tab(cur_emp).filename); 
        end if; 
      END LOOP; 
      COMMIT; 
      dbms_xmldom.freeDocument(l_doc); 
    EXCEPTION 
      WHEN OTHERS THEN 
        dbms_lob.freetemporary(l_clob); 
        dbms_xmlparser.freeParser(l_parser); 
        dbms_xmldom.freeDocument(l_doc); 
    END; 
    <TWObject className="TWObject">
      <array size="240">
        <item>
          <variable type="QuestionDetail">
            <questionId type="String"><![CDATA[30]]></questionId>
            <questionType type="questionType"><![CDATA[COUNTRY]]></questionType>
            <country type="String"><![CDATA[GB]]></country>
            <questionText type="String"><![CDATA[Please indicate]]></questionText>
            <optionType type="String"><![CDATA[RadioButton]]></optionType>
            <answerOptions type="String[]">
              <item><![CDATA[Yes]]></item>
              <item><![CDATA[No]]></item>
            </answerOptions>
            <ruleId type="String"><![CDATA[CRP_GB001]]></ruleId>
            <parentQuestionId type="String"></parentQuestionId>
            <parentQuestionResp type="String"></parentQuestionResp>
          </variable>
        </item>
        <item>
          <variable type="QuestionDetail">
            <questionId type="String"><![CDATA[40]]></questionId>
            <questionType type="questionType"><![CDATA[COUNTRY]]></questionType>
            <country type="String"><![CDATA[DE]]></country>
            <questionText type="String"><![CDATA[Please indicate]]></questionText>
            <optionType type="String"><![CDATA[RadioButton]]></optionType>
            <answerOptions type="String[]">
              <item><![CDATA[Yes]]></item>
              <item><![CDATA[No]]></item>
            </answerOptions>
            <ruleId type="String"><![CDATA[CRP_Q0001]]></ruleId>
            <parentQuestionId type="String"></parentQuestionId>
            <parentQuestionResp type="String"></parentQuestionResp>
          </variable>
        </item>
      </array>
    </TWObject>

    Reposted as
    Script to parse XML data into Oracle DB

  • Writing own TableCellRenderer for setting the Background Color of a cell ?

    Hello,
    I am using the JTable and DefaultTableModel for my GUI. I use also only plain text in the rows and columns. I have a method which examine every row wether something is wrong with a string so if something is wrong i want to set the BackgroundColor of this cell with the bad string to a color i can define.
    Do I need to write an own TableCellRenderer for this tiny task?
    Table class has no setBackground(new Color(22,22,22),posRow,posCol);

    http://forum.java.sun.com/thread.jspa?forumID=57&threa
    dID=606504this code is from your ColorRenderer class:
    public void actionPerformed(ActionEvent e)
                   Iterator it = colors.keySet().iterator();
                   while ( it.hasNext() )
                        Point key = (Point)it.next();
                        int row = key.x;
                        int column = key.y;
                        if (column == -1)
                             model.fireTableRowsUpdated(row, row);
                        else if (row == -1)
                             int rows = table.getRowCount();
                             for (int i = 0; i < rows; i++)
                                  model.fireTableCellUpdated(i, column);                              
              }you have set an ActionListener to the ColorRenderer class and put the actionPerformed method in it but compared to a JButton the actionPerformed method is called when i click the JButton but what you do in your code that the actionPerformed method is executed. I have deleted the whole actionPerformed method and the listener and still the cell is displayed with a color so was it for the blinking?
    And the method setBackground is nowhere called or run actively so is this method called internally by the ColorRenderer class? or is this method somehow called recursively as in the method setBackground I can see this method call:
    c.setBackground( (Color)o ); but i think this is another setBackground method right? because the first method i mentioned has 3 parameters not 1 parameter so where is the method setBackground with 3 parameters called actively in your code? i cant find anything. ok after examining again the c.setBackground( (Color)o ); is the one with 3 parameters ;-)
    public void setBackground(Component c, int row, int column)
              { that was set for the previous cell, so reset it here
                   if (c instanceof DefaultTableCellRenderer)
                        c.setBackground( table.getBackground() );
                   //  In case columns have been reordered, convert the column number
                   column = table.convertColumnIndexToModel(column);
                   //  Get cell color
                   Object key = getKey(row, column);
                   Object o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
                   //  Get row color
                   key = getKey(row, -1);
                   o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
                   //  Get column color
                   key = getKey(-1, column);
                   o = colors.get( key );
                   if (o != null)
                        c.setBackground( (Color)o );
                        return;
              }using your full code gives me a bug:
    when i double click in the first column to change some text doesnt matter which row then the selected cell gets a red border and the rest of the table freezes. When i exchange the order of the columns move column 1 to 2 and column 2 to 1 then the freezed table is working again?? could you help solving that problem else the cell color setting works fine for me :-) thank you very much!

  • Tips for parsing xml in a shell script?

    Hello,
    I'm writing a shell script to extract info from an xml file to create various text files that share data in the form of custom entities declared at the top of the document (product id, name, version, copyright date, etc.). So far I'm using xmllint which is working well. I'm extracting text for my project files using xmllint --shell:
    <pre style="padding-left: .75ex; padding-top: .25em; padding-bottom: .25em; margin-top: .5em; margin-bottom: .5em; margin-left: 1ex; max-width: 80ex; overflow: auto; font-size: 10px; font-family: Monaco, 'Courier New', Courier, monospace; color: #222; background: #eee; line-height: normal">echo cat lls_cd_product/plist | xmllint --noent --shell xyz.xml | sed -e '1d; $d'</pre>
    This is working well, but --shell mode adds an extra line to the beginning and end which I let sed cleanup, but then I need to strip the enclosing tags as well.
    Xmllint does a good job of filling in my entities with the exception of MacRoman bullet characters that I've entered as &#165;. These are just converted to the same entity in hex, &#xA5;. I suppose I can replace those with sed, but that's starting to feel kludgey.
    I'm beginning to wonder if there may be a better way to do this. I'm not very familiar with XSL, but I am considering ramping up on that.
    Any suggestions would be welcome.
    Cole

    etresoft wrote:
    It may be a few hours before I get time to work on it.
    Or not.
    Here is your XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <info>
    <ver>2.1.1</ver>
    <tag>abc</tag>
    <name>Product Name</name>
    <filename>productname</filename>
    <copyright>2008</copyright>
    </info>
    This generates the cd product file:
    <?xml version="1.0"?>
    <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8"
    doctype-system="http://www.apple.com/DTDs/PropertyList-1.0.dtd"
    doctype-public="-//Apple Computer//DTD PLIST 1.0//EN"/>
    <!-- You could access addition data from some other XML file. -->
    <!-- <xsl:variable name="data" select="document('data.xml')/data"/> -->
    <xsl:template match="info">
    <plist version="1.0">
    <dict>
    <key>hfs-openfolder</key>
    <string>.</string>
    <key>hfs-volume-name</key>
    <string><xsl:value-of select="name"/></string>
    <key>hide-hfs</key>
    <string>./{Norton,*.txt,*.exe,.inf}</string>
    <key>hide-iso</key>
    <string>./{PDS,*Rename,readme,.Volume*,Norton*,*icns,Run*.app,Icon*,Desktop*,TheFolder}</string>
    <key>hide-joliet</key>
    <string>./{PDS,*Rename,readme,.Volume*,Norton*,*icns,Run*.app,Icon*,Desktop*,TheFolder}</string>
    <key>iso-volume-name</key>
    <string><xsl:value-of select="tag"/></string>
    <key>joliet-volume-name</key>
    <string><xsl:value-of select="name"/></string>
    </dict>
    </plist>
    </xsl:template>
    </xsl:stylesheet>
    and this generates the Mac read me file in XML:
    <?xml version="1.0"?>
    <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8"/>
    <!-- You could access addition data from some other XML file. -->
    <!-- <xsl:variable name="data" select="document('data.xml')/data"/> -->
    <xsl:template match="info">
    <!-- You don't have to deal with these entities anymore. You should be
    able to save this xsl file in UTF-8 format and just type in the
    bullets. But the entities work too. -->
    <readme_mac><xsl:value-of select="concat(name, ' ', ver)"/>
    Copyright <xsl:value-of select="copyright"/>, Laureate Learning Systems¨, Inc.
    Minimum System Requirements:
    ¥ 300 MHz or faster PowerPC, Intel or better CPU
    ¥ Mac OS 8.1 or later, including any Mac OS X
    ¥ 64 MB available RAM
    ¥ 60 MB available disk space
    </readme_mac>
    </xsl:template>
    </xsl:stylesheet>
    This one will output the readme in HTML:
    <?xml version="1.0"?>
    <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    <xsl:output method="html" indent="yes" version="4.0" encoding="UTF-8"/>
    <!-- You could access addition data from some other XML file. -->
    <!-- <xsl:variable name="data" select="document('data.xml')/data"/> -->
    <xsl:template match="info">
    <!-- You don't have to deal with these entities anymore. You should be
    able to save this xsl file in UTF-8 format and just type in the
    bullets. But the entities work too. -->
    <html>
    <head>
    <title><xsl:value-of select="concat(name, ' ', ver)"/></title>
    </head>
    <body>
    <xsl:value-of select="concat(name, ' ', ver)"/>
    Copyright <xsl:value-of select="copyright"/>, Laureate Learning Systems¨, Inc.
    Minimum System Requirements:
    300 MHz or faster PowerPC, Intel or better CPU
    Mac OS 8.1 or later, including any Mac OS X
    64 MB available RAM
    60 MB available disk space
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    Yes. I do enjoy XSL quite a bit

  • Setting Third-Party Saxon parser for parsing xml files

    Hi,
              I wish to parse certain xhtml files using saxon parser because that serves our needs. In order to that in tomcat, I used to use the following code -
              System.getProperties().setProperty("javax.xml.parsers.SAXParserFactory","com.icl.saxon.aelfred.SAXParserFactoryImpl");
              System.getProperties().setProperty("javax.xml.transform.TransformerFactory","com.icl.saxon.TransformerFactoryImpl");
              However this does not work in Weblogic 8.1 SP5. Which means, it actually ignores the settings and uses the default parser (which fails to parse the documents).
              I noticed that in weblogic I need to include these in the weblogic-application.xml located under the application/META-INF folder. I update the file with the following -
              <xml>
              <parser-factory>
              <saxparser-factory>com.icl.saxon.aelfred.SAXParserFactoryImpl</saxparser-factory>
              <transformer-factory>com.icl.saxon.TransformerFactoryImpl</transformer-factory>
              </parser-factory>
              </xml>
              Everything was fine and the documents were parsed but for every server start up, I got an error message -
              <Apr 4, 2006 10:34:43 AM EDT> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "HarvesterWeb".
              javax.servlet.UnavailableException: Parsing error processing resource path
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.initModuleConfig
              (AutoRegisterActionServlet.java:416)
              at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:103)
              at javax.servlet.GenericServlet.init(GenericServlet.java:258)
              at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.init(AutoRegisterActionServlet.java:109)
              at com.bea.wlw.netui.pageflow.PageFlowActionServlet.init(PageFlowActionServlet.java:107)
              at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1094)
              at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
              at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
              at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:970)
              at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:949)
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:888)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3430)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3375)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3356)
              at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:6208)
              at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:864)
              at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2134)
              at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2175)
              at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2122)
              at weblogic.management.deploy.slave.SlaveDeployer$Application.setActivation(SlaveDeployer.java:3099)
              at weblogic.management.deploy.slave.SlaveDeployer.setActivationStateForAllApplications(SlaveDeployer.java:1768)
              at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.java:351)
              at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resume(DeploymentManagerServerLifeCycleImpl.java:229)
              at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:136)
              at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:965)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:360)
              at weblogic.Server.main(Server.java:32)
              >
              And the server needs to be restarted after every couple of hits(particularly failures).
              Also, my other applications won't deploy throwing the same stack trace.
              At the end of all this, I get this message - Not sure if they are related but
              log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
              log4j:WARN Please initialize the log4j system properly.
              Any ideas or anyone run into these kind of situations? Moderators, can you please help?

    Try the following.
              1. Keep the 3rd party jars in your WLS classpath and not within your ear.
              2. Create an XML Registry through admin console.
              Services->XML.
              3. Enter appropriate values for the following
              Document Builder Factory:
              SAX Parser Factory:
              Transformer Factory:
              4. Restart WLS.
              Refer to this link. http://e-docs.bea.com/wls/docs81/ConsoleHelp/domain_xmlregistrytable.html
              cheers,
              Dips

  • Error while creating DocumentBuilderFactory object for parsing XML string

    When I try to execute the following statement in an EJB class,
    DocumentBuilderFactory df=DocumentBuilderFactory.newInstance();
    I get the following exception:
    javax.xml.parsers.FactoryConfigurationError: Provider org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not found
    When the same statement is executed from a standalone java class, it works fine.
    The IDE used is Visual Age for Java.
    The JAXP package used is JAXP 1.0.1
    Can anybody please let me know how can we overcome this problem?
    Thanks and Regards,
    Shashi Anand B
    E-Mail : [email protected]

    javax.xml.parsers.FactoryConfigurationError: Provider
    org.apache.crimson.jaxp.DocumentBuilderFactoryImpl not
    foundI suspect that this may be due to a classpath issue and/or a Java version issue. Doe your Visual Age installation use Java 1.3? Do you have Sun Java 1.4 also installed on your system? It may be that when you are executing from a standalone Java class, that you are using the Java 1.4 runtime, which include the org.apach.crimson.* classes. Earlier version of Java do not include this, although it may be in the JAXP package.
    I think that your Visual Age IDE is configured such that the DocumentBuilderFactory is unable to find the appropriate implementation.
    I hope this helps!
    - David

  • Writing own event for Reservation creation BUS object

    I am trying to create a workflow that should get triggered when a new reservation is created for approval. I am using the BOR object for material reservation but it does not contain an event of creation. I wish to create a new event and then add code to the event so that a mail to an approver can be sent. Using the approval received I need to confirm the reservation else render it cancelled.
    I require help in creating the event and writing the event code for it.
    Thanks for taking time to go through my query
    Zankruti Parikh

    Hello Zankruti,
        Indeed, there's no such event for BUS2093. And if you try to do this to object BUS2093, you will come across error: "No change document object for business object type BUS2093".
        Given this, in your case, I am afraid that you will have to extend object BUS2093 by using delegation - then you will be able to add events CREATED or CHANGED, if necessary. Use transaction SWO1 to this, click on "settings" delegate, delegation type = ZBUS2093(for example) - you will delegate your ZBUS2093 type to BUS2093. After that, you will be able to create the events.                                                                               
    Following the idea, I believe that the easiest way to do this is thorugh enhancement MBCF0007 (Customer function exit: Updating a reservation). Click on components, and then you will see EXIT_SAPMM07R_001. Within this exit, you can call SWE_EVENT_CREATE_IN_UPD_TASK (you trigger the events you will have created above).  
    Regards,
    Andre Sousa
    Edited by: Andre Sousa on Jan 4, 2008 9:35 PM

  • Help for Parsing XML like HTML Document

    I have documents that start with
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    I want to process these documents with a XML Parser.Microsoft XML Parser works well with it.Can I use DOM parser in Java to process such kind of documents?
    What Jar file I need to use to access such APIs?

    Yes, XHTML is XML so you can read it with any XML parser.
    And Java already has XML parsers built in. You don't need any jar files.

  • BUILD FAILED java.lang.Error: unable to load schema-for-schema for W3C XML

    I am new to JAXB, I am trying to run the sample applciations on Win 98,
    I have set up the environment values as per the UserGuide specs.
    I am getting the following error:
    BUILD FAILED java.lang.Error: unable to load schema-for-schema for W3C XML Schema at com.sun.msv.reader.xmlschema.XMLSchemaReader.getXmlSchemaForXmlSchema (XMLSchemaReader.java:190)
    Could someone please suggest a solution.
    Thank you.

    Hi
    I am using Windows 2000 and I am repeatedly getting the same error too (See below). Would appreciate any help ..
    parsing a schema...
    org.iso_relax.verifier.VerifierConfigurationException
         at com.sun.msv.verifier.jarv.FactoryImpl.compileSchema(FactoryImpl.java:104)
         at org.iso_relax.verifier.VerifierFactory.compileSchema(Unknown Source)
         at org.iso_relax.verifier.VerifierFactory.compileSchema(Unknown Source)
         at com.sun.msv.reader.xmlschema.XMLSchemaReader.getXmlSchemaForXmlSchema(XMLSchemaReader.java:186)
         at com.sun.tools.xjc.Driver$1.<init>(Driver.java:477)
         at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:476)
         at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
         at com.sun.tools.xjc.Driver.run(Driver.java:268)
         at com.sun.tools.xjc.Driver.main(Driver.java:88)
         at sample1.Binder.main(Binder.java:18)
    StackTrace of Original Exception:
    java.lang.NullPointerException
         at com.sun.msv.datatype.xsd.TypeIncubator.addFacet(TypeIncubator.java:64)
         at com.sun.msv.reader.datatype.xsd.XSDatatypeExp$1.addFacet(XSDatatypeExp.java:87)
         at com.sun.msv.reader.datatype.xsd.FacetState.startSelf(FacetState.java:56)
         at com.sun.msv.reader.State.init(State.java:154)
         at com.sun.msv.reader.GrammarReader.pushState(GrammarReader.java:579)
         at com.sun.msv.reader.datatype.xsd.TypeState.startElement(TypeState.java:101)
         at org.xml.sax.helpers.XMLFilterImpl.startElement(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
         at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
         at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:874)
         at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(XMLNamespaceBinder.java:591)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:747)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
         at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
         at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
         at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
         at com.sun.msv.reader.GrammarReader._parse(GrammarReader.java:459)
         at com.sun.msv.reader.GrammarReader.switchSource(GrammarReader.java:434)
         at com.sun.msv.reader.GrammarReader.switchSource(GrammarReader.java:407)
         at com.sun.msv.reader.xmlschema.XMLSchemaReader.switchSource(XMLSchemaReader.java:683)
         at com.sun.msv.reader.xmlschema.ImportState.startSelf(ImportState.java:41)
         at com.sun.msv.reader.State.init(State.java:154)
         at com.sun.msv.reader.GrammarReader.pushState(GrammarReader.java:579)
         at com.sun.msv.reader.SimpleState.startElement(SimpleState.java:72)
         at org.xml.sax.helpers.XMLFilterImpl.startElement(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
         at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:877)
         at org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:569)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:759)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
         at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
         at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
         at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
         at com.sun.msv.reader.GrammarReader._parse(GrammarReader.java:459)
         at com.sun.msv.reader.GrammarReader.parse(GrammarReader.java:449)
         at com.sun.msv.reader.xmlschema.XMLSchemaReader.parse(XMLSchemaReader.java:89)
         at com.sun.msv.verifier.jarv.XSFactoryImpl.parse(XSFactoryImpl.java:26)
         at com.sun.msv.verifier.jarv.FactoryImpl.compileSchema(FactoryImpl.java:95)
         at org.iso_relax.verifier.VerifierFactory.compileSchema(Unknown Source)
         at org.iso_relax.verifier.VerifierFactory.compileSchema(Unknown Source)
         at com.sun.msv.reader.xmlschema.XMLSchemaReader.getXmlSchemaForXmlSchema(XMLSchemaReader.java:186)
         at com.sun.tools.xjc.Driver$1.<init>(Driver.java:477)
         at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:476)
         at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
         at com.sun.tools.xjc.Driver.run(Driver.java:268)
         at com.sun.tools.xjc.Driver.main(Driver.java:88)
         at sample1.Binder.main(Binder.java:18)
    java.lang.Error: unable to load schema-for-schema for W3C XML Schema
         at com.sun.msv.reader.xmlschema.XMLSchemaReader.getXmlSchemaForXmlSchema(XMLSchemaReader.java:190)
         at com.sun.tools.xjc.Driver$1.<init>(Driver.java:477)
         at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:476)
         at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
         at com.sun.tools.xjc.Driver.run(Driver.java:268)
         at com.sun.tools.xjc.Driver.main(Driver.java:88)
         at sample1.Binder.main(Binder.java:18)
    Exception in thread "main"
    -Thanks
    Guna

Maybe you are looking for

  • Bill of Exports w.r.t Special Economic Zone (SEZ's sales)

    Dear All, Issue is regarding Bill Of Exports Scenario applicable to the Customer who belongs to Special Economic Zones (SEZ’s). We have two Cases: 1.     SEZ sales With Duty Draw Back i.e., Bill of Export of goods claim for duty drawback. 2.     SEZ

  • Decimal places in Measurement tab for Land

    We lease-in Land in Acres. Typical land sizes require area to be defined in decimal units e.g 18.963 ACR or 256.755 ACR. However, in the measurement tab for creating Land the amount column is rounding off all decimal values to whole numbers. Like in

  • Issue with sys_refcursor  in oracle  10.2.0.4.0

    hi, java is front end application and they want result set to be returned from oracle plsql, for simplicity i am writing code something like below. create or replace function fun () retrun sys_refcursor is tablename_cur sys_Refcursor; begin open tabl

  • Weblogic.server .ldapservice failure

    I am using wl9.2 iam facing this problem can u provide the solution without deleting the ldap folder <Error> <EmbeddedLDAP> <000000> <Error Instantiating 'dc=mydomain': null> <Critical> <EmbeddedLDAP> <BEA-171522> <An error occurred while initializin

  • No Design View?

    I hope I'm mistaken in understanding that design view has been removed from flash builder 4.7. That was one of the coolest things about flash builder, I think removing it had to be one of the dumbest ideas anybody's ever had. Please tell me how mista