I've been successfully using Hibernate 3.1.x for some time and upgraded to 3.3.2. I'm getting the following error when my application fires up and tries to read some data:
Code:
2009-10-29 13:50:10,707 ERROR property.BasicPropertyAccessor: IllegalArgumentException in class: com.bst.optimizer.model.Subjective, setter method of property: Summary
2009-10-29 13:50:10,707 ERROR property.BasicPropertyAccessor: expected type: com.bst.optimizer.model.questionSummary.SurveyQuestionSummaryDocument, actual value: java.lang.String
In summary, I have a Session object and a Subjective object that extends Session. The Session object has a 'String summary' attribute with appropriate accessors. The Session class:
Code:
public abstract class Session
extends PersistentNamedObject
implements ISynchable,
ISession
{
private String summary;
public String getSummary() { return summary; }
public void setSummary(String summary) { this.summary = summary; }
}
The Subjective class overrides the 'setSummary()' method with the following:
Code:
public class Subjective extends Session implements ISurveySession {
. . . .
public void setSummary(SurveyQuestionSummaryDocument summaryDoc) {
setSummary(summaryDoc.toString());
}
}
The mappings follow. There are other attributes in both classes, but they are unimportant for this discussion.
The (simple) Session mapping:
Code:
<hibernate-mapping package="com.bst.optimizer.model">
<class name="Session" table="SESSION">
<id name="key" column="sessionKey">
<generator class="native"/>
</id>
<!-- Timestamp -->
<timestamp name="Ts" column="ts" source="vm"/>
<property name="Summary" type="text" column="summary" />
</class>
</hibernate-mapping>
The (simple) Subjective mapping:
Code:
<hibernate-mapping package="com.bst.optimizer.model">
<joined-subclass name="Subjective" extends="Session" table="SUBJECTIVE">
<key column="sessionKey"/>
</joined-subclass>
</hibernate-mapping>
Ideas?