Q:

java.lang. NoSuchMethodException: Bean has no property named

My XML and Bean has perfect match for property "CostCenter" but still am having thiss issue .Please help to solve this. 
Exception :
Sep 13, 2013 4:25:23 PM org.apache.commons.digester3.Digester endElement
SEVERE: End event threw exception
java.lang. NoSuchMethodException: Bean has no property named CostCenter
    at org.apache.commons.digester3.BeanPropertySetterRule.end(BeanPropertySetterRule.java:206)
    at org.apache.commons.digester3.Digester.endElement(Digester.java:1097)
    at com.sun.org.apache.xerces.internal.parsers. AbstractSAXParser.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl. XMLDocumentScannerImpl.next(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl. XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers. XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers. XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers. AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp. SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.apache.commons.digester3.Digester.parse(Digester.java:1588)
    at org.apache.commons.digester3.Digester.parse(Digester.java:1557)
    at ecnet.yes.po.digester. DigestPO.digest(DigestPO.java:80)
    at ecnet.yes.po.digester. DigestPO.main(DigestPO.java:16)
Sep 13, 2013 4:25:23 PM org.apache.commons.digester3.Digester parse
SEVERE: An error occurred while parsing XML from 'file:/D:/workspace/Digester/src/ecnet/yes/po/digester/YES_PO.xml', see nested exceptions

DigestPO.java
    Digester digester = new Digester();
    //Push the current object onto the stack
    digester.push(this);
    digester.addSetProperties("ECnetPO");
    //Creates a new instance of the YESBarePO class
    digester.addObjectCreate("ECnetPO/Header", YESBarePO.class );

    //Uses setName method of the YESBarePO instance
    //Uses tag name as the property name
    digester.addBeanPropertySetter("ECnetPO/Header/PONumber","PONumber");
    digester.addBeanPropertySetter("ECnetPO/Header/CostCenter","CostCenter");

xml :
<ECnetPO>
    <Header>
        <PONumber>PONUMB0116</PONumber>
                <CostCenter>Cost Center 20</CostCenter>
        </Header>

    <Header>
        <PONumber>PONUMB0116</PONumber>
                <CostCenter>Cost Center 20</CostCenter>
        </Header>
</ECnetPO>

YESBarePO.java
private String  PONumber;
private String  CostCenter;
public String getPONumber()
{
    return PONumber;
}

public void setPONumber(String pONumber)
{
    PONumber = pONumber;
}
public String getCostCenter()
{
    return CostCenter;
}

public void setCostCenter(String costCenter)
{
    CostCenter = costCenter;
}

A:

Just a guess, but does it make a difference if you rename the instance variable YESBarePO.CostCenter to be YESBarePO.costCenter instead?   Unlike .NET, for instance, the standard Java idiom is to use lowerCamelCase for instance variables and my experience suggests that some bean mappers require this convention to be honoured in order to work.