XML SAX error in parsing

Hi,
I have a large XML file(100KB) and I am using SAX parser for parsing it.
The part of the code is shown here
public void characters(char[] ch, int start, int end)
throws SAXException {
String s = new String(ch, start, end);
// System.out.println("characters: " + s);
if(s == null || s.trim().length() == 0 || s.equals("\n")) {
               return;
setValueInObject(s);
where I assumes that the "s" will be the "value" in my xml for example
<tag>value<tag>
This is working fine , in most of the cases. But if the "value" is too large sometimes it gives me part of the value (eg. valu) only. And if i re-try then i may work.
Please advice me in this regards.
thanks
Rajesh

Just use characters() method for building string. Use endElement() to process that string.

Similar Messages

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • XML - 0112 Error on parsing using SAX and xml file in InputSource object.

    I need to parse a XML string and extract some information. I have to use SAX parser. I'm converting hte string to InputSource and then trying to parese.
    i'm getting XML-0112 error, my guess is that it is not able to locate DTD file but i tried hardcoding the whole path in DOCTYPE tag.
    i tried doing setSystemId also but no luck.
    null

    Can you post a simple test case to look at?

  • Org.xml.sax error content not allowed in prolog

    Hi,
    I am running Jetty 6.x on SUSE and there is a webapp called pyjasper i am trying to run on it. the context maps fine and it displays the content however, when i use the applet in the webapp to create a report (.jasper) it gives me a org.xml.sax Parse exception: content not allowed in prolog.
    A little part of the error is pasted below:
    generating report /tmp/pyJasper/compiled-reports/6390c37d0ea810c7fae3e647c2f86817.jasper
    Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1039)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    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:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.apache.commons.digester.Digester.parse(Digester.java:1647)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:239)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    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:597)
    2010-03-04 09:15:59.073::WARN: /pyJasper/jasper.py
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:243)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:226)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:214)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:168)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:115)
    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:597)
    I am guessing this is some sort of an error in xml parsing. I found couple of solutions on sun java forums but none of them worked for me. Right now I am trying to figure out whether this is being caused by the applet or the java itself.
    Apparently other people who use this applet do not have a problem and they have the exact same files as me. So I am not sure what exactly is causing tihs problem. Bit of a noob.
    Any help would be greatly appreciated.
    THANK YOU VERY MUCH!!!! :)

    Hi thanks you very much for the reply.
    In my message I forgot to mention that I edited my prologs to "<?xml version = "1.0" encoding = "UTF-8"?>" and the jetty.xml that has the server configuration has:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
    I apologize for the clarity of my message. I meant to say that I was wondering whether the problem is with the xm files that java has, or the xml files that are in the pyjasper package that I downloaded?
    I also checked for byte order mark using hex editor to see if those six characters were in front of my xml files. None of the files in the pyjasper package had the BOM so that solution did not work.
    Is there something wrong with the above xml prolog?
    I have been reading tons of different posts and stuf trying to figure this out for the past month but juts cannot seem to get it to work.
    Thanks.

  • Error in parsing struts-config.xml

              There are lots of errors in parsing struts-config.xml in Jbuilder9+weblogic6.1+struts1.0.2.
              Who
              can help me? Thanks a lot
              struts-config.xml is generated by Jbuilder9:
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration
              1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
              <struts-config>
              <form-beans>
              <form-bean name="myActionForm" type="demostruts.myActionForm" />
              </form-beans>
              <global-forwards>
              <forward name="input" path="/input" />
              </global-forwards>
              <action-mappings>
              <action name="myActionForm" type="demostruts.myAction" input="/input.jsp"
              scope="session" path="/myAction" />
              </action-mappings>
              </struts-config>
              error message is:
              Call org.apache.struts.action.ActionServlet.addServletMapping(action/java.lang.String,*.do/java.lang.String)
              Parse Error at line 2 column 16: Element type "Struts-config" must be declared.
              org.xml.sax.SAXParseException: Element type "Struts-config" must be declared.
                   at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
                   at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1720)
                   at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3311)
                   at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1140)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1008)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
                   at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
                   at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
                   at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
                   at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:108)
                   at org.apache.struts.digester.Digester.parse(Digester.java:755)
                   at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
                   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
                   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
                   at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
                   at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
                   at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2198)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2142)
                   at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:883)
                   at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:806)
                   at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
                   at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
                   at weblogic.j2ee.Application.addComponent(Application.java:160)
                   at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
                   at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy34.addWebDeployment(Unknown Source)
                   at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1093)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy33.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy46.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
                   at weblogic.management.Admin.finish(Admin.java:561)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
              Parse Error at line 3 column 13: Element type "form-beans" must be declared.
              org.xml.sax.SAXParseException: Element type "form-beans" must be declared.
                   at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
                   at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1720)
                   at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3311)
                   at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1140)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1241)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
                   at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
                   at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
                   at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
                   at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:108)
                   at org.apache.struts.digester.Digester.parse(Digester.java:755)
                   at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
                   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
                   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
                   at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
                   at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
                   at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2198)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2142)
                   at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:883)
                   at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:806)
                   at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
                   at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
                   at weblogic.j2ee.Application.addComponent(Application.java:160)
                   at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
                   at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy34.addWebDeployment(Unknown Source)
                   at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1093)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy33.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy46.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
                   at weblogic.management.Admin.finish(Admin.java:561)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
              Parse Error at line 5 column 67: Element type "form-bean" must be declared.
              org.xml.sax.SAXParseException: Element type "form-bean" must be declared.
                   at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
                   at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1720)
                   at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3311)
                   at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1140)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1876)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1252)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
                   at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
                   at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
                   at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
                   at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:108)
                   at org.apache.struts.digester.Digester.parse(Digester.java:755)
                   at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
                   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
                   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
                   at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
                   at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
                   at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2198)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2142)
                   at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:883)
                   at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:806)
                   at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
                   at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
                   at weblogic.j2ee.Application.addComponent(Application.java:160)
                   at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
                   at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy34.addWebDeployment(Unknown Source)
                   at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1093)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy33.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy46.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
                   at weblogic.management.Admin.finish(Admin.java:561)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
              Parse Error at line 8 column 18: Element type "action-mappings" must be declared.
              org.xml.sax.SAXParseException: Element type "action-mappings" must be declared.
                   at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
                   at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1720)
                   at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3311)
                   at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1140)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1241)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
                   at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
                   at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
                   at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
                   at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:108)
                   at org.apache.struts.digester.Digester.parse(Digester.java:755)
                   at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
                   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
                   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
                   at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
                   at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
                   at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2198)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2142)
                   at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:883)
                   at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:806)
                   at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
                   at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
                   at weblogic.j2ee.Application.addComponent(Application.java:160)
                   at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
                   at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy34.addWebDeployment(Unknown Source)
                   at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1093)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy33.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy46.start(Unknown Source)
                   at weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(ApplicationManagerMBean_CachingStub.java:479)
                   at weblogic.management.Admin.startApplicationManager(Admin.java:1138)
                   at weblogic.management.Admin.finish(Admin.java:561)
                   at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:501)
                   at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:198)
                   at weblogic.Server.main(Server.java:35)
              Parse Error at line 13 column 26: Element type "action" must be declared.
              org.xml.sax.SAXParseException: Element type "action" must be declared.
                   at weblogic.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1082)
                   at weblogic.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1720)
                   at weblogic.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3311)
                   at weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1140)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1876)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1252)
                   at weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
                   at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
                   at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
                   at weblogic.xml.jaxp.WebLogicParser.parse(WebLogicParser.java:67)
                   at weblogic.xml.jaxp.RegistryParser.parse(RegistryParser.java:130)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:317)
                   at javax.xml.parsers.SAXParser.parse(SAXParser.java:108)
                   at org.apache.struts.digester.Digester.parse(Digester.java:755)
                   at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1332)
                   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
                   at javax.servlet.GenericServlet.init(GenericServlet.java:258)
                   at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:698)
                   at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:641)
                   at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:586)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2198)
                   at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2142)
                   at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:883)
                   at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:806)
                   at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:413)
                   at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
                   at weblogic.j2ee.Application.addComponent(Application.java:160)
                   at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
                   at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy34.addWebDeployment(Unknown Source)
                   at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1093)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
                   at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:279)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:233)
                   at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:193)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:606)
                   at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:590)
                   at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:350)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                   at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:444)
                   at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:185)
                   at $Proxy33.updateDeployments(Unknown Source)
                   at weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(ServerMBean_CachingStub.java:2706)
                   at weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(ApplicationManager.java:360)
                   at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
                   at java.lang.reflect.Method.invoke(Native Method)
                   at weblogic.management.internal.Dyn

    Usually, a 503 means that WebLogic can't find the compiler it needs to compile your JSPs. Check your weblogic.xml for the compiler param (forgot the exact name) in the jsp section (<jsp:descriptor>).
    If the above doesn't apply to your case, I'm afraid I can't be of much further help...

  • Or.xml.sax giving error when parsing character entity

    I am parsing an xml stream using SAX parser using org.xml.sax.*
    When any XML tag say <name>sumit & sumit</name> OR <name>sumit & sumit</name> is parsed it throws the error as :
    org.xml.sax.SAXParseException: XML-0210: (Fatal Error) Unexpected EOF.
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at org.xml.sax.SAXException.<init>(Compiled Code)
    at org.xml.sax.SAXParseException.<init>(Compiled Code)
    at oracle.xml.parser.v2.XMLParseException.<init>(Compiled Code)
    at oracle.xml.parser.v2.XMLError.flushErrors(Compiled Code)
    at oracle.xml.parser.v2.XMLError.error(Compiled Code)
    at oracle.xml.parser.v2.XMLError.error(Compiled Code)
    at oracle.xml.parser.v2.XMLReader.popXMLReader(Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(Compiled Code)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(Compiled Co
    de)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(Compiled Code)
    at oracle.xml.parser.v2.XMLParser.parse(Compiled Code)
    at com.fidelity.fbrs.general.process.GenericSAXHandler.parse(Compiled Co
    de)
    at com.fidelity.fbrs.general.process.ServiceRequest.processComplexXMLReq
    uest(Compiled Code)
    at com.fidelity.fbrs.general.process.ServiceRequest.processXMLRequest(Co
    mpiled Code)
    at com.fidelity.fbrs.general.process.ServiceRequest.service(Compiled Cod
    e)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at org.apache.jserv.JServConnection.processRequest(Compiled Code)
    at org.apache.jserv.JServConnection.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    Please let me the resolution,,,
    Thanks
    Sumit

    Correction:
    you need to escape the & character in your XML file by using &amp; instead of using & directly.

  • Error while parsing or executing XML-SQL document

    friends,
    my scenario is based on file to jdbc.i am facing  an error in receiver CC in RWB.
    The error states that '
    Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'MATMAS' (structure 'STATEMENT'): java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]String or binary data would be truncated.'
    My SOAP xml message is
    - <SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    - <SOAP:Header>
    - <sap:Main xmlns:sap="http://sap.com/xi/XI/Message/30" versionMajor="3" versionMinor="0" SOAP:mustUnderstand="1" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-main-92ABE13F5C59AB7FE10000000A1551F7">
      <sap:MessageClass>ApplicationMessage</sap:MessageClass>
      <sap:ProcessingMode>asynchronous</sap:ProcessingMode>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:TimeSent>2008-02-06T22:30:21Z</sap:TimeSent>
    - <sap:Sender>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>ECC</sap:Service>
      </sap:Sender>
    - <sap:Receiver>
      <sap:Party agency="http://sap.com/xi/XI" scheme="XIParty" />
      <sap:Service>BS_JDBC</sap:Service>
      </sap:Receiver>
      <sap:Interface namespace="http://file_to_jdbc">MI_JDBC_RECEIVER</sap:Interface>
      </sap:Main>
    - <sap:ReliableMessaging xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:QualityOfService>ExactlyOnce</sap:QualityOfService>
      </sap:ReliableMessaging>
    - <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">
    sapecc50\sapmnt\trans</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">UTF-8</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</sap:Record>
      <sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">matmas1.txt</sap:Record>
      </sap:DynamicConfiguration>
    - <sap:HopList xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
    - <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
      <sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:Info />
      </sap:Hop>
    - <sap:Hop timeStamp="2008-02-06T22:30:21Z" wasRead="false">
      <sap:Engine type="IS">is.01.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XI</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      <sap:Info>3.0</sap:Info>
      </sap:Hop>
    - <sap:Hop timeStamp="2008-02-06T22:30:22Z" wasRead="false">
      <sap:Engine type="AE">af.e6e.sapecc6eval</sap:Engine>
      <sap:Adapter namespace="http://sap.com/xi/XI/System">XIRA</sap:Adapter>
      <sap:MessageId>18f17dd0-d503-11dc-cb4d-001635b02bfd</sap:MessageId>
      </sap:Hop>
      </sap:HopList>
    - <sap:Diagnostic xmlns:sap="http://sap.com/xi/XI/Message/30" SOAP:mustUnderstand="1">
      <sap:TraceLevel>Information</sap:TraceLevel>
      <sap:Logging>Off</sap:Logging>
      </sap:Diagnostic>
      </SOAP:Header>
    - <SOAP:Body>
    - <sap:Manifest xmlns:sap="http://sap.com/xi/XI/Message/30" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="wsuid-manifest-5CABE13F5C59AB7FE10000000A1551F7">
    - <sap:Payload xlink:type="simple" xlink:href="cid:[email protected]">
      <sap:Name>MainDocument</sap:Name>
      <sap:Description />
      <sap:Type>Application</sap:Type>
      </sap:Payload>
      </sap:Manifest>
      </SOAP:Body>
      </SOAP:Envelope>
    and payload message is
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
    - <STATEMENT>
    - <ROW action="INSERT">
      <TABLE>MATMAS</TABLE>
    - <access>
      <MATNR>38</MATNR>
      <MTART>HALB</MTART>
      <MATKL>00107</MATKL>
      <MEINS>pc</MEINS>
      <ERSDA>2008.04.05</ERSDA>
      <BRGEW>10</BRGEW>
      <NTGEW>12</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>88</MATNR>
      <MTART>FERT</MTART>
      <MATKL>02004</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2008.04.05</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>13</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>89</MATNR>
      <MTART>FERT</MTART>
      <MATKL>02004</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2008.03.02</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>14</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>98</MATNR>
      <MTART>HALB</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2006.09.01</ERSDA>
      <BRGEW>12</BRGEW>
      <NTGEW>12</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>170</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>4</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2005.03.02</ERSDA>
      <BRGEW>2</BRGEW>
      <NTGEW>3</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>178</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>4</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.03.06</ERSDA>
      <BRGEW>3</BRGEW>
      <NTGEW>4</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>188</MATNR>
      <MTART>NLAG</MTART>
      <MATKL>5</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.05.02</ERSDA>
      <BRGEW>2</BRGEW>
      <NTGEW>3</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>288</MATNR>
      <MTART>HALB</MTART>
      <MATKL>101</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2006.02.11</ERSDA>
      <BRGEW>5</BRGEW>
      <NTGEW>4</NTGEW>
      <GEWEI>KG</GEWEI>
      </access>
    - <access>
      <MATNR>358</MATNR>
      <MTART>HAWA</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.09.09</ERSDA>
      <BRGEW>500</BRGEW>
      <NTGEW>500</NTGEW>
      <GEWEI>G</GEWEI>
      </access>
    - <access>
      <MATNR>359</MATNR>
      <MTART>HAWA</MTART>
      <MATKL>2</MATKL>
      <MEINS>PC</MEINS>
      <ERSDA>2007.08.01</ERSDA>
      <BRGEW>20</BRGEW>
      <NTGEW>10</NTGEW>
      <GEWEI>G</GEWEI>
      </access>
      </ROW>
      </STATEMENT>
      </ns0:MT_JDBC_RECEIVER>
    Could anybody help me in sorting out this issue.My advance thanks

    hi,
    ypur structure is bad defined.
    if you want to do an insert, the DT should be
    <ns0:MT_JDBC_RECEIVER xmlns:ns0="http://file_to_jdbc">
    ___<StatementName>
    ______<dbTableName action=”INSERT”>
    _____<table>MATMAS</table>
    _______ <access>
    ___________<MATNR>38</MATNR>
    ___________<MTART>HALB</MTART>
    ___________<MATKL>00107</MATKL>
    ___________<MEINS>pc</MEINS>
    ___________<ERSDA>2008.04.05</ERSDA>
    ___________<BRGEW>10</BRGEW>
    ___________<NTGEW>12</NTGEW>
    ___________<GEWEI>KG</GEWEI>
    ______</access>
    _____</dbTableName>
    __ </StatementName>
    </ns0:MT_JDBC_RECEIVER>
    the ROW field is used when you wait receive data from DB for example you execute and SQL Query from Sender communication channel "SELECT name FROM TABLE Names"
    so, the result of this query would be, for example:
    <row>
    ____<name>joge</name>
    </row>
    <row>
    ____<name>pepe</name>
    </row>
    <row>
    ____<name>nicola</name>
    </row>
    See this link
    http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Feb 8, 2008 8:40 AM
    Edited by: Rodrigo Pertierra on Feb 8, 2008 8:42 AM

  • Error in parsing: SAX2 driver class com.sun.xml.parser not found

    Hi I have this exception
    Error in parsing: SAX2 driver class com.sun.xml.parser not found
    when I try to run the examples from the book xml and java
    I have added the following jar files to the class path that i have download form java.sun.com
    xml.jar
    xalan.jar
    jaxp.jar
    crimson.jar
    Please can anyone tell me what is missing or wrong..the code must be right since written by oreilly... please have u any ideA
    XMLReaderFactory.createXMLReader(
    // "org.apache.xerces.parsers.SAXParser");
                        "com.sun.xml.parser");//
    I HAVE ONLY CHANGED THIS LINE FROM THE apache parser..to com.sun.xml.parser
    THIS IS THE ALL CODE
    import java.io.IOException;
    import org.xml.sax.Attributes;
    import org.xml.sax.ContentHandler;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.Locator;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.XMLReader;
    import org.xml.sax.helpers.XMLReaderFactory;
    import org.xml.sax.*;
    * <b><code>SAXParserDemo</code></b> will take an XML file and parse it using SAX,
    * displaying the callbacks in the parsing lifecycle.
    * @author Brett McLaughlin
    * @version 1.0
    public class SAXParserDemo {
    * <p>
    * This parses the file, using registered SAX handlers, and output
    * the events in the parsing process cycle.
    * </p>
    * @param uri <code>String</code> URI of file to parse.
    public void performDemo(String uri) {
    System.out.println("Parsing XML File: " + uri + "\n\n");
    // Get instances of our handlers
    ContentHandler contentHandler = new MyContentHandler();
    ErrorHandler errorHandler = new MyErrorHandler();
    try {
    // Instantiate a parser
    XMLReader parser =
    XMLReaderFactory.createXMLReader(
    // "org.apache.xerces.parsers.SAXParser");
                        "com.sun.xml.parser");// I HAVE ONLY CHANGED THIS LINE FROM THE apache parser..
    // Register the content handler
    parser.setContentHandler(contentHandler);
    // Register the error handler
    parser.setErrorHandler(errorHandler);
    // Parse the document
    parser.parse(uri);
    } catch (IOException e) {
    System.out.println("Error reading URI: " + e.getMessage());
    } catch (SAXException e) {
    System.out.println("Error in parsing: " + e.getMessage());
    * <p>
    * This provides a command line entry point for this demo.
    * </p>
    public static void main(String[] args) {
    // if (args.length != 1) {
    // System.out.println("Usage: java SAXParserDemo [XML URI]");
    // System.exit(0);
    //String uri = args[0];
    SAXParserDemo parserDemo = new SAXParserDemo();
    parserDemo.performDemo("content.xml");
    * <b><code>MyContentHandler</code></b> implements the SAX
    * <code>ContentHandler</code> interface and defines callback
    * behavior for the SAX callbacks associated with an XML
    * document's content.
    class MyContentHandler implements ContentHandler {
    /** Hold onto the locator for location information */
    private Locator locator;
    * <p>
    * Provide reference to <code>Locator</code> which provides
    * information about where in a document callbacks occur.
    * </p>
    * @param locator <code>Locator</code> object tied to callback
    * process
    public void setDocumentLocator(Locator locator) {
    System.out.println(" * setDocumentLocator() called");
    // We save this for later use if desired.
    this.locator = locator;
    * <p>
    * This indicates the start of a Document parse - this precedes
    * all callbacks in all SAX Handlers with the sole exception
    * of <code>{@link #setDocumentLocator}</code>.
    * </p>
    * @throws <code>SAXException</code> when things go wrong
    public void startDocument() throws SAXException {
    System.out.println("Parsing begins...");
    * <p>
    * This indicates the end of a Document parse - this occurs after
    * all callbacks in all SAX Handlers.</code>.
    * </p>
    * @throws <code>SAXException</code> when things go wrong
    public void endDocument() throws SAXException {
    System.out.println("...Parsing ends.");
    * <p>
    * This will indicate that a processing instruction (other than
    * the XML declaration) has been encountered.
    * </p>
    * @param target <code>String</code> target of PI
    * @param data <code>String</code containing all data sent to the PI.
    * This typically looks like one or more attribute value
    * pairs.
    * @throws <code>SAXException</code> when things go wrong
    public void processingInstruction(String target, String data)
    throws SAXException {
    System.out.println("PI: Target:" + target + " and Data:" + data);
    * <p>
    * This will indicate the beginning of an XML Namespace prefix
    * mapping. Although this typically occur within the root element
    * of an XML document, it can occur at any point within the
    * document. Note that a prefix mapping on an element triggers
    * this callback <i>before</i> the callback for the actual element
    * itself (<code>{@link #startElement}</code>) occurs.
    * </p>
    * @param prefix <code>String</code> prefix used for the namespace
    * being reported
    * @param uri <code>String</code> URI for the namespace
    * being reported
    * @throws <code>SAXException</code> when things go wrong
    public void startPrefixMapping(String prefix, String uri) {
    System.out.println("Mapping starts for prefix " + prefix +
    " mapped to URI " + uri);
    * <p>
    * This indicates the end of a prefix mapping, when the namespace
    * reported in a <code>{@link #startPrefixMapping}</code> callback
    * is no longer available.
    * </p>
    * @param prefix <code>String</code> of namespace being reported
    * @throws <code>SAXException</code> when things go wrong
    public void endPrefixMapping(String prefix) {
    System.out.println("Mapping ends for prefix " + prefix);
    * <p>
    * This reports the occurrence of an actual element. It will include
    * the element's attributes, with the exception of XML vocabulary
    * specific attributes, such as
    * <code>xmlns:[namespace prefix]</code> and
    * <code>xsi:schemaLocation</code>.
    * </p>
    * @param namespaceURI <code>String</code> namespace URI this element
    * is associated with, or an empty
    * <code>String</code>
    * @param localName <code>String</code> name of element (with no
    * namespace prefix, if one is present)
    * @param rawName <code>String</code> XML 1.0 version of element name:
    * [namespace prefix]:[localName]
    * @param atts <code>Attributes</code> list for this element
    * @throws <code>SAXException</code> when things go wrong
    public void startElement(String namespaceURI, String localName,
    String rawName, Attributes atts)
    throws SAXException {
    System.out.print("startElement: " + localName);
    if (!namespaceURI.equals("")) {
    System.out.println(" in namespace " + namespaceURI +
    " (" + rawName + ")");
    } else {
    System.out.println(" has no associated namespace");
    for (int i=0; i<atts.getLength(); i++)
    System.out.println(" Attribute: " + atts.getLocalName(i) +
    "=" + atts.getValue(i));
    * <p>
    * Indicates the end of an element
    * (<code></[element name]></code>) is reached. Note that
    * the parser does not distinguish between empty
    * elements and non-empty elements, so this will occur uniformly.
    * </p>
    * @param namespaceURI <code>String</code> URI of namespace this
    * element is associated with
    * @param localName <code>String</code> name of element without prefix
    * @param rawName <code>String</code> name of element in XML 1.0 form
    * @throws <code>SAXException</code> when things go wrong
    public void endElement(String namespaceURI, String localName,
    String rawName)
    throws SAXException {
    System.out.println("endElement: " + localName + "\n");
    * <p>
    * This will report character data (within an element).
    * </p>
    * @param ch <code>char[]</code> character array with character data
    * @param start <code>int</code> index in array where data starts.
    * @param end <code>int</code> index in array where data ends.
    * @throws <code>SAXException</code> when things go wrong
    public void characters(char[] ch, int start, int end)
    throws SAXException {
    String s = new String(ch, start, end);
    System.out.println("characters: " + s);
    * <p>
    * This will report whitespace that can be ignored in the
    * originating document. This is typically only invoked when
    * validation is ocurring in the parsing process.
    * </p>
    * @param ch <code>char[]</code> character array with character data
    * @param start <code>int</code> index in array where data starts.
    * @param end <code>int</code> index in array where data ends.
    * @throws <code>SAXException</code> when things go wrong
    public void ignorableWhitespace(char[] ch, int start, int end)
    throws SAXException {
    String s = new String(ch, start, end);
    System.out.println("ignorableWhitespace: [" + s + "]");
    * <p>
    * This will report an entity that is skipped by the parser. This
    * should only occur for non-validating parsers, and then is still
    * implementation-dependent behavior.
    * </p>
    * @param name <code>String</code> name of entity being skipped
    * @throws <code>SAXException</code> when things go wrong
    public void skippedEntity(String name) throws SAXException {
    System.out.println("Skipping entity " + name);
    * <b><code>MyErrorHandler</code></b> implements the SAX
    * <code>ErrorHandler</code> interface and defines callback
    * behavior for the SAX callbacks associated with an XML
    * document's errors.
    class MyErrorHandler implements ErrorHandler {
    * <p>
    * This will report a warning that has occurred; this indicates
    * that while no XML rules were "broken", something appears
    * to be incorrect or missing.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void warning(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Warning**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Warning encountered");
    * <p>
    * This will report an error that has occurred; this indicates
    * that a rule was broken, typically in validation, but that
    * parsing can reasonably continue.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void error(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Error**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Error encountered");
    * <p>
    * This will report a fatal error that has occurred; this indicates
    * that a rule has been broken that makes continued parsing either
    * impossible or an almost certain waste of time.
    * </p>
    * @param exception <code>SAXParseException</code> that occurred.
    * @throws <code>SAXException</code> when things go wrong
    public void fatalError(SAXParseException exception)
    throws SAXException {
    System.out.println("**Parsing Fatal Error**\n" +
    " Line: " +
    exception.getLineNumber() + "\n" +
    " URI: " +
    exception.getSystemId() + "\n" +
    " Message: " +
    exception.getMessage());
    throw new SAXException("Fatal Error encountered");

    I have seen this error when I'm executing inside one of the (j2ee sun reference implementation) server containers (either web or ejb). I believe its caused by "something" having previously loaded the "sax 1 driver class". In my case, I think the container or server is loading the sax parser from a jar that contains a sax 1 version. If you can, ensure that nothing is loading the sax 1 parser from another jar on your system. Verify that you are loading the sax parser from a jar containing the latest version so that you get the sax 2 compliant parser. Good luck!

  • Error while parsing or executing XML-SQL document attribute "action" missin

    Hi All,
          I am doing a scenario for IDOC to JDBC, When I push IDOC from R/3 , IDOC sent to XI System successfully, 
           I have also checked in SXMB_MONI it is showing the successful staus without any errors, and I have also copied the xml structure from main document of payloads and tested the mapping in Integration Designer, and it is showing successfull message.
    here is the xml structure from  payloads of Request Message Mapping ........
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:RTACOGRP_RECEIVER_MT xmlns:ns0="http://prospecta.com/wsorta/cosmas/idoc2jdbc">
    - <COGRP_TMP_PROC action="EXECUTE">
      <IDOCNUMBER isInput="TRUE" type="CHAR">1000001</IDOCNUMBER>
      <E1COGH_NUMBER isInput="TRUE" type="CHAR">1</E1COGH_NUMBER>
      <E1COGH_HIGHERSEGMENT isInput="TRUE" type="CHAR">1</E1COGH_HIGHERSEGMENT>
      <E1COGH_MSGFN isInput="TRUE" type="CHAR">1</E1COGH_MSGFN>
      <E1COGH_GROUPTYPE isInput="TRUE" type="CHAR">1</E1COGH_GROUPTYPE>
      <E1COGH_GROUPNAME isInput="TRUE" type="CHAR">1</E1COGH_GROUPNAME>
      <E1COGH_KOKRS isInput="TRUE" type="CHAR">1</E1COGH_KOKRS>
      <E1COGHT_NUMBER isInput="TRUE" type="CHAR">1</E1COGHT_NUMBER>
      <E1COGHT_HIGHERSEGMENT isInput="TRUE" type="CHAR">2</E1COGHT_HIGHERSEGMENT>
      <E1COGHT_LANGU isInput="TRUE" type="CHAR">2</E1COGHT_LANGU>
      <E1COGHT_DESCRIPT isInput="TRUE" type="CHAR">2</E1COGHT_DESCRIPT>
      <E1COGHT_LANGU_ISO isInput="TRUE" type="CHAR">2</E1COGHT_LANGU_ISO>
      <E1COGV_NUMBER isInput="TRUE" type="CHAR">1</E1COGV_NUMBER>
      <E1COGV_HIGHERSEGMENT isInput="TRUE" type="CHAR">3</E1COGV_HIGHERSEGMENT>
      <E1COGV_FROMVALUE isInput="TRUE" type="CHAR">6</E1COGV_FROMVALUE>
      <E1COGV_TOVALUE isInput="TRUE" type="CHAR">6</E1COGV_TOVALUE>
      <E1COGS_NUMBER isInput="TRUE" type="CHAR">1</E1COGS_NUMBER>
      <E1COGS_HIGHERSEGMENT isInput="TRUE" type="CHAR">5</E1COGS_HIGHERSEGMENT>
      <E1COGS_SUBGROUP isInput="TRUE" type="CHAR">4</E1COGS_SUBGROUP>
      <E1COGHR_NUMBER isInput="TRUE" type="CHAR">1</E1COGHR_NUMBER>
      <E1COGHR_HIGHERSEGMENT isInput="TRUE" type="CHAR">6</E1COGHR_HIGHERSEGMENT>
      <E1COGHR_SNAME isInput="TRUE" type="CHAR">3</E1COGHR_SNAME>
      <E1COGHR_PRTCLASS isInput="TRUE" type="CHAR">3</E1COGHR_PRTCLASS>
      <E1COGHR_AUTHGR isInput="TRUE" type="CHAR">3</E1COGHR_AUTHGR>
      <E1COGSR_NUMBER isInput="TRUE" type="CHAR">1</E1COGSR_NUMBER>
      <E1COGSR_HIGHERSEGMENT isInput="TRUE" type="CHAR">7</E1COGSR_HIGHERSEGMENT>
      <E1COGSR_XSUPPRESS isInput="TRUE" type="CHAR">5</E1COGSR_XSUPPRESS>
      <E1COGSR_PRTCLASS isInput="TRUE" type="CHAR">5</E1COGSR_PRTCLASS>
      <E1COGSR_LNAME isInput="TRUE" type="CHAR">5</E1COGSR_LNAME>
      <E1COGVT_NUMBER isInput="TRUE" type="CHAR">1</E1COGVT_NUMBER>
      <E1COGVT_HIGHERSEGMENT isInput="TRUE" type="CHAR">9</E1COGVT_HIGHERSEGMENT>
      <E1COGVT_LANGU isInput="TRUE" type="CHAR">7</E1COGVT_LANGU>
      <E1COGVT_DESCRIPT isInput="TRUE" type="CHAR">7</E1COGVT_DESCRIPT>
      <E1COGVT_LANGU_ISO isInput="TRUE" type="CHAR">7</E1COGVT_LANGU_ISO>
      <E1COGVR_NUMBER isInput="TRUE" type="CHAR">1</E1COGVR_NUMBER>
      <E1COGVR_HIGHERSEGMENT isInput="TRUE" type="CHAR">12</E1COGVR_HIGHERSEGMENT>
      <E1COGVR_XSUPPRESS isInput="TRUE" type="CHAR">8</E1COGVR_XSUPPRESS>
      <E1COGVR_PRTCLASS isInput="TRUE" type="CHAR">8</E1COGVR_PRTCLASS>
      <E1COGVR_LNAME isInput="TRUE" type="CHAR">8</E1COGVR_LNAME>
      </COGRP_TMP_PROC>
      </ns0:RTACOGRP_RECEIVER_MT>
    When I checked for component monitoring in runtime workbench....
    these are the messages........
    <i>Error while parsing or executing XML-SQL document: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)</i>
    Here are the messages from message monitoring ......
    2007-06-07 12:42:17 Success Receiver JDBC adapter: processing started; QoS required: ExactlyOnce
    2007-06-07 12:42:17 Success JDBC adapter receiver channel RTACOGRP_COM_Chan: processing started; party  , service WSORTABS
    2007-06-07 12:42:17 Error No "action" attribute found in XML document ("action" attribute missing or wrong XML structure)
    2007-06-07 12:42:17 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    2007-06-07 12:42:17 Error Exception caught by adapter framework: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)
    2007-06-07 12:42:17 Error Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure).
    2007-06-07 12:42:17 Error The message status set to NDLV.
    Can any body please resolve the problem.....
    Thanks in Advance
    Murthy

    Bhavesh,
    Now I have changed the data structure , and the resultant structure is like this...
      <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:RTACOGRP_RECEIVER_MT xmlns:ns0="http://prospecta.com/wsorta/cosmas/idoc2jdbc">
    - <Statement>
    - <COGRP_TMP_PROC action="EXECUTE">
      <IDOCNUMBER isInput="TRUE" type="CHAR">100002223</IDOCNUMBER>
      <E1COGH_NUMBER isInput="TRUE" type="CHAR">1</E1COGH_NUMBER>
      <E1COGH_HIGHERSEGMENT isInput="TRUE" type="CHAR">1</E1COGH_HIGHERSEGMENT>
      <E1COGH_MSGFN isInput="TRUE" type="CHAR">H</E1COGH_MSGFN>
      <E1COGH_GROUPTYPE isInput="TRUE" type="CHAR">H</E1COGH_GROUPTYPE>
      <E1COGH_GROUPNAME isInput="TRUE" type="CHAR">H</E1COGH_GROUPNAME>
      <E1COGH_KOKRS isInput="TRUE" type="CHAR">H</E1COGH_KOKRS>
      <E1COGHT_NUMBER isInput="TRUE" type="CHAR">1</E1COGHT_NUMBER>
      <E1COGHT_HIGHERSEGMENT isInput="TRUE" type="CHAR">2</E1COGHT_HIGHERSEGMENT>
      <E1COGHT_LANGU isInput="TRUE" type="CHAR">T</E1COGHT_LANGU>
      <E1COGHT_DESCRIPT isInput="TRUE" type="CHAR">T</E1COGHT_DESCRIPT>
      <E1COGHT_LANGU_ISO isInput="TRUE" type="CHAR">T</E1COGHT_LANGU_ISO>
      <E1COGV_NUMBER isInput="TRUE" type="CHAR">1</E1COGV_NUMBER>
      <E1COGV_HIGHERSEGMENT isInput="TRUE" type="CHAR">3</E1COGV_HIGHERSEGMENT>
      <E1COGV_FROMVALUE isInput="TRUE" type="CHAR">V</E1COGV_FROMVALUE>
      <E1COGV_TOVALUE isInput="TRUE" type="CHAR">V</E1COGV_TOVALUE>
      <E1COGS_NUMBER isInput="TRUE" type="CHAR">1</E1COGS_NUMBER>
      <E1COGS_HIGHERSEGMENT isInput="TRUE" type="CHAR">5</E1COGS_HIGHERSEGMENT>
      <E1COGS_SUBGROUP isInput="TRUE" type="CHAR">S</E1COGS_SUBGROUP>
      <E1COGHR_NUMBER isInput="TRUE" type="CHAR">1</E1COGHR_NUMBER>
      <E1COGHR_HIGHERSEGMENT isInput="TRUE" type="CHAR">7</E1COGHR_HIGHERSEGMENT>
      <E1COGHR_SNAME isInput="TRUE" type="CHAR">R</E1COGHR_SNAME>
      <E1COGHR_PRTCLASS isInput="TRUE" type="CHAR">R</E1COGHR_PRTCLASS>
      <E1COGHR_AUTHGR isInput="TRUE" type="CHAR">R</E1COGHR_AUTHGR>
      <E1COGSR_NUMBER isInput="TRUE" type="CHAR">1</E1COGSR_NUMBER>
      <E1COGSR_HIGHERSEGMENT isInput="TRUE" type="CHAR">8</E1COGSR_HIGHERSEGMENT>
      <E1COGSR_XSUPPRESS isInput="TRUE" type="CHAR">S</E1COGSR_XSUPPRESS>
      <E1COGSR_PRTCLASS isInput="TRUE" type="CHAR">S</E1COGSR_PRTCLASS>
      <E1COGSR_LNAME isInput="TRUE" type="CHAR">S</E1COGSR_LNAME>
      <E1COGVT_NUMBER isInput="TRUE" type="CHAR">1</E1COGVT_NUMBER>
      <E1COGVT_HIGHERSEGMENT isInput="TRUE" type="CHAR">10</E1COGVT_HIGHERSEGMENT>
      <E1COGVT_LANGU isInput="TRUE" type="CHAR">T</E1COGVT_LANGU>
      <E1COGVT_DESCRIPT isInput="TRUE" type="CHAR">T</E1COGVT_DESCRIPT>
      <E1COGVT_LANGU_ISO isInput="TRUE" type="CHAR">T</E1COGVT_LANGU_ISO>
      <E1COGVR_NUMBER isInput="TRUE" type="CHAR">1</E1COGVR_NUMBER>
      <E1COGVR_HIGHERSEGMENT isInput="TRUE" type="CHAR">11</E1COGVR_HIGHERSEGMENT>
      <E1COGVR_XSUPPRESS isInput="TRUE" type="CHAR">E</E1COGVR_XSUPPRESS>
      <E1COGVR_PRTCLASS isInput="TRUE" type="CHAR">E</E1COGVR_PRTCLASS>
      <E1COGVR_LNAME isInput="TRUE" type="CHAR">E</E1COGVR_LNAME>
      </COGRP_TMP_PROC>
      </Statement>
      </ns0:RTACOGRP_RECEIVER_MT>
    Now in message monitoring error is showing like this...
    <i>Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC' (structure 'Statement'): java.sql.SQLException: General error</i>
    Now in Component Monitoring error is showing like this....
    <i>Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC' (structure 'Statement'): java.sql.SQLException: General error</i>
    I have tested the stored procedure in sql by giving the same values , it was successfully executed..
    Can you please tell me where is the error still in structure ...
    Thanks in Advance,
    Murthy.

  • Org.xml.sax.SAXParseException: com.sun.xml.parser/P-067

    this is an error I get, i tried everything to solve it, please help
    org.xml.sax.SAXParseException: com.sun.xml.parser/P-067
    at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
    at com.sun.xml.parser.Parser.fatal(Parser.java:2805)
    at com.sun.xml.parser.Parser.parseInternal(Parser.java:493)
    at com.sun.xml.parser.Parser.parse(Parser.java:284)
    at ParseXML.readFile(ParseXML.java:56)
    at ParseXML.getXMLData(ParseXML.java:40)

    Googling I get this....
    P-067 = Document root element is missing.

  • Org.xml.sax.SAXException: Error:General Schema Error

    I am getting the error below. Any clues/workarounds? I am
    using WL 6.1.
    Thanks in advance,
    Eva
    The following files are below:
    Validate.java
    BMDefaultHandler.java
    validate.xml
    validate.xsd
    org.xml.sax.SAXException: Error:General Schema Error: Grammar with uri:http://schemas.xmlsoap.org/soap/envelope/
    , can not be
    found; schema namespace maybe wrong:
    Xerces supports schemas from the "http://www.w3.org/2001/XMLSchema" namespace
    or
    the instance document's namespace may not match the targetNamespace of the schema.
    at
    com.bluemartini.xml.BMDefaultHandler.error(BMDefaultHandler.java:32)
    at
    org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1249)
    at
    org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1821)
    at
    org.apache.xerces.validators.common.XMLValidator.validateElementAndAttr
    ibutes(XMLValidator.java:3232)
    at
    org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
    lidator.java:1229)
    at
    org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS
    canner.java:1806)
    at
    org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(XMLDocumentScanner.java:949)
    at
    org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
    nner.java:381)
    at
    org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja
    va:195)
    at
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:191)
    at com.bluemartini.test.Validate.main(Validate.java:32)
    ===Validate.java
    package com.bluemartini.test;
    import java.io.*;
    import org.w3c.dom.*;
    import com.bluemartini.xml.*;
    // JAXP imports
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.ParserConfigurationException;
    * Sample test case.
    * Eva Flora
    public class Validate {
    public static void main(String[] argv) {
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    factory.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE);
    factory.setAttribute("http://apache.org/xml/features/validation/schema",
    Boolean.TRUE);
    DocumentBuilder builder = factory.newDocumentBuilder();
    BMDefaultHandler bmErrorHandler = new BMDefaultHandler();
    builder.setErrorHandler(bmErrorHandler);
    File temp = new File("validate.xml");
    Document doc = builder.parse(temp);
    } catch (Exception e) {
    e.printStackTrace();
    ===BMDefaultHandler.java
    package com.bluemartini.xml;
    import com.bluemartini.dna.*;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.*;
    public class BMDefaultHandler extends
    DefaultHandler
    public BMDefaultHandler()
    public void warning(SAXParseException spe)
    throws SAXException
    System.out.println("Warning: " + spe.getMessage());
    public void error(SAXParseException spe)
    throws SAXException
    throw new SAXException("Error:" + spe.getMessage());
    public void fatalError(SAXParseException spe)
    throws SAXException
    throw new SAXException("Fatal Error: " + spe.getMessage());
    ===validate.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <soapns:Envelope xmlns:soapns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:test="http://www.test.com"
    xsi:noNamespaceSchemaLocation="validate.xsd">
         <soapns:Header/>
         <soapns:Body>
    <test:GWSMapRequestMessage>
              </test:GWSMapRequestMessage>
         </soapns:Body>
    </soapns:Envelope>
    ===validate.xsd
    <schema xmlns="http://www.w3.org/2000/10/XMLSchema">
    <element name="GWSMapRequestMessage" type="TestType"/>
    <complexType name="TestType">
    </complexType>
    </schema>

    I am getting the error below. Any clues/workarounds? I am
    using WL 6.1.
    Thanks in advance,
    Eva
    The following files are below:
    Validate.java
    BMDefaultHandler.java
    validate.xml
    validate.xsd
    org.xml.sax.SAXException: Error:General Schema Error: Grammar with uri:http://schemas.xmlsoap.org/soap/envelope/
    , can not be
    found; schema namespace maybe wrong:
    Xerces supports schemas from the "http://www.w3.org/2001/XMLSchema" namespace
    or
    the instance document's namespace may not match the targetNamespace of the schema.
    at
    com.bluemartini.xml.BMDefaultHandler.error(BMDefaultHandler.java:32)
    at
    org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1249)
    at
    org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1821)
    at
    org.apache.xerces.validators.common.XMLValidator.validateElementAndAttr
    ibutes(XMLValidator.java:3232)
    at
    org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
    lidator.java:1229)
    at
    org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS
    canner.java:1806)
    at
    org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(XMLDocumentScanner.java:949)
    at
    org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
    nner.java:381)
    at
    org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja
    va:195)
    at
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:191)
    at com.bluemartini.test.Validate.main(Validate.java:32)
    ===Validate.java
    package com.bluemartini.test;
    import java.io.*;
    import org.w3c.dom.*;
    import com.bluemartini.xml.*;
    // JAXP imports
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.ParserConfigurationException;
    * Sample test case.
    * Eva Flora
    public class Validate {
    public static void main(String[] argv) {
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    factory.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE);
    factory.setAttribute("http://apache.org/xml/features/validation/schema",
    Boolean.TRUE);
    DocumentBuilder builder = factory.newDocumentBuilder();
    BMDefaultHandler bmErrorHandler = new BMDefaultHandler();
    builder.setErrorHandler(bmErrorHandler);
    File temp = new File("validate.xml");
    Document doc = builder.parse(temp);
    } catch (Exception e) {
    e.printStackTrace();
    ===BMDefaultHandler.java
    package com.bluemartini.xml;
    import com.bluemartini.dna.*;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.*;
    public class BMDefaultHandler extends
    DefaultHandler
    public BMDefaultHandler()
    public void warning(SAXParseException spe)
    throws SAXException
    System.out.println("Warning: " + spe.getMessage());
    public void error(SAXParseException spe)
    throws SAXException
    throw new SAXException("Error:" + spe.getMessage());
    public void fatalError(SAXParseException spe)
    throws SAXException
    throw new SAXException("Fatal Error: " + spe.getMessage());
    ===validate.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <soapns:Envelope xmlns:soapns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:test="http://www.test.com"
    xsi:noNamespaceSchemaLocation="validate.xsd">
         <soapns:Header/>
         <soapns:Body>
    <test:GWSMapRequestMessage>
              </test:GWSMapRequestMessage>
         </soapns:Body>
    </soapns:Envelope>
    ===validate.xsd
    <schema xmlns="http://www.w3.org/2000/10/XMLSchema">
    <element name="GWSMapRequestMessage" type="TestType"/>
    <complexType name="TestType">
    </complexType>
    </schema>

  • Org.xml.sax.SAXException: Error:General Schema Error: Grammar

    I am getting the error below. Any clues/workarounds? I am
    using WL 6.1.
    Thanks in advance,
    Eva
    The following files are below:
    Validate.java
    BMDefaultHandler.java
    validate.xml
    validate.xsd
    org.xml.sax.SAXException: Error:General Schema Error: Grammar with uri:http://schemas.xmlsoap.org/soap/envelope/
    , can not be
    found; schema namespace maybe wrong:
    Xerces supports schemas from the "http://www.w3.org/2001/XMLSchema" namespace
    or
    the instance document's namespace may not match the targetNamespace of the schema.
    at
    com.bluemartini.xml.BMDefaultHandler.error(BMDefaultHandler.java:32)
    at
    org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1249)
    at
    org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1821)
    at
    org.apache.xerces.validators.common.XMLValidator.validateElementAndAttr
    ibutes(XMLValidator.java:3232)
    at
    org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
    lidator.java:1229)
    at
    org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS
    canner.java:1806)
    at
    org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(XMLDocumentScanner.java:949)
    at
    org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
    nner.java:381)
    at
    org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja
    va:195)
    at
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:191)
    at com.bluemartini.test.Validate.main(Validate.java:32)
    ===Validate.java
    package com.bluemartini.test;
    import java.io.*;
    import org.w3c.dom.*;
    import com.bluemartini.xml.*;
    // JAXP imports
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.ParserConfigurationException;
    * Sample test case.
    * Eva Flora
    public class Validate {
    public static void main(String[] argv) {
    try {
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    factory.setAttribute("http://xml.org/sax/features/validation", Boolean.TRUE);
    factory.setAttribute("http://apache.org/xml/features/validation/schema",
    Boolean.TRUE);
    DocumentBuilder builder = factory.newDocumentBuilder();
    BMDefaultHandler bmErrorHandler = new BMDefaultHandler();
    builder.setErrorHandler(bmErrorHandler);
    File temp = new File("validate.xml");
    Document doc = builder.parse(temp);
    } catch (Exception e) {
    e.printStackTrace();
    ===BMDefaultHandler.java
    package com.bluemartini.xml;
    import com.bluemartini.dna.*;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.*;
    public class BMDefaultHandler extends
    DefaultHandler
    public BMDefaultHandler()
    public void warning(SAXParseException spe)
    throws SAXException
    System.out.println("Warning: " + spe.getMessage());
    public void error(SAXParseException spe)
    throws SAXException
    throw new SAXException("Error:" + spe.getMessage());
    public void fatalError(SAXParseException spe)
    throws SAXException
    throw new SAXException("Fatal Error: " + spe.getMessage());
    ===validate.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <soapns:Envelope xmlns:soapns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema" xmlns:test="http://www.test.com"
    xsi:noNamespaceSchemaLocation="validate.xsd">
         <soapns:Header/>
         <soapns:Body>
    <test:GWSMapRequestMessage>
              </test:GWSMapRequestMessage>
         </soapns:Body>
    </soapns:Envelope>
    ===validate.xsd
    <schema xmlns="http://www.w3.org/2000/10/XMLSchema">
    <element name="GWSMapRequestMessage" type="TestType"/>
    <complexType name="TestType">
    </complexType>
    </schema>

    I guess the problem is due to the schema namespace
    you are using.
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
    pls try with :
    "http://www.w3.org/2001/XMLSchema"
    regards,
    -manoj
    "Eva Flora" <[email protected]> wrote in message
    news:[email protected]...
    I am getting the error below. Any clues/workarounds? I am
    using WL 6.1.
    Thanks in advance,
    Eva
    The following files are below:
    Validate.java
    BMDefaultHandler.java
    validate.xml
    validate.xsd
    org.xml.sax.SAXException: Error:General Schema Error: Grammar with
    uri:http://schemas.xmlsoap.org/soap/envelope/
    , can not be
    found; schema namespace maybe wrong:
    Xerces supports schemas from the "http://www.w3.org/2001/XMLSchema"
    namespace
    or
    the instance document's namespace may not match the targetNamespace of the
    schema.
    at
    com.bluemartini.xml.BMDefaultHandler.error(BMDefaultHandler.java:32)
    at
    org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1249)
    at
    org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLEr
    ror(XMLValidator.java:1821)
    at
    org.apache.xerces.validators.common.XMLValidator.validateElementAndAttr
    ibutes(XMLValidator.java:3232)
    at
    org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVa
    lidator.java:1229)
    at
    org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentS
    canner.java:1806)
    at
    org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispat
    ch(XMLDocumentScanner.java:949)
    at
    org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentSca
    nner.java:381)
    at
    org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
    at
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja
    va:195)
    at
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:191)
    at com.bluemartini.test.Validate.main(Validate.java:32)
    ===Validate.java
    package com.bluemartini.test;
    import java.io.*;
    import org.w3c.dom.*;
    import com.bluemartini.xml.*;
    // JAXP imports
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.ParserConfigurationException;
    * Sample test case.
    * Eva Flora
    public class Validate {
    public static void main(String[] argv) {
    try {
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setValidating(true);
    factory.setAttribute("http://xml.org/sax/features/validation",
    Boolean.TRUE);
    factory.setAttribute("http://apache.org/xml/features/validation/schema",
    Boolean.TRUE);
    DocumentBuilder builder = factory.newDocumentBuilder();
    BMDefaultHandler bmErrorHandler = new BMDefaultHandler();
    builder.setErrorHandler(bmErrorHandler);
    File temp = new File("validate.xml");
    Document doc = builder.parse(temp);
    } catch (Exception e) {
    e.printStackTrace();
    ===BMDefaultHandler.java
    package com.bluemartini.xml;
    import com.bluemartini.dna.*;
    import org.xml.sax.helpers.DefaultHandler;
    import org.xml.sax.*;
    public class BMDefaultHandler extends
    DefaultHandler
    public BMDefaultHandler()
    public void warning(SAXParseException spe)
    throws SAXException
    System.out.println("Warning: " + spe.getMessage());
    public void error(SAXParseException spe)
    throws SAXException
    throw new SAXException("Error:" + spe.getMessage());
    public void fatalError(SAXParseException spe)
    throws SAXException
    throw new SAXException("Fatal Error: " + spe.getMessage());
    ===validate.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <soapns:Envelope xmlns:soapns="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
    xmlns:test="http://www.test.com"
    xsi:noNamespaceSchemaLocation="validate.xsd">
    <soapns:Header/>
    <soapns:Body>
    <test:GWSMapRequestMessage>
    </test:GWSMapRequestMessage>
    </soapns:Body>
    </soapns:Envelope>
    ===validate.xsd
    <schema xmlns="http://www.w3.org/2000/10/XMLSchema">
    <element name="GWSMapRequestMessage" type="TestType"/>
    <complexType name="TestType">
    </complexType>
    </schema>
    [att1.html]

  • Org.xml.sax.SAXParseException: Line 1, Column 1 : XML-0108: (Fatal Error)

    Hi ,
    I am using SAX parser in a java code , which compiles and parses an xml correctly in the local JVM.
    But the same code in OC4J(10g) - version 9.0.4.2 throws the following exception when traced the error stack.
    08/04/04 17:48:40 Loading file workingday.xml from directory ========================== :::java.io.BufferedInputStream@bd4e3c
    08/04/04 17:48:40 Read the xml into instream => STEP II
    08/04/04 17:48:40 Read the xml into instream => STEP II
    08/04/04 17:48:40 adding to the bankholiday list
    org.xml.sax.SAXParseException: <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:226)
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:162)
    08/04/04 17:48:40 at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:305)
    08/04/04 17:48:40 at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:267)
    08/04/04 17:48:40 at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
    08/04/04 17:48:40 at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:286)
    08/04/04 17:48:40 at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:224)
    Though I have imported the following JDK parsers in the code , the Oracle's SAX parser is taking other inside the application server and throwing the above error for an xml , which is absolutely alright.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    Please let me know why this happens? Is it a known bug in the OC4J 9.0.4.2?
    Thanks and Regards
    Antara

    hi Antara
    about "... Though I have imported the following JDK parsers in the code , the Oracle's SAX parser is taking other inside the application server ..."
    If you have used the SAXParserFactory.newSAXParser() method to get a parser, the documentation for this method says "Creates a new instance of a SAXParser using the currently configured factory parameters.".
    So you might get a different parser in a different environment.
    regards
    Jan Vervecken

  • XML parsing -  org.xml.sax.driver not specified

    I am attempmtping to parse my first XML document and get the following excpetion when running my prog.
    org.xml.sax.SAXException: System property org.xml.sax.driver not specified.
    I am following the examples in the O'Reilly Java and XML book but suspect I am missing something obvious.
    This is the offending line of code:
    XMLReader xr = XMLReaderFactory.createXMLReader();
    Any help will be appreciated.

    You need to set a property for your class that invokes your SAX handler. This is the property you need to set
    org.xml.sax.driver=???
    Where ??? is the name of the package where your SAXparser lives.
    for example, my sax driver is in:
    org.xml.sax.driver=org.apache.xerces.parsers.SAXParser
    (see code below)
    Also, a sweet reference is Elliot Rusty Harold's "XML processing with Java", which answered all the practical questions I had -- really! And is free, online.
    http://www.ibiblio.org/xml/books/xmljava/chapters/index.html
    This is the code for main() where my xml handler is invoked
    try
    {  SpiderHandler spiderHandler = new SpiderHandler(testSpider);
       XMLReader reader = XMLReaderFactory.createXMLReader();
       reader.setContentHandler(spiderHandler);
       for (int i=4; i<args.length; i++)
       {   FileReader xmlScript = new FileReader(args);
    System.out.println("Input file number "+i+" named "+args[i]);
    // org.xml.sax.XMLReader.parse(InputSource) interface
    // see org.xml.sax.InputSource class      
    reader.parse(new InputSource(xmlScript));
    catch(Exception e)
    {   System.out.println("Error encountered in parsing from main(). \n");
    e.printStackTrace();
    Luck to you! XML is a joy.

  • "character conversion error" while parsing xml files

    Hello,
    I'm trying to parse MusicXML (Recordare) files, but I'm getting an exception.
    I'm using the SAX parser (javax.xml.parsers.SAXParser).
    Here is the code I use to instantiate it:
    final javax.xml.parsers.SAXParserFactory saxParserFactory = javax.xml.parsers.SAXParserFactory.newInstance();
    final javax.xml.parsers.SAXParser saxParser = saxParserFactory.newSAXParser();
    final org.xml.sax.XMLReader parser = saxParser.getXMLReader();
    I'm using my own handler, but I get the same exception even if I use org.xml.sax.helpers.DefaultHandler.
    The error I get is:
    Character conversion error: "Illegal ASCII character, 0xc2" (line number may be too low).
    The first few lines of my xml files look like this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE score-partwise
    PUBLIC "-//Recordare//DTD MusicXML 0.6 Partwise//EN"
    "http://www.musicxml.org/dtds/partwise.dtd">
    <score-partwise>
    [...etc...]
    If I delete the <!DOCTYPE ...> line, then I don't get the exception anymore. But the MusicXML files I get (from some other program) always contain this line, and it would be quite some work to delete them from every file manually.
    So does anyone know if there is a way to avoid deleting that line in every file, while still being able to parse the xml files without exceptions?
    Or maybe does anyone know what the exact cause of the exception is? (because I don't know what exactly causes it)
    Thank you in advance.
    Greetz,
    Jipo

    So does anyone know if there is a way to avoid
    deleting that line in every file, while still being
    able to parse the xml files without exceptions?ok this is side-stepping the real problem but I've used this code to filterout DTD references for other reasons   public static InputStream filterOutDTDRef(InputStream in) throws IOException {
          BufferedReader iniReader = new BufferedReader(new InputStreamReader(in));
          StringBuffer newXML = new StringBuffer();
          for(String line = iniReader.readLine(); line!=null; line = iniReader.readLine())
             newXML.append(line+"\n");
          in.close();
          int s = newXML.indexOf("<!DOCTYPE ");
          if(s!=-1)
             newXML.replace(s,newXML.indexOf(">",s)+1,"");
          return new ByteArrayInputStream(newXML.toString().getBytes());
       }and it actually speeds up the parsing phase too (since the DTD ref.s were on the web and the XML standard mandates that there is a fetch for each xml file parsed..)
    you can feed the above into the InputSource constructor that takes an InputStream argument.
    Now for the real problem... 0xc2 is "LATIN CAPITAL LETTER A WITH CIRCUMFLEX" according to a unicode chart - which is not an ASCII character (as the error message correctly reports). I'm not sure why the file is being parsed as ASCII though? You could try parsing in a FileReader to the inputsource and hope it picks up the default character encoding of your system, and that that character encoding matches the file. Or you could try passing in a FileReader constructed with a explicit character encoding (eg "UTF8") and see if that does the trick?
    asjf

Maybe you are looking for

  • Officejet Pro 8600 plus: trouble with double sided printing

    I have just installed Officejet Pro 8600 plus. My iMac is running on OS X 10.9.2 I want to print a double sided brochure. And I have succeeded. However, the printing on one side of the paper is upside down. To achieve this: Print <Copies & Pages <Lay

  • 24" iMac (Primo 2009) strange RAM upgrade issue

    I have a 24" iMac (Primo 2009) at work. I been granted a RAM upgrade by the IT department and have received 2 indentical 4 GB modules. The 24" iMac (Primo 2009) uses 1066 MHz DDR3 modules and supports up to 8 GB RAM in 2 slots. I have purchased RAM f

  • Can XML for to Update Fields in PDF be sent to PostScript Form?

    Looking for a VERY hi-speed VERY hi-volume means of printing very large numbers of the Same report, but with different data for 1000s of different users. Thinking that as PDF and Postscript are both Adobe products: a) there may be a high speed means

  • Malcontent describes better tools

    I'm not a happy camper. This stuff could be insanely great, but it isn't quite connected yet. Anyone else feel this way? We've got javadoc. I thought this was great when I saw the Sun docs. Then I wanted to do my own, so I learned how and now I've go

  • Fresher... Need Help

    Hi Group, I am fresher in java working for last 3 months on it. Can anyone let me know any site or book or CD available through which i can increase my knowledge e.g site or book or CD should have questions like Diff. between Abstract and Interface..