Hi,

we had this error under jdk 1.6.0_02 and got around it by putting xerces 2.9.1 in the classpath (instead of using the built-in xerces version)

maybe you have a similar setup!?

/Ole
eviware.com

[EMAIL PROTECTED] wrote:

Hi All,

I get following Exception on parsing my XML file.



_org.apache.xmlbeans.XmlException_: error: Unexpected element: CDATA
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(_Locale.java:3471_)
        at org.apache.xmlbeans.impl.store.Locale.parse(_Locale.java:706_)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(_Locale.java:690_) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(_Locale.java:677_) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(_SchemaTypeLoaderBase.java:208_) at com.tcs.epoch.v100.WITSMAPDocument$Factory.parse(Unknown Source) at org.epoch.witsml.services.WITSMLService.LoadObjectMaps(_WITSMLService.java:69_) at org.epoch.witsml.services.WITSMLService.init(_WITSMLService.java:51_) at org.apache.axis.providers.java.JavaProvider.getNewServiceObject(_JavaProvider.java:238_) at org.apache.axis.providers.java.JavaProvider.getServiceObject(_JavaProvider.java:91_) at org.apache.axis.providers.java.JavaProvider.invoke(_JavaProvider.java:287_) at org.apache.axis.strategies.InvocationStrategy.visit(_InvocationStrategy.java:32_)
        at org.apache.axis.SimpleChain.doVisiting(_SimpleChain.java:118_)
        at org.apache.axis.SimpleChain.invoke(_SimpleChain.java:83_)
at org.apache.axis.handlers.soap.SOAPService.invoke(_SOAPService.java:454_) at org.apache.axis.server.AxisServer.invoke(_AxisServer.java:281_) at org.apache.axis.transport.http.AxisServlet.doPost(_AxisServlet.java:699_)
        at javax.servlet.http.HttpServlet.service(_HttpServlet.java:709_)
at org.apache.axis.transport.http.AxisServletBase.service(_AxisServletBase.java:327_)
        at javax.servlet.http.HttpServlet.service(_HttpServlet.java:802_)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:237_) at org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:157_) at org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:214_) at org.apache.catalina.core.StandardValveContext.invokeNext(_StandardValveContext.java:104_) at org.apache.catalina.core.StandardPipeline.invoke(_StandardPipeline.java:520_) at org.apache.catalina.core.StandardContextValve.invokeInternal(_StandardContextValve.java:198_) at org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:152_) at org.apache.catalina.core.StandardValveContext.invokeNext(_StandardValveContext.java:104_) at org.apache.catalina.core.StandardPipeline.invoke(_StandardPipeline.java:520_) at org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:137_) at org.apache.catalina.core.StandardValveContext.invokeNext(_StandardValveContext.java:104_) at org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:117_) at org.apache.catalina.core.StandardValveContext.invokeNext(_StandardValveContext.java:102_) at org.apache.catalina.core.StandardPipeline.invoke(_StandardPipeline.java:520_) at org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:109_) at org.apache.catalina.core.StandardValveContext.invokeNext(_StandardValveContext.java:104_) at org.apache.catalina.core.StandardPipeline.invoke(_StandardPipeline.java:520_) at org.apache.catalina.core.ContainerBase.invoke(_ContainerBase.java:929_) at org.apache.coyote.tomcat5.CoyoteAdapter.service(_CoyoteAdapter.java:160_) at org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:799_) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(_Http11Protocol.java:705_) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(_PoolTcpEndpoint.java:577_) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(_ThreadPool.java:683_)
        at java.lang.Thread.run(Unknown Source)
Caused by: _org.xml.sax.SAXParseException_: Unexpected element: CDATA
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(_Piccolo.java:1038_) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(_Piccolo.java:723_) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(_Locale.java:3439_)



My XSD is as below.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:ets="http://www.tcs.com/epoch/v100";
        xmlns:xsd="http://www.w3.org/2001/XMLSchema";
        targetNamespace="http://www.tcs.com/epoch/v100";
        elementFormDefault="qualified" attributeFormDefault="unqualified"
        version="1.0.0">
        <!-- XML Schema for WITSML OBject Mapping file -->
        <xsd:element name="WITSMAP">
                <xsd:annotation>
                        <xsd:documentation>
WITSML Object-Implementation class mapping
                        </xsd:documentation>
                </xsd:annotation>
                <xsd:complexType>
                        <xsd:sequence>
                                <xsd:element name="GetFromStore">
                                        <xsd:annotation>
                                                <xsd:documentation>
Mapping For all Get FromStore Implementation
                                                </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:complexType>
                                                <xsd:sequence>
<xsd:element name="ObjectGetFS" maxOccurs="unbounded"> <xsd:annotation> <xsd:documentation> Object Mapping for GetFromStore Implementation </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="ObjName" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> Name of WITSML Object </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="Class" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> Class Implement this object for Get From Store Interfaces </xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType>
                                                        </xsd:element>
                                                </xsd:sequence>
                                        </xsd:complexType>
                                </xsd:element>
                                <xsd:element name="AddToStore">
                                        <xsd:annotation>
                                                <xsd:documentation>
Mapping For all Get FromStro Implementation
                                                </xsd:documentation>
                                        </xsd:annotation>
                                        <xsd:complexType>
                                                <xsd:sequence>
<xsd:element name="ObjectAddTS" maxOccurs="unbounded" minOccurs="0"> <xsd:annotation> <xsd:documentation> Object Mapping for GetFromStore Implementation </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:attribute name="ObjName" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> Name of WITSML Object </xsd:documentation> </xsd:annotation> </xsd:attribute> <xsd:attribute name="Class" type="xsd:string" use="required"> <xsd:annotation> <xsd:documentation> Class Implement this object for Get From Store Interfaces </xsd:documentation> </xsd:annotation> </xsd:attribute> </xsd:complexType>
                                                        </xsd:element>
                                                </xsd:sequence>
                                        </xsd:complexType>
                                </xsd:element>
                        </xsd:sequence>
                </xsd:complexType>
        </xsd:element>
</xsd:schema>



While my Parsing XML is like this

<?xml version="1.0" encoding="UTF-8" ?>
<WITSMAP xmlns="http://www.tcs.com/epoch/v100";>
        <GetFromStore>
                <ObjectGetFS  ObjName="Well" Class="" />
        </GetFromStore>
        <AddToStore>
                <!-- ObjectAddTS   ObjName="" Class="" /-->
        </AddToStore>
</WITSMAP>


I can not figure out why I am geting this exception.


Deepak Jerambhai Pansheriya
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com
____________________________________________
Experience certainty.        IT Services
                       Business Solutions
                       Outsourcing
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to