Help! Failed to validate XML using setDocType on DOMParser

Hi all:
I am trying to use an existing DTD to parse
an XML file, and I am using the setDocType
method on the DOM parser to do this:
DOMParser parser = new DOMParser();
parser.setValidationMode(true);
parser.setDoctype(dtd);
parser.parse(reader); // reader contains XML stream
But it does not seems to validate the XML
document correctly. For example, if I have
an element Graph defined as:
<!ELEMENT Graph (Background,Title) >
In my XML, if I define Title element to come before the Background element, it does not give me any error:
<?xml version="1.0" encoding="UTF-8" ?>
<Graph>
<Title>.....
<Background>....
</Graph>
It does catches other errors like undeclared attributes, however.
Anyone knows what might have cause this?
Thanks,
Chadwick.

You can try to set the following feature to 'true' for your SAXParser:
http://apache.org/xml/features/continue-after-fatal-error
At least Xerces supports this feature.

Similar Messages

  • Help: How to Validate XML using SAXParser and return the entire error list

    Hi,
    I have a problem, I'm trying to validate a xml document against the DTD. Here Im using SAXParser and having the ErrorHandler object passed when setting the error Handler, like parser.setErrorHandler(errorHandlerObj).
    I need an output like where the entire XML document is read and all the errors have to be reported with the line number.
    like example:
    <b>Line 6: <promp>
    [Error]:Element type "promp" must be declared.
    Line 8: </prompt>
    [Fatal Error]:The end-tag for element type "promp" must end with a '>' delimiter.
    who can i achieve this.</b>
    what happens with the present code is that it throws the first error it encountered and comes out.
    how can i solve this problem

    You can try to set the following feature to 'true' for your SAXParser:
    http://apache.org/xml/features/continue-after-fatal-error
    At least Xerces supports this feature.

  • How to validate xml using xsd

    Hi All
    please tell me how to validate xml using xsd
    regards

    Try using this link:
    = http://www.google.nl/search?q=XML+validate+oracle for instance or
    = use the search button on this forum and / or
    = read the FAQ on this (XML DB FAQ
    Thanks Eddie et all, for educating me via http://awads.net/wp/2006/11/14/barts-punishment-for-asking-dumb-questions (don't mind the URL , the info there is really useful)
    The following link on this site is just brilliant: http://www.albinoblacksheep.com/flash/posting.php
    Grz
    Marco
    Message was edited by:
    mgralike

  • Validate XML using XSD (XML Schema)

    Hi experts.
    Is there any way in ABAP to validate XML file against specified XSD file?
    I found only possibility to validate against DTD, but no XSD. As far as I know this is only possible in Java, or is a part of XI. Is it doable without Java or XI (on NetWeaver 2004s)?
    Help appreciated (and rewarded).
    Regards, Frantisek.

    Hello
    Perhaps you missed this link: [How to Perform XML Validations in SAP NetWeaver Process Integration 7.1|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1]
    Regards
      Uwe

  • How to validate XML using java_xml_pack-summer-02?

    In jaxp1.1, we validate the xml file in this way:
    c:\java -jar Validator.jar myBookStore.xml
    However, in java_xml_pack-summer-02, which is latest version of jaxp, the Validator.jar is not available. So, how to validate xml file?
    Pls help.

    develop your own validator... here is a quick and dirty one, which spits exceptions when error are met:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.DefaultHandler;
    public class Validator
      public static void main(String[] args) throws Exception {
        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setValidating(true);
        spf.setNamespaceAware(true);
        SAXParser sp = spf.newSAXParser();
        sp.parse(new File(args[0]), new DefaultHandler());
    }

  • Need help - How to Validate XML

    I have just started playing around with XML in Flex2 and
    can't figure out a few things. I have the following XML
    var myData:XML =
    <SPECIAL>
    <ROW>
    <ITEM_001 ITEM_NAME="TOLERANCE">10</ITEM_001>
    <ITEM_002 ITEM_NAME="DIA A">.25</ITEM_002>
    <ITEM_003 ITEM_NAME="DIA B">.5</ITEM_003>
    </ROW>
    <ROW>
    <ITEM_001 ITEM_NAME="TOLERANCE">150</ITEM_001>
    <ITEM_002 ITEM_NAME="DIA A">.25</ITEM_002>
    <ITEM_003 ITEM_NAME="DIA B">.73</ITEM_003>
    </ROW>
    </_SPECIAL>
    I want the extract the element name ITEM_00x from with the
    row to use as a string in another portion of the app. For example,
    I can get to the ITEM_NAME attribute (TOLERANCE) and to the value
    (like 10). I can't figure out how to extract ITEM_001 short of
    creating an XMLString and parsing it out. I'm sure there must be a
    function or some other simple way to get it but I don't know what
    it is.
    Another thing I'd like to do is validate the xml somehow so I
    can insure that I have a good format. Not sure how to do this in
    Flex2. I'm uploading XML via HTTPService (e4X format) from users.
    The only caveat is that the number of elements in each row can vary
    depending on whom I get the xml from. I may have ITEM_001 thru
    ITEM_010 in each row the first time and ITEM_001 thru ITEM_005 the
    next.
    Any help would be appreciated!
    Warren Koch

    That didn't do it -- it just extracted "TOLERANCE", not
    "ITEM_001". What I'm trying to do is create an array of objects
    based on the XML. Here is the code:
    public function CreateSpecialDataArray():Array {
    var Data_Name:String;
    var theData:Array = new Array();
    var DataObject:Object;
    for each (var propRow:XML in myData.SPECIAL.ROW) {
    DataObject = new Object();
    for each (var propItem:XML in propRow.*) {
    Data_Name = propItem.@ITEM_NAME;
    DataObject[Data_Name]=propItem.toString();
    theData.push(DataObject);
    It's making the DataObject with properties of TOLERANCE, etc.
    I want to make the DataObject with properties of ITEM_001,
    ITEM_002, etc. I can't use the @ITEM_NAME to do this.

  • Validate XML using schema

    Hi,
    I want to validate a xml from a schema (xsd). Can I uses a parser (any parser - xerces perhaps) and read the xsd into a String and then pass that string object to the parser?
    So instead of this:
    SAXBuilder builder = new SAXBuilder("org.apache.xerces.parsers.SAXParser", true);
    builder.setFeature("http://apache.org/xml/features/validation/schema",
                        true);
    builder.setProperty("http://apache.org/xml/properties/schema"
                             + "/external-noNamespaceSchemaLocation",
    LOCATION OF XSD);
    Can I replace "LOCATION OF XSD" with a String argument that represents the contents of the XSD instead of the location to the xsd?
    Thanks

    A Schema validator could be used to validate your xml with a schema.
    TIBCO XMLValidate is a schema validator.
    http://www.tibco.com/solutions/products/extensibility/xml_validate.jsp

  • Need help on ssis package xml using query

    I have used this reference
    http://sqlblog.com/blogs/peter_debetta/archive/2006/07/13/Using-XML-Data-Type-Methods-to-query-SSIS-Packages.aspx
    I'm able to achieve packagename, taskname, tasktype,parentnodename,childnodename,level,currentnode,childnode,configurationtype.
    Problem - My Package consists of half a dozen sql task & data flow tasks in a single container. After execution of tasks in container, it will call package. Each data flow task consists of source & destination as well, which are not part of the below
    table. I also want to know which source & destination will fall under which tasktype?
    How do I establish under which taskType which TaskType will come? I want to know relationship between tasktype. How can I figure it out which task will come, under that what will be other task? From level field, I can only find at which level but not able
    to figure it out which tasktype. Is it possible can I get 1 and 1.1. and 1.1.1.1 and 2 and 2.1 and...under each object subobjects will be identified in this way.
    Note: I have entered only few rows.
    Microsoft.SqlServer.Dt.Tasks.Execute....=Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    Packagename
    Taskname
    TaskType
    ParentNodeName
    NodeName
    level
    CurrentNode
    ChildNode
    ConfigurationType
    test1
    Tax_m
    SSIS.Pckage.2
    Tax_m
    1
    some xml
    some xml
    test1
    Seq_Tax_m
    STOCK.SEQUENCE
    Tax_m
    Seq_Tax_m
    2
    some xml 
     some xml
    test1
    Ept_Tax_m
    SSIS.ExecutePackageTask2
    Tax_m
    Ept_Tax_m
    2
     some xml
    test1
    Sql_valid_key_Tax_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_Tax_m
    3
     some xml
    test1
    Sql_Dst_Del_Tax_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_Tax_m
    3
     some xml
    test1
    Dft_Tax_M
    SSIS.Pipeline.2
    Seq_Tax_m
    Dft_Tax_M
    3
     some xml
    test1
    Sql_valid_key_TL_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TL_m
    3
     some xml
    test1
    Sql_Dst_Del_TL_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_TL_m
    3
     some xml
    test1
    Sql_valid_key_TM_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TM_m
    3
     some xml
    test1
    Sql_valid_key_TC_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_valid_key_TC_m
    3
     some xml
    test1
    Sql_Dst_Del_TM_m
    Microsoft.SqlServer.Dt.Tasks.Execute....
    Seq_Tax_m
    Sql_Dst_Del_TM_m
    3
     some xml
    test1
    Dft_TL_M
    SSIS.Pipeline.2
    Seq_Tax_m
    Dft_TL_M
    3
     some xml

    I am moving it to SSIS.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Failing to Validate SAML Token : while setting WSRP security using SAML

    Hi All,
    I am trying to configure SAML on WLP 10.2 consumer domain along with WLS 10.2 producer domain ( extended domain to use as WSRP producer ) on single machine. I followed the steps as per the bea edocs - http://edocs.bea.com/wlp/docs92/federation/Chap-Security-SAML.html , which talks about how easy its to configure SAML with WSRP. But i am stuck at this point where the TransportException says the SAML token is not valid , stacktrace below:
    Error invoking portlet "Cportlet"
    The source of this error is:
    *com.bea.wsrp.faults.TransportException: Security token failed to validate. weblogic.xml.crypto.wss.SecurityTokenValidateResult@1e5d6b9[status: false][msg The SAML token is not valid.] at com.bea.wsrp.faults.FaultInstanceFactory.getException(FaultInstanceFactory.java:94) at com.bea.wsrp.proxy.ProxyBase.raiseFault(ProxyBase.java:768) at com.bea.wsrp.proxy.ProxyBase.invoke(ProxyBase.java:478) at $Proxy110.getMarkup(Unknown Source) at com.bea.wsrp.consumer.markup.GetMarkupService.invoke(GetMarkupService.java:44) at com.bea.wsrp.consumer.markup.GetMarkupService.invoke(GetMarkupService.java:27) at com.bea.wsrp.consumer.markup.AbstractMarkupService.invoke(AbstractMarkupService.java:85) at com.bea.wsrp.consumer.markup.AbstractMarkupService.invoke(AbstractMarkupService.java:68) at com.bea.wsrp.consumer.markup.AbstractMarkupService.invoke(AbstractMarkupService.java:61) at com.bea.wsrp.consumer.markup.MarkupServicesFacade.invoke(MarkupServicesFacade.java:44) at com.bea.wsrp.consumer.controls.ProxyPortletContent.invokeGetMarkup(ProxyPortletContent.java:664) at com.bea.wsrp.consumer.controls.ProxyPortletContent.beginRender(ProxyPortletContent.java:316) at com.bea.netuix.servlets.controls.application.laf.ContentControlRenderer.beginRender(ContentControlRenderer.java:48) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326) at com.bea.netuix.nf.UIControl.render(UIControl.java:582) at com.bea.netuix.servlets.controls.PresentationContext.render(PresentationContext.java:486) at com.bea.netuix.servlets.util.RenderToolkit.renderChild(RenderToolkit.java:146) at com.bea.netuix.servlets.jsp.taglib.skeleton.Child.doTag(Child.java:63) at jsp_servlet._framework._skeletons._bighorn.__flowlayout._jspService(__flowlayout.java:192) at weblogic.servlet.jsp.JspBase.service(JspBase.java:34) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:528) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:454) at com.bea.netuix.servlets.controls.application.laf.JspTools.renderJsp(JspTools.java:130) at com.bea.netuix.servlets.controls.application.laf.JspControlRenderer.beginRender(JspControlRenderer.java:72) at com.bea.netuix.servlets.controls.application.laf.PresentationControlRenderer.beginRender(PresentationControlRenderer.java:65) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:481) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251) at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)*
    Have tried a lot of different things but no luck proceeding further. Configured all the producer domain as per the link mentioned above., reconfigured the consumer again. Also tested by crearting a new keystore, but all this does not help me proceed further.
    Any help is greatly appreciated.
    Thanks in Advance.
    Maurya

    I am also facing the same kind of issue. see the error message below. Please help me to kill this error.
    \com.bea.wsrp.faults.TransportException: Security token failed to validate. weblogic.xml.crypto.wss.SecurityTokenValidateResult@1423066[status: false][msg The SAML token is not valid.]
         at com.bea.wsrp.proxy.ProxyBase.raiseFault(ProxyBase.java:578)
         at com.bea.wsrp.proxy.ProxyBase.invoke(ProxyBase.java:464)
         at $Proxy118.getServiceDescription(Unknown Source)
         at com.bea.wsrp.client.ProducerAgentImpl.getServiceDescription(ProducerAgentImpl.java:93)
         at com.bea.wsrp.client.ProducerAgentImpl.getServiceDescription(ProducerAgentImpl.java:55)
         at com.bea.jsptools.portal.helpers.wsrp.ProducerRegistryControlImpl.getServiceDescription(ProducerRegistryControlImpl.java:205)
         at com.bea.jsptools.portal.helpers.wsrp.ProducerRegistryControlBean.getServiceDescription(ProducerRegistryControlBean.java:133)
         at com.bea.jsptools.portal.helpers.wsrp.AddProducerHelper.getProducerForWsdl(AddProducerHelper.java:704)
         at com.bea.jsptools.portal.helpers.wsrp.AddProducerHelper.access$100(AddProducerHelper.java:61)
         at com.bea.jsptools.portal.helpers.wsrp.AddProducerHelper$FindProducers.producerWsdl(AddProducerHelper.java:249)
         at com.bea.jsptools.portal.helpers.wsrp.AddProducerHelper$FindProducers.run(AddProducerHelper.java:235)
         at portalTools.definitions.portletProducers.wizard.AddProducerWizardController.runAction(AddProducerWizardController.java:566)
         at portalTools.definitions.portletProducers.wizard.AddProducerWizardController.doIfValid(AddProducerWizardController.java:542)
         at portalTools.definitions.portletProducers.wizard.AddProducerWizardController.selectProducerAction(AddProducerWizardController.java:172)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:878)
         at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:808)
         at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:477)
         at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:305)
         at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:335)
         at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:51)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:95)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2042)
         at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:90)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2114)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:554)
         at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:851)
         at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:630)
         at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:157)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
         at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1169)
         at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:688)
         at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:144)
         at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:107)
         at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:99)
         at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:180)
         at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:168)
         at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:222)
         at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:178)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:351)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:361)
         at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:128)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:339)
         at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:330)
         at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:162)
         at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:137)
         at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:370)
         at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:229)
         at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:183)
         at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:221)
         at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:600)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:251)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)

  • WARNING: Failed to validate the xml content

    Hi,
    We notice this error when we start the web logic admin console and also in many of Hyperion log files. There are many instances of this error and everything is pointing to different lines in this file “jps-config.xml”.
    WARNING: Failed to validate the xml content. cvc-complex-type.2.4.a: Invalid content was found starting with element 'serviceInstance'. One of '{"http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd":serviceInstance}' is expected.
    Location: line 378 column 91 of file:/D:/Oracle/Middleware/user_projects/domains/EPMSystem/config/fmwconfig/mbeans/../jps-config.xml.
    Oct 16, 2012 4:21:56 PM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
    Any ideas?
    Regards,
    Ragav.
    Edited by: ragavhere on Oct 17, 2012 2:04 PM

    Hi,
    can you please provide more details on your application?
    Which version of ADF are you using and which server. Are you trying to deploy on GlassFish server?
    Which IDE are you using?
    Perhaps this will be useful:
    https://blogs.oracle.com/shay/entry/deploying_oracle_adf_applications_to
    Regards,
    Dimitrios.

  • Validate XML against Xml Schema using JDBC (thin_driver)

    hi all,
    i have a table with a xmltype-column (XmlSchema Support) and i wonna load(and validate) xml-data( as String) in the xmltype-column.
    some thing like this :
    int count=1;
    String SQLTEXT=null;
    Statement stmt=null;
    ResultSet rs =null;
    //while(count<=1000)
    try
    stmt = connection.createStatement();
    rs = stmt.executeQuery("select SEQ_patxmlschema_ID.NEXTVAL from patxmlschema");
    if(rs.next())
    id =rs.getLong(1);
    System.out.println(id);
    stmt.close();
    stmt=null;
    rs.close();
    SQLTEXT = "INSERT INTO patxmlschema(id, patID, name, status, patInfo)"+
              "VALUES(?,?,?,?,XMLType(?))";
    pStmt = connection.prepareStatement(SQLTEXT);
    long patID = random.nextInt(30000);
    System.out.println("patId: "+ patID);
    String name = RandomStringUtils.random(6,true,false);
    System.out.println("lastname: "+ name);
    String firstname=RandomStringUtils.random(5,true,false);
    System.out.println("firstname: "+ firstname);
    String status=RandomStringUtils.random(8,true,false);
    System.out.println("status: "+ status);
    String street=RandomStringUtils.random(6,true,false);
    System.out.println("street: "+ street);
    String zip=RandomStringUtils.random(5,false,true);
    System.out.println("zip: "+ zip);
    String city=RandomStringUtils.random(6,true,false);
    System.out.println("city: "+ city);
    String phone=RandomStringUtils.random(8,false,true);
    String email=RandomStringUtils.random(15,true,false);
    String state=RandomStringUtils.random(6,true,false);
    String country=RandomStringUtils.random(6,true,false);
    System.out.println("country: "+ country);
    xmldoc=
         "<Patient>"+                    "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+          "xsi:noNamespaceSchemaLocation='http://olidong.net/patInfo.xsd'>"+
         "<Address>"+                         "<street>"+street+"</street>"+                         "<city>"+city+"</city>"+                    "<zip>"+zip+"</zip>"+
         "<state>"+state+"</state>"+                    "<country>"+country+"</country>"+
         "</Address>"+               "<phone>"+phone+"</phone>"+                    "<email>"+email+"</email>"+
         "</Patient>";
         pStmt.setLong(1, id);
         pStmt.setLong(2, patID);
         pStmt.setString(3, name);
         pStmt.setString(4, status);
         pStmt.setString(5, xmldoc);
         pStmt.executeUpdate();
    pStmt.close();
         pStmt=null;
         count++;
         //connection=null;
    catch(Exception e){
    e.printStackTrace();
    can you help me?
    Olidong

    hi Avi,
    my xml doc is valid. with the sqlplus the are no problem or error. tryng the same with jddbc(thin driver) i got this error.
    i don´t know, may be jdbc don´t support xml schema support insertion.
    i got this sample:
    DECLARE
    doc VARCHAR2(2000) :=
    '<schema
    targetNamespace="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns:po="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="20"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
    </schema>';
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd', doc);
    END;
    CREATE TABLE mypurchaseorders OF XMLType
    XMLSchema "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    ELEMENT "PurchaseOrder"
    VARRAY xmldata."Item" STORE AS TABLE item_nested;
    INSERT INTO mypurchaseorders
    VALUES(
    XMLType(
    '<PurchaseOrder
    xmlns="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
    = "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd
    http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd">
    <PONum>1001</PONum>
    <Company>IBM</Company>
    <Item>
    <Part>DB2 v9 Set</Part>
    <Price>2550</Price>
    </Item>
    <Item>
    <Part>8i Doc Set</Part>
    <Price>350</Price>
    </Item>
    </PurchaseOrder>'));
    with the sqlplus the are no error
    but insert with java jdbc:
    SQLTEXT = "INSERT INTO mypurchaseorders VALUES(XMLType(?))";
    String xmldoc= "<PurchaseOrder"+
    "xmlns='http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'" +
    "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    "xsi:schemaLocation= 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'"+
    "'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'>"+
    "<PONum>1001</PONum>"+
    "<Company>IBM</Company>"+
    "<Item> "+
    "<Part>DB2 v9 Set</Part>"+
    "<Price>2550</Price>"+
    "</Item>"+
    "<Item>"+
    "<Part>8i Doc Set</Part>"+
    "<Price>350</Price>"+
    "</Item>"+
    "</PurchaseOrder>";
    pStmt.setString(1, xmldoc);
    i got this error
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00240: element-start tag is not well formed
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 301
    ORA-06512: at line 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:213)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:952)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
         at xml_tab.doInsert(xml_tab.java:118)
         at xml_tab.main(xml_tab.java:138)
    could you help me?
    Olidong

  • Everytime I try to download extensions apps etc get message failed to validate license online please advise I am not getting full use of my monthly subscription because I have to admit I am not sure how to rectify problems like this i am not very computer

    Please advise when I try to download free or paid apps I get message failed to validate license online I am not very computer literate and would appreciate advice I can understand (sorry) I have the monthly paid photoshop cc and lightroom package.

    Does your Cloud subscription properly show on your account page?
    If you have more than one email, are you sure you are using the correct Adobe ID?
    https://www.adobe.com/account.html for subscriptions on your Adobe page
    If yes
    Some general information for a Cloud subscription
    Cloud programs do not use serial numbers... you log in to your paid Cloud account to download & install & activate... you MAY need to log out of the Cloud and restart your computer and log back in to the Cloud for things to work
    Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
    -Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
    -http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
    -ID help https://helpx.adobe.com/contact.html?step=ZNA_id-signing_stillNeedHelp
    -http://helpx.adobe.com/creative-cloud/kb/license-this-software.html
    If no
    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"

  • HOW TO USE isSchemaValid() in oracle 9i to validate XML against XSD

    Hi
    I am trying to validate xml file against xsd in oracle 9i.The steps are as follows:
    *1.Created directory for xml and xsd file location:*
    CREATE or replace DIRECTORY XML_DATA AS 'D:\prod\sample xml and xsd;
    *2.Register the schema*
    DECLARE
    bf5 BFILE;
    BEGIN
    -- Register the schema
    dbms_lob.filecloseall;
    bf5 := BFILENAME('XML_DATA','xml1.xsd');
    DBMS_XMLSCHEMA.registerSchema('http://www.example.com/schemas/ipo.xsd',bf5,TRUE, TRUE, FALSE,TRUE,TRUE);
    -- dbms_lob.fileclose(bf5);
    END;
    *3.creatibg table to store xml files*
    CREATE TABLE po_tab2 (id NUMBER,xmlcol SYS.XMLType) ;
    *4.Inserting xml file into the table and validating that file with xml schema*
    declare
    aa clob:=' ';
    b varchar2(4000);
    c xmltype;
    begin
    dbms_lob.filecloseall;
    aa:= GETCLOBDOCUMENT('XML_DATA','example.XML','WE8MSWIN1252');
    INSERT INTO po_tab2 (ID, XMLCOL)
    VALUES
    (104,sys.XMLType.createXML(aa));
    commit;
    --c:=sys.xmltype.createXml(aa);
    c:=xmltype(aa);
    b:=VerifyXML(c,'http://www.example.com/schemas/ipo.xsd');
    dbms_output.put_line(b);
    end;
    _5.VerifyXML function is:_
    create or replace
    function VerifyXML( xml xmltype, xmlSchema varchar2 ) return varchar2 AUTHID DEFINER is
    xmlURL varchar2(4000);
    begin
    select
    s.qual_schema_url into xmlURL
    from user_xml_schemas s
    where s.schema_url = xmlSchema;
    if xml.isSchemaValid(xmlURL,'ManageRolloutRegionNotification') =1 then
    return( 'Valid. The supplied XML complies with XSD '||xmlURL );
    else
    -- return null;
    return(sqlcode|| 'Failed. The supplied XML does not comply with XSD '||xmlURL );
    end if;
    exception when others then
    return(sqlcode);
    end;
    _6.PROBLEM:_
    the problem is the function is always returning 'Failed ' status even though I am giving the correct file.. Is there any method to find the reason for failure. These codes are working fine oracle 11g. currently i am working in 9i version 9.2.0.1.0. I

    Oracle 9iR2 is not supported anymore.
    Oracle 9.2.0.8 is in sustained support.
    Oracle 9.2.0.1 is not supported at all.
    Upgrade to 11gR2.
    Sybrand Bakker
    Senior Oracle DBA

  • I am wondering if there is a way to validate XML file without using .......

    I am wondering if there is a way to validate XML file without using the <!DOCTYPE... but pass in the location of the schema/DTD file as a parameter to a validating method?
    thanks

    None that I know of. The only thing close is to use the EntityResolver interface where you can modify the location of the DTD file before it's being loaded and parsed, but that requires a <!DOCTYPE ...> in the XML file.
    Good luck.

  • How to validate XML against XSD and parse/save in one step using SAXParser?

    How to validate XML against XSD and parse/save in one step using SAXParser?
    I currently have an XML file and XSD. The XML file specifies the location of the XSD. In Java code I create a SAXParser with parameters indicating that it needs to validate the XML. However, SAXParser.parse does not validate the XML, but it does call my handler functions which save the elements/attributes in memory as it is read. On the other hand, XMLReader.parse does validate the XML against the XSD, but does not save the document in memory.
    My code can call XMLReader.parse to validate the XML followed by SAXParser.parse to save the XML document in memory. But this sound inefficient. Besides, while a valid document is being parsed by XMLReader, it can be changed to be invalid and saved, and XMLReader.parse would be looking at the original file and would think that the file is OK, and then SAXParser.parse would parse the document without errors.
    <Book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd" name="MyBook">
      <Chapter name="First Chapter"/>
      <Chapter name="Second Chapter">
        <Section number="1"/>
        <Section number="2"/>
      </Chapter>
    </Book>
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Book">
    <xs:complexType>
      <xs:sequence>
       <xs:element name="Chapter" minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
         <xs:sequence>
          <xs:element name="Section" minOccurs="0" maxOccurs="unbounded">
           <xs:complexType>
            <xs:attribute name="xnumber"/>
          </xs:complexType>
          </xs:element>
         </xs:sequence>
         <xs:attribute name="name"/>
        </xs:complexType>
       </xs:element>
      </xs:sequence>
      <xs:attribute name="name"/>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    public class SAXXMLParserTest
       public static void main(String[] args)
          try
             SAXParserFactory factory = SAXParserFactory.newInstance();
             factory.setNamespaceAware(true);
             factory.setValidating(true);
             SAXParser parser = factory.newSAXParser();
             parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
                                "http://www.w3.org/2001/XMLSchema");
             BookHandler handler = new BookHandler();
             XMLReader reader = parser.getXMLReader();
             reader.setErrorHandler(handler);
             parser.parse("xmltest.dat", handler); // does not throw validation error
             Book book = handler.getBook();
             System.out.println(book);
             reader.parse("xmltest.dat"); // throws validation error because of 'xnumber' in the XSD
    public class Book extends Element
       private String name;
       private List<Chapter> chapters = new ArrayList<Chapter>();
       public Book(String name)
          this.name = name;
       public void addChapter(Chapter chapter)
          chapters.add(chapter);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Book name=\"").append(name).append("\">\n");
          for (Chapter chapter: chapters)
             builder.append(chapter.toString());
          builder.append("</Book>\n");
          return builder.toString();
       public static class BookHandler extends DefaultHandler
          private Stack<Element> root = null;
          private Book book = null;
          public void startDocument()
             root = new Stack<Element>();
          public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
             if (qName.equals("Book"))
                String name = attributes.getValue("name");
                root.push(new Book(name));
             else if (qName.equals("Chapter"))
                String name = attributes.getValue("name");
                Chapter child = new Chapter(name);
                ((Book)root.peek()).addChapter(child);
                root.push(child);
             else if (qName.equals("Section"))
                Integer number = Integer.parseInt(attributes.getValue("number"));
                Section child = new Section(number);
                ((Chapter)root.peek()).addSection(child);
                root.push(child);
          public void endElement(String uri, String localName, String qName) throws SAXException
             Element finished = root.pop();
             if (root.size() == 0)
                book = (Book) finished;
          public Book getBook()
             return book;
          public void error(SAXParseException e)
             System.out.println(e.getMessage());
          public void fatalError(SAXParseException e)
             error(e);
          public void warning(SAXParseException e)
             error(e);
    public class Chapter extends Element
       public static class Section extends Element
          private Integer number;
          public Section(Integer number)
             this.number = number;
          public String toString()
             StringBuilder builder = new StringBuilder();
             builder.append("<Section number=\"").append(number).append("\"/>\n");
             return builder.toString();
       private String name;
       private List<Section> sections = null;
       public Chapter(String name)
          this.name = name;
       public void addSection(Section section)
          if (sections == null)
             sections = new ArrayList<Section>();
          sections.add(section);
       public String toString()
          StringBuilder builder = new StringBuilder();
          builder.append("<Chapter name=\"").append(name).append("\">\n");
          if (sections != null)
             for (Section section: sections)
                builder.append(section.toString());
          builder.append("</Chapter>\n");
          return builder.toString();
    }Edited by: sn72 on Oct 28, 2008 1:16 PM

    Have you looked at the XML DB FAQ thread (second post) in this forum? It has some examples for validating XML against schemas.

Maybe you are looking for