cannot be cast to java.lang.String exception
<pre><code>@Entity
@Table(name = "RateTransmissionDetails")
public class RateTransmissionDetails implements java.io.Serializable {

    private String spaceNum;
    private Integer rateInCent;


    public RateTransmissionDetails() {
    }
    public RateTransmissionDetails(String spaceNum,Integer rateInCent) {

        this.spaceNum=spaceNum;
        this.rateInCent=rateInCent;
    } 


    @Column(name = "SpaceNum", nullable = false)
    public String getSpaceNum() {
        return this.spaceNum;
    }

    public void setSpaceNum(String spaceNum) {
        this.spaceNum = spaceNum;
    }

    @Column(name = "RateInCent", nullable = false)
    public Integer getRateInCent() {
        return this.rateInCent;
    }

    public void setRateInCent(Integer rateInCent) {
        this.rateInCent = rateInCent;
    }
</code></pre>

<p>and my service class is </p>

<pre><code>Set&lt;RateTransmissionDetails&gt; rateTrmDtls = new HashSet&lt;RateTransmissionDetails&gt;();
rateTrmDtls.add((new RateTransmissionDetails("A",new Integer(20)));
</code></pre>

<p>I am getting the error</p>

<blockquote>
  <p>2012-11-02 16:44:02,796[http-6060-3] WARN  duncansolutions.databus.external.controller.rate.RateController - Error message to caller: com.duncansolutions.databus.external.bean.hibernate.rate.RateTransmissionDetails cannot be cast to java.lang.String</p>
</blockquote>

<p>Can any body tell me how to go about it.</p>
