My application was compiled against Hibernate Core 4.1.6.Final. When I run it against hibernate-core-4.2.0.CR1.jar, I get this exception:
Code:
java.lang.NoSuchMethodError: org.hibernate.criterion.Restrictions.eq(Ljava/lang/String;Ljava/lang/Object;)Lorg/hibernate/criterion/SimpleExpression;
at org.zanata.dao.AccountRoleDAO.findByName(AccountRoleDAO.java:44) [classes:]
at org.zanata.dao.AccountRoleDAO.roleExists(AccountRoleDAO.java:38) [classes:]
... 62 more
The return type of Restrictions.eq has changed from SimpleExpression to Criterion. No doubt the error will fix itself if I compile against 4.2.
Is 4.2 meant to be binary compatible with 4.1?