Java Mailing List Archive

Home » user.castor »

[castor-user] Unable to find FieldDescriptor for 'ParameterDescription'

Papendieck, Thomas


Author LoginPost Reply

I'm using castor 1.3.2

when I try to unmarshal a XML I get this error:
testParseSampleXml(cpd.parser.XmlParserTest): could not convert customer XML file: Unable to find FieldDescriptor for 'ParameterDescription' in ClassDescriptor of Parameter.

It used to work until 3 days ago and I don't know what I changed to brake it. :o(

I already checked twice (Ho Ho Ho ;o)) that I used same castor version for source generation and in the project. I also regenerated the sources.
I even tried an older castor version (1.3.1) and the newest release (1.3.3-RC1) but no luck.

How do I fix this issue?

the XML is like this:
      someAttributes="correctly parsed">
     <!-- some more tags -->

My XSD looks like this:
   type="string" />
         ref="cpd:ParameterDescription" />
    <!-- some more elements -->

the resulting 'Parameter' object looks like this:
public class Parameter implements {
  * Field _parameterDescription.
  private java.lang.String _parameterDescription;
// more attributes

  * Returns the value of field 'parameterDescription'.
  * @return the value of field 'ParameterDescription'.
  public java.lang.String getParameterDescription(
  ) {
    return this._parameterDescription;
// more methods

  * Sets the value of field 'parameterDescription'.
  * @param parameterDescription the value of field
  * 'parameterDescription'.
  public void setParameterDescription(
       final java.lang.String parameterDescription) {
    this._parameterDescription = parameterDescription;

This is the call to the unmarshaller:
try {
       return (CustomerParameterDefinition) Unmarshaller.unmarshal(CustomerParameterDefinition.class, pFileReader);
    } catch (Exception ex) {
       throw new RuntimeException("could not convert customer XML file: "
            + ex.getMessage());


To unsubscribe from this list, please visit:

©2008 - Jax Systems, LLC, U.S.A.