How to fix org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory in hibernate 6

I am migrating spring framework from 5.* to 6. I am getting error : hql is missing in ‘org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory’. How to fix this?

using imports in my project :
import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory;
import org.hibernate.hql.spi.QueryTranslator;
import org.hibernate.hql.spi.QueryTranslatorFactory;

Error is hql package is missing in ‘org.hibernate.hql’

Post the full stack trace.

using imports in my project :
import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory;
import org.hibernate.hql.spi.QueryTranslator;
import org.hibernate.hql.spi.QueryTranslatorFactory;

Error is hql package is missing in ‘org.hibernate.hql’

These contracts have been changed. Why do you need to parse queries manually?

You can look into org.hibernate.internal.AbstractSharedSessionContract#interpretHql how this works in the new Hibernate version.