Hi,

I have a simple class Trial with constructor

/** Creates a new instance of Trial */
public Trial(String trialName, String deviceFilename, String usageFilename, Date start, Date end) {
this.trialName = trialName;
this.deviceFilename = deviceFilename;
this.usageFilename = usageFilename;
this.start = start;
this.end = end;
}


I am mapping the instance variables to the constructor arguments using the mapping below. However, I get the exception

org.xml.sax.SAXException: unable to instantiate com.colinharris.pm.analysis.Trial; java.lang.IllegalArgumentException: argument type mismatch

when I include the two java.util.Date arguments. It works fine when I only have the three String arguments. Am I doing something wrong?

thanks in advance

Colin.

<class name="com.colinharris.pm.analysis.Trial">
<field name="trialName" set-method="%1" get-method="getTrialName" type="string">
<bind-xml node="attribute"/>
</field>
<field name="deviceFilename" set-method="%2" get-method="getDeviceFilename" type="string">
<bind-xml node="attribute"/>
</field>
<field name="usageFilename" set-method="%3" get-method="getUsageFilename" type="string">
<bind-xml node="attribute"/>
</field>
<field name="start" set-method="%4" get-method="getStart" type="date">
<bind-xml node="attribute"/>
</field>


  <field name="end"  set-method="%5" get-method="getEnd" type="date">
    <bind-xml node="attribute"/>
  </field>

</class>



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to