Does anyone have an experience with an error like this? I expect it is a result of a problem with my mapping file. Thanks in advance.
Here's the error:
org.xml.sax.SAXException: unable to find FieldDescriptor for 'citycode'
in ClassDescriptor of
current at java.lang.Throwable.fillInStackTrace(Native Method)
at
java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.(Compiled
Code) at java.lang.Exception.(Compiled Code) at
org.xml.sax.SAXException.(SAXException.java:38) at
org.exolab.castor.xml.UnmarshalHandler.startElement(Compiled
Code) at
org.apache.xerces.parsers.SAXParser.startElement(Compiled Code)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(Compiled
Code) at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(Compiled
Code) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(Compiled
Code)
at org.apache.xerces.framework.XMLParser.parse(Compiled Code)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Compiled Code) at
org.mitre.acis.portal.weather.weatherProvider.getContent(weatherProvider.java:139)
at
com.iplanet.portalserver.desktop.ProviderCaller.run(Compiled
Code)
Here's the pertinent fragment of my mapping file:
<?xml version="1.0"?>
<mapping>
<class name="org.mitre.acis.portal.weather.USCurrentWeather">
<map-to
xml="weather"/>
<field
name="TimeStamp"
type="org.mitre.acis.portal.weather.TimeStamp">
<bind-xml name="timestamp" node="element"/>
</field>
<field
name="CurrentCondition"
type="org.mitre.acis.portal.weather.CurrentCondition">
<bind-xml name="current" node="element"/>
</field>
</class>
<class name="org.mitre.acis.portal.weather.TimeStamp">
<field
name="Zone"
type="java.lang.String">
<bind-xml name="zone" node="attribute"/>
</field>
<field
name="DateTime"
type="java.lang.String">
<bind-xml name="timestamp" node="text"/>
</field>
</class>
<class name="org.mitre.acis.portal.weather.CurrentCondition">
<map-to
xml="current"/>
<field
name="CityCode"
type="java.lang.String">
<bind-xml name="citycode" node="text"/>
</field>
:
:
:
</class>
</mapping>
Here's the pertinent fragment from CurrentCondition.java:
package org.mitre.acis.portal.weather;
import java.util.Vector;
import java.util.Enumeration;
public class CurrentCondition {
private String cityCode;
public void setCityCode(String
inCityCode) {
cityCode = inCityCode;
}
public String getCityCode() {
return cityCode;
}
}
