Hibernate: select this_.Slno as Slno0_, this_.CatalogProducts_Item_GUID as CatalogP2_0_0_, this_.CatalogProducts_Product_Description as CatalogP3_0_0_, this_.CatalogProducts_Product_Name as CatalogP4_0_0_ from dbo.CatalogProducts this_ where this_.CatalogProducts_Product_Name like ? Error org.hibernate.exception.GenericJDBCException: could not execute query org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92) at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.doList(Loader.java:1502) at org.hibernate.loader.Loader.list(Loader.java:1482) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1246) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299) at com.test.SearchMain.main(SearchMain.java:50) Caused by: java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]Unhandled data type: TDS_INT8 at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processColMetaData(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source) at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source) at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source) at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source) at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:107) at org.hibernate.loader.Loader.getResultSet(Loader.java:1183) at org.hibernate.loader.Loader.doQuery(Loader.java:363) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:203) at org.hibernate.loader.Loader.doList(Loader.java:1499) ... 5 more ****************************************************************************

Hmmm. There was a bug in a beta version of this driver that was something like this. No idea if Microsoft ever fixed it. You might want to change your driver to use the current MS driver (since it looks like you are using the old one). Than might fix it.

Hibernate doesn't support MS's own driver, largely due to it being rubbish. I haven't checked whether they have changed this stance since MS recently released their new driver. You could change to use jTDS, which might fix the issue.