Thursday, 20 February 2014

java.lang.ClassCastException: org.hibernate.type.StringType cannot be cast to org.hibernate.type.VersionType

Problem:

Hibernate Tool While reverse engineering

Reason for this problem: In one of my table there was a field named version. Which Hibernate tool treated as field version and try to cast the same and it throws an exception because the type of the field was not what hibernate tool was expecting.

Solution: 

Open the hbm configuration file for corresponding table and change the configuration of that field from <version> to <property> .

Spring boot with CORS

CORS (Cross-Origin Resource Sharing) errors occur when a web application running in a browser requests a resource from a different domain or...