[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5236) Exception with hibernate model

Michael Zhang (JIRA) noreply at atlassian.com
Tue May 18 17:22:11 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Zhang updated HHH-5236:
-------------------------------

    Attachment: CmPaperType.java

This will cause Exception.  But if the method isActive is removed or changed to something else, the exception will gone.

> Exception with hibernate model
> ------------------------------
>
>                 Key: HHH-5236
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5236
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.0.ga, 3.5.0-Final, 3.5.2
>         Environment: Java 1.5
> Windows/Unix
>            Reporter: Michael Zhang
>         Attachments: CmPaperType.hbm.xml, CmPaperType.java
>
>
> I have a hibernate model class member e.g. (active) that is mapped to a string (either "Y" or "N"). Both getter and setter are implemented.  There is also another method in the class: public boolean isActive()...
> When test it from JUnit, everything works fine.  However when the class is accessed from thread with database update operation, hibernate will throw ClassCast exception from Boolean to String. 
> If the method of "isActive" is changed to something else such as "isActiveMethod", the exception will disappeare.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list