It's the problem of hibernate mapping types.
you can extends a dialect.
eg:
public class SQLServerDialectOverrider extends SQLServerDialect{
public SQLServerDialectOverrider() {
super();
registerHibernateType(Types.NVARCHAR, Hibernate.STRING.getName());
registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
}
}
Use this class as the dialect class.