Hibernate 6 dialect with Teradata 17

What’s the hibernate dialect for Teradata 17 in Hibernate 6+ ?

The one I have used causing me the below error:
‘unable to resolve name org.hibernate.dialect.TeradataDialect dialect as strategy org.hibernate.dialect.dialect’ . I have also used Teradata14Dialect but no luck on that.

Any suggestions please.

With Hibernate 6 Teradata’s dialect was moved to the new hibernate-community-dialects artifact.
Find out more in our migration guide.

getting the below error;

strategyselectionException: Unable to resolve name [org.hibernate.community.dialect.TeradataDialect] as strategy [org.hibernate.dialect.Dialect]

Did you add a dependency for the hibernate-community-dialects artifact?

Yes, now getting this error:

StrategySelectionException: could not instantiate named strategy class [org.hibernate.community.dialect.TeradataDialect]

I am setting it from config class into a Hashmap like below:

someObject.put(“hibernate.dialect”, “org.hibernate.community.dialect.TeradataDialect”);


That should work though, what is the full exception stack trace?

org.hibernate.boot.registry.selector.spi.StrategySelectionException: could not instantiate named strategy class [org.hibernate.community.dialect.TeradataDialect]

An exception has something called a stack trace where you see the error originates from, as well as a possible exception cause. Without that information, nobody can help you.

1 Like

full stack trace cannot be shared as it’s from restricted system.

but I am using teradata 17.10 with spring boot 3, java 17, hibernate 6.

Also, below the stack trace I see this:

SQLState 42000 the user does not have SELECT access to SYSLIB.SQLRestrictedWords.

Well, then give your user permission to query the restricted words.

Is there any way to bypass the getSqlKeywords() function of hibernate ?
I didn’t find much about any property or anything though.

You can create a custom subclass and override the registerKeywords method to do nothing, but you might run into other issues then.

Yes, I agree with that.

I am using teradata 17.10 with spring boot 3, java 17, hibernate 6.

@miikebross did you face the same issue ?

Yes, i am facing same issue.

Hi, guys
I have resolved the issues.
Thanks to @beikov I checked the documentation and I found that: As of Hibernate 6.0, some dialect classes that are maintained by vendors or individuals, as opposed to the Hibernate team. Have moved to a separate Maven artifact: org. Hibernate. Arm: hibernate-community-dialects

for that you need to add the following dependency :


and change the dialect from org.hibernate.dialect.TeradataDialect to org.hibernate.community.dialect.TeradataDialect

Ref : hibernate-orm/migration-guide.adoc at 6.0 · hibernate/hibernate-orm · GitHub

These dependencies are causing below error when invoking findAll or JPA select methods. Can you please provide your inputs?

Caused by: java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC] [Error 1084] [SQLState HY000] Invalid SQL statement: ‘’

org.springframework.orm.jpa.JpaSystemException: could not prepare statement [[Teradata JDBC Driver] [TeraJDBC] [Error 1084] [SQLState HY000] Invalid SQL statement: ‘’]
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:341)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:241)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:550)
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:335)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:152)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)

1 Like