org.xml.sax.SAXParseException in sessions.xml

Hello

Recently, I've migrated a 10.1.3.4 11.1.1.3, then 11.1.2.4 project. When I deploy the project on IntegratedWeblogicServer org.xml.sax.SAXParseException exceptions are thrown about the items in the sessions.xml.

session. XML

<? XML version = "1.0" encoding = "UTF-8"? >
< version toplink-sessions = "11 g Release 1 (11.1.1.5.0)" = "http://www.w3.org/2001/XMLSchema" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" >
< session xsi: type = "Server-session" >
default < name > < / name >
< project-primary xsi: type = "xml" > META-INF/kiMap.xml < / primary-project >
< connection xsi: type = "database-login" >
oracle.toplink.platform.database.oracle.Oracle11Platform < platform-class > < / platform >
oracle.jdbc.driver.OracleDriver < class driver > < / driver-class >
< datasource > jdbc/AlfaDS < / datasource >
< bind-all-settings > false < / bind-all-parameters >
false < byte array-link > < / Binder bytes-table >
< optimize conversion of data > false < / optimize-data conversion >
false < trim-String > < / trim-String >
false < jdbc-batch-write > < / jdbc-batch-write >
< / login >
< / session >
< / toplink-sessions >

Exceptions

org.xml.sax.SAXParseException: line 9, column 22 >: 24534-XML: (doing) element "datasource" is niet verwacht.
***
org.xml.sax.SAXParseException: line 10, column 31 >: 24534-XML: (doing) 'bind all parameters' is niet verwacht.
***
org.xml.sax.SAXParseException: line 11, column 30 >: 24534-XML: (doing) element 'byte-array-binding' is niet verwacht.
***
org.xml.sax.SAXParseException: line 12, column 36 >: 24534-XML: (doing) "maximize conversion of data" is niet verwacht.
***
org.xml.sax.SAXParseException: line 13, column 24 >: 24534-XML: (doing) element 'trim-strings' is niet verwacht.
***
org.xml.sax.SAXParseException: line 14, column 30 >: 24534-XML: (doing) element 'jdbc-batch-write' is niet verwacht.
***
org.xml.sax.SAXParseException: line 15, column 15 >: XML-24521: element (care) is niet voltooid: "login".

Translation
is niet verwacht = not expected
is niet voltooid = not complete

Please help me with this configuration.

With greetings

Martin

Published by: Martin Schaap on May 17, 2013 02:52

Published by: Martin Schaap on May 20, 2013 22:31

In the session.xml scheme, it's a choice between data source and driver-class/url, you will need to remove the label from the class driver that you are using a data source.

oracle.jdbc.driver.OracleDriver
JDBC/AlfaDS

replalce

JDBC/AlfaDS

Tags: Fusion Middleware

