commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertburrelldon...@blueyonder.co.uk>
Subject Re: [betwixt] ClassCastException
Date Thu, 11 Nov 2004 21:27:37 GMT
i think that this is a know bug with the latest release. please update  
to CVS HEAD (or a recent nightly) and retry.

- robert

On 11 Nov 2004, at 18:37, Valeri Gavrilovets wrote:

> Hi everyone,
> i have some problem by parsing of such xml:
> --------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <Order xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>   xsi:noNamespaceSchemaLocation='tibco_order.xsd'>
>   <Request>
>     <ISIN>DE0005140008</ISIN>
>     <ProductType>2</ProductType>
>     <Amount>200</Amount>
>     <OrderId>1234</OrderId>
>     <OrderType>BUY</OrderType>
>     <ChannelId>1</ChannelId>
>     <SalesId>0123456789</SalesId>
>   </Request>
> </Order>
> ----------------------
>
> The class Order:
> ----------------------
> public class Order {
>    private Request  request;
>    private Price    price;
>    private Response response;
>    private String   errorCode;
>    private String   errorText;
> ...
> }
> ------------------
> public class Request {
>    private String     ISIN;
>    private Integer    productType;
>    private BigDecimal amount;
>    private String     orderId;
>    private String     orderType;
>    private Integer    channelId;
>    private String     salesId;
> ...
> }
> ----------------------
> configuration:
> -------------------
>          IntrospectionConfiguration config =  
> _beanReader.getXMLIntrospector().getConfiguration();
>          config.setElementNameMapper(new CapitalizeNameMapper());
>
>          // register bean classes
>          _beanReader.registerBeanClass(Order.class);
>          _beanReader.registerBeanClass(Request.class);
>          _beanReader.registerBeanClass(Price.class);
>          _beanReader.registerBeanClass(Response.class);
> ------------------
>
> I get this exception and i have no clue what it tells about =(
>
> [DEBUG] Digester - -  Fire end() for  
> org.apache.commons.betwixt.io.BeanRuleSet$ActionMappingRule@16546ef
> [ERROR] Digester - -End event threw exception  
> <java.lang.ClassCastException>java.lang.ClassCastException
>         at  
> org.apache.commons.betwixt.io.read.ReadContext.getCurrentElement(ReadCo 
> ntext.java:224)
>         at  
> org.apache.commons.betwixt.io.read.BeanBindAction.update(BeanBindAction 
> .java:164)
>         at  
> org.apache.commons.betwixt.io.read.BeanBindAction.end(BeanBindAction.ja 
> va:154)
>         at  
> org.apache.commons.betwixt.io.BeanRuleSet$ActionMappingRule.end(BeanRul 
> eSet.java:316)
>         at  
> org.apache.commons.digester.Digester.endElement(Digester.java:1058)
>         at  
> weblogic.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAX 
> Parser.java:585)
>         at  
> weblogic.apache.xerces.impl.xs.XMLSchemaValidator.endElement(XMLSchemaV 
> alidator.java:710)
>         at  
> weblogic.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLName 
> spaceBinder.java:898)
>         at  
> weblogic.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceB 
> inder.java:644)
>         at  
> weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndEleme 
> nt(XMLDocumentFragmentScannerImpl.java:1008)
>         at  
> weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentCont 
> entDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
>         at  
> weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument 
> (XMLDocumentFragmentScannerImpl.java:329)
>         at  
> weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration. 
> java:525)
>         at  
> weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration. 
> java:581)
>         at  
> weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>         at  
> weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParse 
> r.java:1175)
>         at  
> weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
>         at  
> weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
>         at  
> org.apache.commons.digester.Digester.parse(Digester.java:1586)
>         at  
> com.dart.simulator.tibco.TibcoBeanReader.parse(TibcoBeanReader.java: 
> 101)
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message