Similar Questions

  • Nested exception on the SOAP webservice in Orchestrator calls - org.xml.sax.SAXException: element not valid in ch.dunes.vso.webservice.WorkflowToken - businessState?

    I created a java client program to call Orchestrator webservice for the execution of a workflow.

    When executing my code, the workflow is executed in Orchestrator with new token generated workflow.

    But my client side receives SAX exception. All trace is as below:

    WARNING: Could not find the required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled.

    20 sep 2013 13:02:23 org.apache.axis.client.Call invoke

    SEVERE: Exception:

    • org.xml.sax.SAXException: element not valid in ch.dunes.vso.webservice.WorkflowToken - businessState

    at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)

    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

    at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

    at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

    at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

    at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

    at org.apache.axis.client.Call.invoke(Call.java:2467)

    at org.apache.axis.client.Call.invoke(Call.java:2366)

    at org.apache.axis.client.Call.invoke(Call.java:1812)

    at ch.dunes.vso.webservice.WebserviceSoapBindingStub.executeWorkflow(WebserviceSoapBindingStub.java:744)

    at ch.dunes.vso.webservice.VSOWebControlProxy.executeWorkflow(VSOWebControlProxy.java:95)

    at com.vmware.client.LaunchWorkflow.main (unknown Source)

    ; nested exception is:

    org.xml.sax.SAXException: invalid element in ch.dunes.vso.webservice.WorkflowToken - businessState [Ljava.lang.StackTraceElement;@793d7a

    Any suggestions?

    You can check the version of the WSDL file that you use in your java application? Looks like it's outdated, perhaps to an old version 4.1

  • org.xml.sax.SAXException:SimpleDeserializer met a child element...

    Hi all

    I created a following program using the 'GetReportDefintion' method provided by BI Publisher Web Services
    package bip_webservices;
    import com.oracle.xmlns.oxp.service.PublicReportService.ItemData;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportResponse;
    import com.oracle.xmlns.oxp.service.PublicReportService.ParamNameValue;
    import com.oracle.xmlns.oxp.service.PublicReportService.ReportDefinition;
    import com.oracle.xmlns.oxp.service.PublicReportService.ScheduleRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.DeliveryRequest;
    import com.oracle.xmlns.oxp.service.PublicReportService.EMailDeliveryOption;
    
    import  java.io.FileOutputStream;
    import  java.io.OutputStream;
    import java.net.MalformedURLException;
    import java.rmi.RemoteException;
    import  java.util.Calendar;
    import javax.xml.rpc.ServiceException;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import org.apache.axis.encoding.ser.BeanDeserializerFactory;
    import org.apache.axis.encoding.ser.BeanSerializerFactory;
    import  javax.xml.namespace.QName;
    import  javax.xml.rpc.ParameterMode;
    import  java.net.URL;
    
    
    public class BIP_GetReportDefinition {
        
        public static void main(String[] args) throws ServiceException, MalformedURLException, RemoteException{
         try{
            final String bipEndpoint = "http://localhost:9704/xmlpserver/services/PublicReportService?wsdl";
            final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
            final String xdofile = "/MyReports/SummaryCustomerReport/SummaryCustomerReport.xdo";
          
            Service service = new Service();
            Call call = (Call) service.createCall();
            call.setTargetEndpointAddress(new URL(bipEndpoint));
     
           System.out.println("BEGIN TESTING getReportDefinition");
     
            // register the ReportDefinition class
            QName reportDef = new QName(bipNamespace, "ReportDefinition");
            call.registerTypeMapping(ReportDefinition.class, reportDef,
                            BeanSerializerFactory.class, BeanDeserializerFactory.class);
          
     
            // register the ParamNameValue class
            QName nmvals = new QName(bipNamespace, "ParamNameValue");
            call.registerTypeMapping(ParamNameValue.class, nmvals, BeanSerializerFactory.class, BeanDeserializerFactory.class);
     
            call.setOperationName(new QName(bipNamespace, "getReportDefinition"));
            call.addParameter("reportAbsolutePath", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
            call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
            call.setReturnClass(ReportDefinition.class);
     
            // issue the request
            ReportDefinition reportDefn = (ReportDefinition) call.invoke(
                new Object[] { xdofile, "Administrator", "Administrator"});
     
            System.out.println("Report Definition Returns with \n Default Output Format = " + reportDefn.getDefaultOutputFormat());
            ParamNameValue params [] = reportDefn.getReportParameterNameValues();
     
            if (params != null) {
                for (int i = 0; i < params.length; i++) {
                    System.out.print("Parameter " + params.getName() + ":");
    if (params[i].getValues() != null) {
    for (int j = 0; j < params[i].getValues().length; j++)
    System.out.print(" " + params[i].getValues()[j]);
    } else
    System.out.print(" null");
    System.out.println(" - multiple values? " + params[i].isMultiValuesAllowed());
    }
    }
    System.out.println("END TESTING getReportDefinition");
    }catch(Exception e){
    e.printStackTrace();
    }
    }
    }


    I am getting following exception message. Anyone has any ideas what could be the mistake ?
    SEVERE: Exception:
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    AxisFault
     faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
     faultSubcode: 
     faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
     faultActor: 
     faultNode: 
     faultDetail: 
            {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    
            {http://xml.apache.org/axis/}hostname:mildh0228
    
    org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
            at org.apache.axis.client.Call.invoke(Call.java:2470)
            at org.apache.axis.client.Call.invoke(Call.java:2366)
            at org.apache.axis.client.Call.invoke(Call.java:1812)
            at bip_webservices.BIP_GetReportDefinition.main(BIP_GetReportDefinition.java:67)
    Caused by: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
            at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)
            at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
            at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
            at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
            at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
            at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
            at org.apache.axis.client.Call.invoke(Call.java:2467)
            ... 3 more
    Thank you for giving this problem at a glance.
    -Sookie

    Hello Sookie,

    I found the problem, it is with two or three child settings are not saved the deserializer. There are two or three extra classes must be registerd.

    Register the TemplateLabelValue class
    QName templateval = new QName (bipNamespace, "TemplateFormatLabelValue");
    Class cls = TemplateFormatLabelValue.class;
    call.registerTypeMapping (cls, templateval, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    Register the TemplateLabelValues class
    QName templatevals = new QName (bipNamespace, "TemplateFormatsLabelValues");
    CLS = TemplateFormatsLabelValues.class;
    call.registerTypeMapping (cls, templatevals, BeanSerializerFactory.class, BeanDeserializerFactory.class);

    Could you please give it a try?

    Thank you.
    Yang

  • Error of org.xml ACS 5.3 Exception when executing reports

    Hello

    5.3 GBA running on a device of 1121

    When you run a report's RADIUS authentication, accounting, etc. is all report, I get the error attached image (org.xml.sax.SAXParseException...). I have not yet found a solution. I'm running another ACS 5.2 device that does not have this error

    If the upgrade to a newer version will solve this problem, the license (5.3) will suffice.

    Any help is appreciated

    Kind regards

    MOE Shea

    Hello Mo,

    I have this error either a browser problem, I recommend you watch the ACS 5.3 release notes and confirm if you are currently using a supported browser:

    http://www.Cisco.com/c/en/us/TD/docs/net_mgmt/cisco_secure_access_contro...

    A restart of services can take care of it as well in case you are using a supported browser.

    Note: Please mark as answer as appropriate

  • SAX parse exception even when the cache xml is correct

    Hello

    I have the bottom of the xml cache and when I start a gemfire Server I get the below error:

    < code >

    ND if read Cache XML file:/C:/vFabric_GemFire_70/insurance_gf_server1/cache.xml. Error while parsing XML, caused by org.xml.sax.SAXParseException: The content of element type "region-attributes" must match "(key-constraint?,value-constraint?,region-time-to-live?,region-idle-time?,entry-time-to-live?,entry-idle-time?,disk-write-attributes?,disk-dirs?,partition-attributes?,membership-attributes?,subscription-attributes?,cache-loader?,cache-writer?,cache-listener*,eviction-attributes?)".

    < code >

    I did check the XML cache and could not find any problems and it is according to the GemFire 7.0 DTD, given below is the xml cache:

    < code >

    <? XML version = "1.0"? >
    <! DOCTYPE PUBLIC cache
    ' - //GemStone systems, declarative Inc.//GemFire 7.0 cached / / IN ".
    < cache lock-location = "120" lock-timeout = '60' research-timeout = '300' is-Server = "true" copy-on-read = "false" >
    < cache-server bind-address port = "${address}" = "${port}" > < / cache server >
    <-critics-bunch-percentage resource manager = "90" expulsion-bunch-percentage = "80" / >
    < record-store name = "insuranceOFDS" allow-force-compression = "true" auto-compact = "true".
    compaction-threshold = "40" oplog-max-size = size of queue "2048" = "1000" interval = "1000" write-buffer-size = "65536" >
    < disk-dirs >
    < disk-dir dir-size "3072" = >$ {GF_SERVER_DS_FOLDER} \insurance_ds < / disc-dir >
    < / disc-dirs >
    < / record store >
    < region attributes id = "defaultRegionAttr" refid = 'PARTITION_REDUNDANT_OVERFLOW' scope = 'distributed-ack ".
    data-policy = "partition" statistical compatible = "true" multicast = 'false' record-store-name = "insuranceOFDS" disc-synchronous = "false" >
    < partition-attributes-redundant copies = '1' total-num-buckets = "113" > < / partition attributes >
    < region-time-to-live >
    < expiry-attributes timeout = "36000" action = "destroy" / >
    < / region-time-to-live >
    < input-time-to-live >
    < expiry-attributes timeout = "900" action = "destroy" / >
    < / entry-time-to-live >
    <>expulsion-attributes
    < lru-memory size maximum = "100" action = "infinity-to-disk" / >
    < / expulsion-attributes >
    < / region-attributes >
    <! - customer area - >
    < name region 'customers' = refid = "defaultRegionAttr" / >
    <! - political region - >
    < name region = "policies" refid = "defaultRegionAttr" / >
    <! - claims region - >
    < name region = "claims" refid = "defaultRegionAttr" / >
    <! - payment area - >
    < name region = 'payments' refid = "defaultRegionAttr" / >
    < / cache >

    < code >

    and the command to start the server:

    < code >

    gfsh start server --name=insurance_gf_server1 --rebalance=true --initial-heap=512M --max-heap=512M --server-bind-address=xxx.xxx.xx.xx --server-port=13490 --J=-DGF_SERVER_DS_FOLDER=C:\vFabric_GemFire_70\insurance_gf_server1,-Daddress=CSCINDAE699524,-Dport=13490,-XX:CMSInitiatingOccupancyFraction=70,-XX:+UseConcMarkSweepGC,-XX:+CMSIncrementalMode,-XX:+CMSIncrementalPacing,-XX:CMSIncrementalDutyCycleMin=0,-XX:CMSIncrementalDutyCycle=10,-XX:+UseParNewGC,-XX:+CMSPermGenSweepingEnabled,-XX:+CMSClassUnloadingEnabled,-XX:MaxGCPauseMillis=250,-XX:MaxGCMinorPauseMillis=100,-XX : + DisableExplicitGC

    < code >

    Can someone help to find the error. Thank you

    The classification is defined by the DTD. This is certainly the case that some DTD defines elements such as the order is not important, but the cache DTD is relatively complex, making this problem very non-negligible.

    See this post SO for general information: http://stackoverflow.com/questions/3022845/dtd-required-elements-ordering

    Then imagine this just apply this to an item in the cache of DTD:

    
    

    The DTD would probably increase by several orders of magnitude.

    However, we could certainly make a point by asserting, in the docs, the order is important.

  • Analysis of the XML file

    Hello

    I try to access a web service. I am currently using NetBeans 6.5. I am able to acess webservice by creating the stub.

    This draft is back this xml content in a string format

    so, when I try o use

    SAXParserFactory saxfact = SAXParserFactory.newInstance ();

    SAXParser sp = saxfact.newSAXParser ();

    Sax InputSource = new InputSource (temp); Temp is the string that's been out since the heel in a string format

    TPI Parse (Sax, this);    on this step, the code is throwing an exception

    / * org.xml.sax.SAXParseException:
    org.xml.sax.helpers.DefaultHandler.fatalError (+ 1)
    com.sun.ukit.jaxp.Parser.panic (+ 18)
    com.sun.ukit.jaxp.Parser.setinp (+ 203)
    com.sun.ukit.jaxp.Parser.parse (+ 42)
    analysis. (parsing.java:54)
    to call_to_webservice.run(call_to_webservice.java:54) * /.

    I'm stuck here

    I was trying to access xml directly, but the statement sp.parse () takes InputSource or InputStream

    need help very urgent

    Thanks in advance

    Hi Panknaik,

    Try this code,

    try {}
    SAXParserFactory plant = SAXParserFactory.newInstance ();
    SAXParser saxParser = factory.newSAXParser ();
    org.xml.sax.helpers.DefaultHandler Manager = new xmlReader (startTag, endTag); start and endtag you want to analyze.              InputStream in = new ByteArrayInputStream (response.getBytes("UTF-8"));
    InputSource source = new InputSource (in);
    saxParser.parse (source, handler);
    } catch (Exception e) {}

    ---------------------------------------------------------------------------

    Then extends DefaultHandle,

    /**
    * A class containing a generic logic to read an XML file.
    */
    class xmlReader extends DefaultHandler {}
    private String startTag; /**< start="" tag="" to="" be="" looked="" for.="">
    private String endTag. /**< end="" tag="" to="" be="" looked="" for.="">
    Private boolean currentTag;
    Private boolean Errortag.
    String tagValue;
           
    /**
    * Sets the start and end tag to be read in the XML file.
    startTag @param tag beginning.
    endTag @param tag end.
    */
    {} public xmlReader (startTag, endTag String String)
    this.startTag = startTag;
    this.endTag = endTag;
    }
           
    /**
    * Startup item implementation of the DefaultHandler.
    */
    ' public void startElement (String namespaceURI, String localName,
    String qualifiedName, attributes atts) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = true;
    ElseIf (localName.equals (startTag))
    currentTag = true;
    }
           
    /**
    * Implementation of the DefaultHandler element ends.
    */
    ' public void endElement (String namespaceURI, String localName,
    String QualifiedName) throws SAXException {}
    If (localName.equals ("error"))
    Errortag = false;
    ElseIf (localName.equals (endTag))
    currentTag = false;
    Else if (currentTag == true) {}
    attribValue.addElement (tagValue); Add it to vector
    tagValue = "";
    }
    }
           
    /**
    * The treatment on the tag to read.
    ch @param String containing the tag.
    @param start starting location of the tag.
    @param tag length.
    */
    characters public Sub (ch of char [], int start, int length)
    throws SAXException {}
               
    Dim str As String = new String (ch);
    String tempTagValue = str.substring (start, start + length);
               
    If (Errortag is true)
    errorNo = Integer.parseInt (tempTagValue);
    Else if (currentTag == true)
    tagValue = tempTagValue;
    }
    }

    I think that it solve your problem.

    Kind regards

    -Jitu.

  • Get the error in the Web.XMl file

    Hi Experts,

    As I established local installation in my system, but I get an error in the web.xml file tomcat server console.

    December 14, 2015 18:06:30 org.apache.catalina.core.AprLifecycleListener init

    NEWS: APR based Apache Tomcat Native library that allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_79\bin; C:\Windows\Sun\Java\bin; C:\Windows\System32; C:\Windows; C:\oraclexe\app\oracle\product\11.2.0\server\bin; C:\Windows\System32; C:\Windows; C:\Windows\System32\Wbem; C:\Windows\system32\WindowsPowerShell\v1.0\; C:\Program Files (x 86) \Common Files\lenovo\easyplussdk\bin; C:\Program Files\Java\jdk1.7.0_79\bin; E:\digitalM\csinstall\bin;.

    December 14, 2015 18:06:31 org.apache.coyote.http11.Http11Protocol init

    INFO: Initializing Coyote HTTP/1.1 on http-7001

    December 14, 2015 18:06:31 org.apache.catalina.startup.Catalina charge

    INFO: Initializing transformed into 2027 ms

    December 14, 2015 18:06:31 org.apache.catalina.core.StandardService start

    INFO: Starting service Catalina

    December 14, 2015 18:06:31 org.apache.catalina.core.StandardEngine start

    INFO: Starting the Servlet engine: Apache Tomcat/6.0.44

    December 14, 2015 18:06:32 org.apache.tomcat.util.digester.Digester endElement

    SEVERE: End event threw the exception

    java.lang.reflect.InvocationTargetException

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:959)

    at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:789)

    at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)

    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1158)

    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)

    to com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$ FragmentContentDriver.next (XMLDocumentFragmentScannerImpl.java:2973)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)

    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

    to com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$ JAXPSAXParser.parse (SAXParserImpl.java:648)

    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1675)

    at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365)

    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1045)

    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:265)

    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4616)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

    at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

    at org.apache.catalina.core.StandardService.start(StandardService.java:525)

    at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

    at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:414)

    Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies a servlet name refreshservlet unknown

    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2743)

    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2723)

    ... more than 37

    December 14, 2015 18:06:32 org.apache.catalina.startup.ContextConfig applicationWebConfig

    GRAVE: Analyze the error in the Web.XML of the application to jndi:/localhost/cs/WEB-INF/web.xml

    org.xml.sax.SAXParseException; systemId: jndi:/localhost/cs/WEB-INF/web.xml; lineNumber: 43; columnNumber: 37; Error in (43, 37): Servlet mapping specifies a servlet name refreshservlet unknown

    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2839)

    at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2865)

    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1161)

    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)

    to com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$ FragmentContentDriver.next (XMLDocumentFragmentScannerImpl.java:2973)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)

    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)

    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)

    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

    to com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$ JAXPSAXParser.parse (SAXParserImpl.java:648)

    at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1675)

    at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:365)

    at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1045)

    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:265)

    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4616)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

    at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)

    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

    at org.apache.catalina.core.StandardService.start(StandardService.java:525)

    at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)

    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

    at org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:414)

    Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies a servlet name refreshservlet unknown

    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2743)

    at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2723)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:606)

    at org.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:959)

    at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:789)

    at org.apache.tomcat.util.digester.Rule.end(Rule.java:228)

    at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1158)

    ... more than 29

    December 14, 2015 18:06:32 org.apache.catalina.startup.ContextConfig applicationWebConfig

    GRAVE: Occurred at line 43 37 column

    Org.apache.catalina.startup.ContextConfig December 14, 2015 departure 18:06:33

    GRAVE: Marking this unavailable application due to previous errors

    December 14, 2015 18:06:35 org.apache.catalina.core.StandardContext start

    SEVERE: Error getConfigured

    December 14, 2015 18:06:35 org.apache.catalina.core.StandardContext start

    SEVERE: Context / [CS] failed to start due to previous errors

    December 14, 2015 18:06:36 org.apache.catalina.startup.HostConfig deployDescriptor

    NEWS: Deployment descriptor configuration host - manager .xml

    December 14, 2015 18:06:38 org.apache.catalina.startup.HostConfig deployDescriptor

    NEWS: Deployment configuration descriptor manager.xml

    December 14, 2015 18:06:38 org.apache.catalina.startup.HostConfig deployDirectory

    NEWS: Deployment web application directory case

    December 14, 2015 18:07:28 com.sun.jersey.spi.spring.container.servlet.SpringServlet getContext

    INFO: Using default applicationContext

    December 14, 2015 18:07:28 com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registry

    INFO: Application bean Spring, TicketResource, of type com.fatwire.wem.sso.cas.integration.rest.TicketResource as a class resource root

    December 14, 2015 18:07:28 com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registry

    INFO: Application bean Spring, TicketGrantingTicketResource, of type com.fatwire.wem.sso.cas.integration.rest.TicketGrantingTicketResource as a class resource root

    December 14, 2015 18:07:29 com.sun.jersey.server.impl.application.WebApplicationImpl initiate

    INFO: Initiator asks from Jersey, version "Jersey: 1.1.4.1 11/24/2009-01:30 '"

    December 14, 2015 18:07:34 org.apache.catalina.startup.HostConfig deployDirectory

    NEWS: Deployment of the directory docs web application

    December 14, 2015 18:07:34 org.apache.catalina.startup.HostConfig deployDirectory

    INFO: Examples of Directory deployment web application

    December 14, 2015 18:07:35 org.apache.catalina.startup.HostConfig deployDirectory

    INFO: Deploy the web application ROOT directory

    December 14, 2015 org.apache.coyote.http11.Http11Protocol start 18:07:35

    Please suggest what I'm missing or how to solve this problem


    Thanks in advance.

    It shows the error in the XML parser.  Please validate your XML code for proper syntax. You might have missed some closing etc tags.

    Also make sure that this declaration of refreshservlet and his mapping is appropriate in your web xml.

  • Names of dynamic XML files in ODI

    Hi all

    Is there a way can we call the XML names dynamically. ?

    Here's the scenario,
    I have several XML files of the same structure to load into an Oracle table.

    I first created a root XML and gave the exact path and file name for the inversion of the XML model for the first time. The JDBC url was,
    JDBC:SNPs:XML? f = / xml/file / #XML_TEST. FILE_TEST.XML & s = XML_TEST & dod = true & ro = true

    After he hit, I changed the root XML JDBC url
    JDBC:SNPs:XML?f=/XML/file/#XML_TEST.var_FILE_NAME.XML & s = XML_TEST & dod = true & ro = true

    I created a variable * #XML_TEST.var_FILE_NAME* to get all the names of XML file.

    After that I tried to see the data from data warehouses are under previously reverse the XML model, but became the following error:
    java.sql.SQLException: while generating the DTD of the XML, an exception org.xml.sax.SAXParseException is produced by saying: element the Document root is missing.

    Do I need to change anything in the XML model or data warehouses?

    Best regards,
    VERIFIED BY VISA

    Since you are using the Variable, when you right-click and view its lack of required passage of the file, as the variable value is not determined, to do this, you need to refresh or set the variable and call the interface or other objects of ODI and loop continue to read XML files one by one and that should work data store.

  • How to exclude the each row of the result set XML declaration?

    Hello

    I have a table with an XMLTYPE column and would like to SELECT a set of rows. How can I exclude the each row of the result set XML declaration? My query currently looks like this, I am running through Spring JDBC:
    SELECT XMLSerialize FROM t1 WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e") ORDER BY t1.time DESC myschema.event (HAPPY t1.xmltext)

    After selecting, in my application I convert each line in a string and concatenate all the rows in a large chain to analyze in a DOM model. I get a parser exception (org.xml.sax.SAXParseException: the target of the processing instruction corresponding to "[xX] [mM] [he's]" is not allowed) because there are several XML statements in my large chain. Of course, I could manually check the string on each line if it starts with the XML declaration, but it would be nicer if I could load the DB does not add it in the first place. Is there a way?

    Thank you!
    -Daniela

    Hello

    Some options that I can think of:

    SELECT XMLSerialize(CONTENT
     XMLtransform(t1.xmltext,
      xmltype('
     
     
    ')
     )
    )
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;
    

    or quite simply,.

    SELECT XMLSerialize(CONTENT
      extract(t1.xmltext,'/')
    )
    FROM myschema.event t1
    WHERE XMLEXISTS('$e/Event' PASSING XMLTEXT AS "e")
    ORDER BY t1.time DESC
    ;
    
  • Beehive netui - config.xml and the ampersand problem

    <>url-config
    < url-encodes-URL > false < / url-encodes-URL >
    < html-amp-entity > false < / html-amp-entity >
    < / url-config >

    I added the following lines in the Beehive netui - config.xml, but getting these errors saying entered invalid, we use WLP 10.2, any help at this very appreciated


    java.lang.IllegalStateException: has not been initialized in /WEB-INF/beehive-netui-config.xml
    at org.apache.beehive.netui.pageflow.internal.PageFlowInitialization.performInitializations(PageFlowInitialization.java:95)
    at org.apache.beehive.netui.pageflow.PageFlowContextListener.contextInitialized(PageFlowContextListener.java:47)
    to weblogic.servlet.internal.EventsManager$ FireContextListenerAction.run (EventsManager.java:458)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs (unknown Source)
    Truncated. check the log file full stacktrace
    org.apache.beehive.netui.util.config.ConfigInitializationException: Validation errors occurred parsing the configuration file "/WEB-INF/beehive-netui-config.xml". Cause: org.xml.sax.SAXParseException: cvc-complex - type. 2.4.d: invalid content were found starting with the element "url-config". No child element is planned at this stage.
    to org.apache.beehive.netui.util.config.parser.NetUIConfigParser$ 3.error(NetUIConfigParser.java:171)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:175)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    to com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$ XSIErrorReporter.reportError (XMLSchemaValidator.java:429)
    Truncated. check the log file full stacktrace
    org.xml.sax.SAXParseException: cvc-complex - type. 2.4.d: invalid content were found starting with the element "url-config". No child element is planned at this stage.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    to com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$ XSIErrorReporter.reportError (XMLSchemaValidator.java:429)
    Truncated. check the log file full stacktrace


    e < 28 October 2008 9:40:50 PM PDT > < error > < hats > < BEA-149265 > < error has occurred in the execution of the request for deployment with the ID ' 1225255174548 'for task ' 0'. Error: ' weblogic.application.ModuleException: '
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    Truncated. check the log file full stacktrace
    org.xml.sax.SAXParseException: cvc-complex - type. 2.4.d: invalid content were found starting with the element "url-config". No child element is planned at this stage.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    to com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$ XSIErrorReporter.reportError (XMLSchemaValidator.java:429)
    Truncated. check the log file full stacktrace


    < 28 October 2008 9:40:50 PM PDT > < error > < hats > < BEA-149202 > < encountered an exception while trying to commit the task 9 for the application "PortalEar". >
    < 28 October 2008 9:40:50 PM PDT > < WARNING > < hats > < BEA-149004 > < failures have been detected all by initiating the task to redeploy to app "PortalEar" >.
    < 28 October 2008 9:40:50 PM PDT > < WARNING > < hats > < BEA-149078 > < message 149004 track battery
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:975)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:361)
    to weblogic.application.internal.flow.ModuleStateDriver$ 3.next(ModuleStateDriver.java:204)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
    Truncated. check the log file full stacktrace
    org.xml.sax.SAXParseException: cvc-complex - type. 2.4.d: invalid content were found starting with the element "url-config". No child element is planned at this stage.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:172)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:382)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
    to com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$ XSIErrorReporter.reportError (XMLSchemaValidator.java:429)
    Truncated. check the log file full stacktrace


    < 28 October 2008 9:40:51 PM PDT > < WARNING > < hats > < BEA-149252 > < no deployment "PortalEar" found to stop operation. >

    Looks like you added the config url entry in the wrong place in the config file, so it fails to analyze. Looking at the diagram of the Beehive netui config, the elements in the netui-config element must be in the following sequence:













    So "url-config" should come before "iterator-factories" and after 'jsp-tag-config' in the config file.

    Jeff

  • [request] The XML parsing

    
    7Eagle kids Volunteer6Volunteer IT5Usher Umum4Pendoa3Multimedia2Creative Ministry1Praise and Worship
    

    This is my XML

    My question is:

    How to read on my blackberry and view it?

    can I get the data as a String type?

    Thank you very much

    hope you can help me

    Sorry for my bad English

    package mypackage;
    import javax.microedition.io.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    
    class XML_Parsing_Sample extends UiApplication{
        //creating a member variable for the MainScreen
        MainScreen _screen= new MainScreen();
        //string variables to store the values of the XML document
        String _node,_element;
        Connection _connectionthread;
    
        public static void main(String arg[]){
            XML_Parsing_Sample application = new XML_Parsing_Sample();
            //create a new instance of the application
            //and start the application on the event thread
            System.out.println("lalalala");
            application.enterEventDispatcher();
        }
    
        public XML_Parsing_Sample() {
            _screen.setTitle("XML Parsing");//setting title
            _screen.add(new RichTextField("Requesting....."));
            _screen.add(new SeparatorField());
    
            pushScreen(_screen); // creating a screen
            //creating a connection thread to run in the background
            _connectionthread = new Connection();
            _connectionthread.start();//starting the thread operation
        }
    
        public void updateField(String node, String element){
            //receiving the parsed node and its value from the thread
            //and updating it here
            //so it can be displayed on the screen
            String title="Title";
            _screen.add(new RichTextField(node+" : "+element));
    
            if(node.equals(title)){
                _screen.add(new SeparatorField());
            }
        }
    
        private class Connection extends Thread{
            public Connection(){
                super();
    
            }
    
            public void run(){
                // define variables later used for parsing
                Document doc;
                StreamConnection conn;
    
                try{
                    //providing the location of the XML file,
                    //your address might be different
    
                    conn=(StreamConnection)Connector.open
                      ("http://localhost/ms/write.xml");
                    //next few lines creates variables to open a
                    //stream, parse it, collect XML data and
                    //extract the data which is required.
                    //In this case they are elements,
                    //node and the values of an element
                    DocumentBuilderFactory docBuilderFactory
                      = DocumentBuilderFactory. newInstance();
                    DocumentBuilder docBuilder
                      = docBuilderFactory.newDocumentBuilder();
                    docBuilder.isValidating();
                    doc = docBuilder.parse(conn.openInputStream());
                    doc.getDocumentElement ().normalize ();
                    NodeList list=doc.getElementsByTagName("*");
                    _node=new String();
                    _element = new String();
                    //this "for" loop is used to parse through the
                    //XML document and extract all elements and their
                    //value, so they can be displayed on the device
    
                    for (int i=0;i
    

    I used this source code, but nothing is displayed...

    and don't forget, I am a new blackberry device programming, so I then I thank you if you can explain it in the explanation of "simple".

    God bless you

    Hello peter, how are you?

    Thanks for the reply...

    package mypackage;
    import javax.microedition.io.*;
    import javax.wireless.messaging.Message;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    
    class XML_Parsing_Sample extends UiApplication{
        //creating a member variable for the MainScreen
        MainScreen _screen= new MainScreen();
        //string variables to store the values of the XML document
        String _node,_element;
        Connection _connectionthread;
    
        public static void main(String arg[]){
            XML_Parsing_Sample application = new XML_Parsing_Sample();
    
            //create a new instance of the application
            //and start the application on the event thread
            application.enterEventDispatcher();
        }
    
        public XML_Parsing_Sample() {
            _connectionthread = new Connection();
            _connectionthread.start();//starting the thread operation
            _screen.setTitle("XML Parsing");//setting title
            _screen.add(new RichTextField("Requesting....."));
            _screen.add(new SeparatorField());
    
            pushScreen(_screen); // creating a screen
            //creating a connection thread to run in the background
    //        _connectionthread = new Connection();
    //        _connectionthread.start();//starting the thread operation
        }
    
        public void updateField(String node, String element){
            //receiving the parsed node and its value from the thread
            //and updating it here
            //so it can be displayed on the screen
            String title="Title";
            _screen.add(new RichTextField(node+" : "+element));
    
            if(node.equals(title)){
                _screen.add(new SeparatorField());
            }
        }
    
        private class Connection extends Thread{
            public Connection(){
                super();
    
            }
    
            public void run(){
                // define variables later used for parsing
                Document doc;
                StreamConnection conn;
    
                try{
                    //providing the location of the XML file,
                    //your address might be different
    
                    conn=(StreamConnection)Connector.open
                      ("http://localhost/ms/write.xml");
                    //next few lines creates variables to open a
                    //stream, parse it, collect XML data and
                    //extract the data which is required.
                    //In this case they are elements,
                    //node and the values of an element
                    DocumentBuilderFactory docBuilderFactory
                      = DocumentBuilderFactory. newInstance();
                    DocumentBuilder docBuilder
                      = docBuilderFactory.newDocumentBuilder();
                    docBuilder.isValidating();
                    doc = docBuilder.parse(conn.openInputStream());
                    doc.getDocumentElement ().normalize ();
    
                    NodeList list=doc.getElementsByTagName("root");
    
                    _node=new String();
                    _element = new String();
                    int n = list.getLength();
                    String[] choices= new String[n];
                    //this "for" loop is used to parse through the
                    //XML document and extract all elements and their
                    //value, so they can be displayed on the device
    
                    for (int i=0;i
    

    I already have the code, but nothing appeared.

    I think that there is something wrong with my code (the one in bold)

    and I get all confused, there are 2 methods for parsing xml, DOM and SAX.

    I don't know what they are... and how to use...

    can you help me pleaseee peter ?

    appriciate your help

  • Analysis on OFA XML

    Hello, everyone. Good evening.

    I am trying to validate an XML file with a schema, but for some strange reason, it does not work.

    I use JDev with OA Extension version 12.1.3 (jdk 1.5.0_05).

    Despise the OA, the client version is located on EBS 12.2.4. We tried to do the last patch, but we faced some problems and so far, we use this version expired without any problem.

    Say, by default JDev, I am able to do validation (the tests were conducted with the same version of the jdk). Specifically, class validator survey an exception when the XML is not valid. But this does not happen on JDevOA.

    Have no idea what could happen?

    Here's the code for entire test class.

    import java.io.File;
    import java.io.IOException;
    
    
    import javax.xml.XMLConstants;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    
    
    import org.w3c.dom.Document;
    
    
    import org.xml.sax.SAXException;
    
    
    public class XMLReader2 {
    
    
        private Document doc;
    
    
        public XMLReader2(File xmlFile,
                          File schemaFile) throws ParserConfigurationException,
                                                  SAXException, IOException {
            DocumentBuilder db =
                DocumentBuilderFactory.newInstance().newDocumentBuilder();
            doc = db.parse(xmlFile);
            validateXml(doc, schemaFile);
        }
    
    
        public void validateXml(Document doc, File schemaFile) throws SAXException,
                                                                      IOException {
            SchemaFactory schemaFactory =
                SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            Schema schema = schemaFactory.newSchema(schemaFile);
            Validator validator = schema.newValidator();
            validator.validate(new DOMSource(doc));
        }
    
    
        public static void main(String[] args) throws SAXException,
                                                      ParserConfigurationException,
                                                      IOException {
            File xmlFile =
                new File("C:\\Users\\marcelo.cavalcante\\Desktop\\itenscontratuais.xml");
            File schemaFile =
                new File("C:\\Users\\marcelo.cavalcante\\Desktop\\technip.xsd");
            XMLReader2 xMLReader = new XMLReader2(xmlFile, schemaFile);
        }
    
    
    
    
    }
    
    

    On JDevOA, I use a messageFileUpload to get the XML file and I use the overloaded method parse (InputStream), passing of BlobDomain.getInputStream ().

    For the XSD, I get like a StreamSource (getClass .getClassLoader () .getResourceAsStream ()) ().

    I already checked that both files are read correctly, at least by the methods mentioned just above.

    It is the XSD content.

    <?xml version="1.0"?>
    <xs:schema
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    
    <xs:element name="itemLista" type="itemListaType"/>
    
    <xs:complexType name="itemListaType">
      <xs:sequence>
      <xs:element name="item" type="itemType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="itemType">
      <xs:sequence>
      <xs:element name="descricao" type="xs:string"/>
      <xs:element name="desenho" type="xs:string"/>
      <xs:element name="uom" type="xs:string"/>
      <xs:element name="qtd" type="xs:decimal"/>
      </xs:sequence>
    </xs:complexType>
    
    </xs:schema>
    
    


    And it's the XML content (intended to trigger an error, because the qtd element does not exist).


    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <itemLista>
      <item>
      <descricao>BK 90010.4.082</descricao>
      <desenho>--</desenho>
      <uom>Adaptador 9/16" - 18 - 37° JIC</uom>
      </item>
    </itemLista>
    
    
    
    

    I really appreciate any help you can provide.

    Marcelo Cavalcante.

    Hello, everyone.

    I did the job. method of getStorageByteArray(), for some reason, I don't know, gave me a corrupt (at least it seems that Yes) byte array. After changing to getBinaryStream(), I was able to validate the file.

  • Problem in obtaining the root XML element. (without prefix)

    Hi all

    my xml is as below.

    < ns1:abcd >
    < ns2: a > 1 < / ns2: a >
    < ns2:b > 2 < / ns2:b >
    < / ns1:abcd >

    If I try to retrieve the value of the root of the xml document.

    Myroot node = doc.getDocumentElement ();

    String result = myroot.getNodeName ();

    My output is ns1:abcd... I want only 'abcd '...

    Also if I try to print myroot.getPrefix, myroot.getNamespaceURI... all these values are null.

    My xml will not always have the same namespaces... starting from the xml inbound I must first check for namespaces... Please give me an idea.

    I think so.. I need an evaluation space names to...

    Please help me in this regard.

    Thank you
    Sabarisri. N

    Hi Sabarisri,

    Please try the following code:

    import java.io.StringReader;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.xml.sax.InputSource;
    
    public class Runner2 {
        public static void main(String[] args) {
            String xmlString =
                "" +
                "  1" +
                "  2" +
                "";
    
            try {
                InputSource is = new InputSource(new StringReader(xmlString));
                DocumentBuilder docBuilder =
                    DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document document = docBuilder.parse(is);
                Element element = document.getDocumentElement();
                System.out.println(element.getLocalName());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    

    Kind regards
    Pino

  • Select the XML data

    Dear all,

    Please find a list of the steps done to read the date of conversion of currency by the last final query, that I can be able to obtain the release of the name of the Bank as the Central Bank, but impossible to extract the time, rates, currency of the XML data.

    Please tell us how to solve the problem.

    CREATE TABLE url_tab

    (

    URL_NAME VARCHAR2 (100),

    SYS URL. URIType

    );

    INSERT INTO url_tab VALUES

    ("This is a test URL',

    sys . UriFactory.getUri ("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml" "")

    );

    INSERT into xml_data_tab select sys.xmltype.createXML (u.url.getClob ()) in u url_tab;

    Select Bank_name, xt1.* from

    XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref', ))

                                   ' ( http://www.GESMES.org/XML/2002-08-01 ' as "gesmes"),

    ' / / gesmes:Envelope'

    FROM (select * from xml_data_tab)

    columns

    Path of varchar2 (100) Bank_name ' / gesmes:Envelope / gesmes:Sender / gesmes:name',

    outer join left perv_t XMLTYPE PATH "Cube/Cube")

    XMLTable (XMLNamespaces ('http://www.gesmes.org/xml/2002-08-01' as "gesmes"), )

    "/ / Cube/Cube."

    FROM (select * from xml_data_tab)

    COLUMNS

    path of varchar2 (100) of rate_date "@time"

    path varchar2 (100) coin "@currency."

    path of rate varchar2 (100) '@rate') xt1 on 1 = 1

    its work for me

    SQL > with xml_data_tab like)

    2. Select XMLType)

    3'http://www.gesmes.org/xml/2002-08-01' xmlns ="http://www.ecb.int/vocabulary/2002-08-01/eurofxref" >. "

    4 reference rate

    5

    6 the European Central Bank

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    21

    22

    23

    24

    25

    26

    27

    28

    29

    30

    31

    32

    33

    34

    35

    36

    37

    38

    39

    40

    41

    42

    43 ') as the double DATA

    44)

    45 select Bank_name, xt1. RATE_DATE, xt2.*

    XMLTable 46 (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref',

    47'http://www.gesmes.org/xml/2002-08-01"as"gesmes"),"

    48 ' / / gesmes:Envelope'

    49 FROM (select * from xml_data_tab)

    50 columns

    51 way of varchar2 (100) of Bank_name ' / gesmes:Envelope / gesmes:Sender / gesmes:name',

    52 perv_t XMLTYPE PATH 'Cube'):

    53 left outer join XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'),

    54                         '*'

    55 in PASSING (h.perv_t)

    56 COLUMNS

    path of varchar2 (100) 57 rate_date "Cube/@time."

    58 rate_data XMLType path ' / / Cube/Cube ') xt1 on 1 = 1

    59 left outer join XMLTable (XMLNamespaces (default 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref'),

    60 ' / / cube/Cube/Cube. "

    61 FROM (select * from xml_data_tab)

    62 COLUMNS

    path of VARCHAR2 (3) currency 63 "@currency."

    number 64 path "@rate" rate) xt2 on 1 = 1;

    BANK_NAME RATE_DATE HEART RATE

    ---------------------------------------- ------------------------- --- ----------

    2015 Central Bank European-12-30 US $ 1.0926

    30-12-2015 of the European Central Bank JPY 131.66

    2015 Central Bank European-12-30 BGN 1.9558

    2015 Central Bank European-12-30 CZK 27.029

    30-12-2015 of the European Central Bank DKK 7.4625

    2015 Central Bank European-12-30 GBP.73799

    30-12-2015 of the European Central Bank HUF 313,15

    2015 Central Bank European-12-30 PLN 4.24

    30-12-2015 of the European Central Bank, RON 4.5296

    2015 Central Bank European-12-30 SEK 9.1878

    2015 Central Bank European-12-30 CHF 1.0814

    BANK_NAME RATE_DATE HEART RATE

    ---------------------------------------- ------------------------- --- ----------

    2015 Central Bank European-12-30 NOK 9.616

    30-12-2015 of the European Central Bank 7.637 HRK

    30-12-2015 of the European Central Bank RUB 79.754

    30-12-2015 of the European Central Bank TRY 3.1837

    2015 Central Bank European-12-30 AUD 1.499

    30-12-2015 of the European Central Bank BRL 4.259

    2015 Central Bank European-12-30 CAD 1.5171

    2015 Central Bank European-12-30 CNY 7.091

    2015 Central Bank European-12-30 HKD 8.4685

    30-12-2015 of the European Central Bank IDR 15081.33

    30-12-2015 of the European Central Bank, ILS 4.2606

    BANK_NAME RATE_DATE HEART RATE

    ---------------------------------------- ------------------------- --- ----------

    30-12-2015 of the European Central Bank INR 72.535

    30-12-2015 of the European Central Bank 1284.79 KRW

    2015 Central Bank European-12-30. 18.8867 MXN

    30-12-2015 of the European Central Bank MYR 4.6887

    2015 Central Bank European-12-30 NZD 1.5959

    30-12-2015 of the European Central Bank PHP 51.281

    30-12-2015 of the European Central Bank SGD 1.5449

    2015 Central Bank European-12-30 THB 39.334

    30-12-2015 of the European Central Bank ZAR 16.8847

    31 selected lines.

  • WebLogic 12.2.1 validation.xml parse error

    When I deploy the ear containing validation.xml in META-INF of ejb - jar file on weblogic 12.2.1, below error occurs:


    <BEA-000000> <Error parsing validation.xml synchronously
    java.lang.IllegalArgumentException: URI is not hierarchical
      at java.io.File.<init>(File.java:418)
      at org.eclipse.persistence.jaxb.ValidationXMLReader.parseValidationXML(ValidationXMLReader.java:147)
      at org.eclipse.persistence.jaxb.ValidationXMLReader.call(ValidationXMLReader.java:67)
      at org.eclipse.persistence.jaxb.BeanValidationHelper.parseValidationXml(BeanValidationHelper.java:178)
      at org.eclipse.persistence.jaxb.BeanValidationHelper.getConstraintsMap(BeanValidationHelper.java:143)
      at org.eclipse.persistence.jaxb.BeanValidationHelper.isConstrained(BeanValidationHelper.java:120)
      at org.eclipse.persistence.jaxb.JAXBBeanValidator.isConstrainedObject(JAXBBeanValidator.java:255)
      at org.eclipse.persistence.jaxb.JAXBBeanValidator.shouldValidate(JAXBBeanValidator.java:206)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.validateAndBuildJAXBElement(JAXBUnmarshaller.java:235)
      at org.eclipse.persistence.jaxb.JAXBUnmarshaller.unmarshal(JAXBUnmarshaller.java:640)
      at org.hibernate.validator.internal.util.privilegedactions.Unmarshal.run(Unmarshal.java:38)
      at org.hibernate.validator.internal.util.privilegedactions.Unmarshal.run(Unmarshal.java:20)
      at org.hibernate.validator.internal.xml.ValidationXmlParser.run(ValidationXmlParser.java:201)
      at org.hibernate.validator.internal.xml.ValidationXmlParser.unmarshal(ValidationXmlParser.java:125)
      at org.hibernate.validator.internal.xml.ValidationXmlParser.parseValidationXml(ValidationXmlParser.java:81)
      at org.hibernate.validator.internal.engine.ConfigurationImpl.getBootstrapConfiguration(ConfigurationImpl.java:353)
      at org.hibernate.validator.internal.cdi.ValidationExtension.<init>(ValidationExtension.java:120)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at org.jboss.weld.util.ServiceLoader.prepareInstance(ServiceLoader.java:240)
      at org.jboss.weld.util.ServiceLoader.loadService(ServiceLoader.java:214)
      at org.jboss.weld.util.ServiceLoader.loadServiceFile(ServiceLoader.java:182)
      at org.jboss.weld.util.ServiceLoader.reload(ServiceLoader.java:162)
      at org.jboss.weld.util.ServiceLoader.iterator(ServiceLoader.java:297)
      at com.oracle.injection.provider.weld.BasicDeployment.getExtensions(BasicDeployment.java:106)
      at com.oracle.injection.provider.weld.WeldInjectionContainer.initialize(WeldInjectionContainer.java:92)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.initCdi(CDIAppDeploymentExtension.java:64)
      at com.oracle.injection.integration.CDIAppDeploymentExtension.activate(CDIAppDeploymentExtension.java:41)
      at weblogic.application.internal.flow.AppDeploymentExtensionFlow.activate(AppDeploymentExtensionFlow.java:39)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:753)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:263)
      at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:67)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:601)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:171)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:121)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:343)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:895)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1422)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:454)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:181)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:643)
      at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:348)
      at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:333)
      at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:54)
      at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
      at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:617)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:397)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:346)


    My validation.xml file is:

    <?xml version="1.0" encoding="UTF-8" ?>
    <validation-config
      xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="
      http://jboss.org/xml/ns/javax/validation/configuration
      validation-configuration-1.1.xsd"
      version="1.1">
    </validation-config>


    How to deploy ear with validation.xml on weblogic 12.2.1 file?

    My project structure:

    EAR file

    EJB.jar

    META-INF

    validation. XML

    I changed validation.xml file ear-file/META-INF location and my project deployed.

    I am looking for this reason for question in java, I find good answers the getResource method to find the resource in the file system and if the file exists in another jar file, you need by using the getResourceAsStearm method. According to this, with changed location of the file this problem solved.

    But this approach is not good for a condition that each module has custom validation bean configuration.

    Thank you.

Maybe you are looking for