# Hibernate 6 dialect with Teradata 17

**URL:** <https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855>\
**Category:** Hibernate ORM\
**Created:** [June 19, 2023, 6:55pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855 "2023-06-19T18:55:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 19, 2023, 6:55pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/1 "2023-06-19T18:55:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mbladel](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/mbladel/32/2128_2.png) [@mbladel](https://discourse.hibernate.org/u/mbladel)\
**Post date:** [June 20, 2023, 7:05am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/2 "2023-06-20T07:05:03Z")

</div>

With Hibernate 6 Teradata’s dialect was moved to the new `hibernate-community-dialects` artifact.  
Find out more in our [migration guide](https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#community-dialects).

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 20, 2023, 7:22am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/3 "2023-06-20T07:22:48Z")

</div>

getting the below error;

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

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 20, 2023, 7:24am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/4 "2023-06-20T07:24:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 20, 2023, 7:42am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/5 "2023-06-20T07:42:19Z")

</div>

Yes, now getting this error:

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 20, 2023, 7:45am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/6 "2023-06-20T07:45:31Z")

</div>

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

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

entityManagerFactoryBeanOBject.setJpaPropertyMap(someObject);

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 20, 2023, 7:54am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/7 "2023-06-20T07:54:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 20, 2023, 8:11am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/8 "2023-06-20T08:11:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 20, 2023, 8:27am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/9 "2023-06-20T08:27:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 21, 2023, 11:38am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/10 "2023-06-21T11:38:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 21, 2023, 12:22pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/11 "2023-06-21T12:22:27Z")

</div>

Also, below the stack trace I see this:

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

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 21, 2023, 1:57pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/12 "2023-06-21T13:57:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 21, 2023, 2:01pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/13 "2023-06-21T14:01:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [June 21, 2023, 2:31pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/14 "2023-06-21T14:31:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 21, 2023, 3:05pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/15 "2023-06-21T15:05:37Z")

</div>

Yes, I agree with that.

---

<div class="post-metadata">

**Author:** ![miikebross](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miikebross](https://discourse.hibernate.org/u/miikebross)\
**Post date:** [June 26, 2023, 2:21pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/16 "2023-06-26T14:21:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BiswadebMukhopadhyay](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/biswadebmukhopadhyay/32/2505_2.png) [@BiswadebMukhopadhyay](https://discourse.hibernate.org/u/BiswadebMukhopadhyay)\
**Post date:** [June 26, 2023, 2:38pm UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/17 "2023-06-26T14:38:45Z")

</div>

@miikebross did you face the same issue ?

---

<div class="post-metadata">

**Author:** ![miikebross](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@miikebross](https://discourse.hibernate.org/u/miikebross)\
**Post date:** [October 5, 2023, 7:04am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/18 "2023-10-05T07:04:04Z")

</div>

Yes, i am facing same issue[.](https://waplus.win/)  
[.](https://projectfreetv.onl/)

---

<div class="post-metadata">

**Author:** ![D-latali](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/d-latali/32/3140_2.png) [@D-latali](https://discourse.hibernate.org/u/D-latali)\
**Post date:** [April 4, 2024, 11:30am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/19 "2024-04-04T11:30:13Z")

</div>

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 :

```auto
      <dependency>
          <groupId>org.hibernate.orm</groupId>
          <artifactId>hibernate-community-dialects</artifactId>
          <version>6.5.0.CR1</version>
      </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](https://github.com/hibernate/hibernate-orm/blob/6.0/migration-guide.adoc#community-dialects)

---

<div class="post-metadata">

**Author:** ![skrishnappa](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/skrishnappa/32/2669_2.png) [@skrishnappa](https://discourse.hibernate.org/u/skrishnappa)\
**Post date:** [April 18, 2024, 1:47am UTC](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855/20 "2024-04-18T01:47:24Z")

</div>

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 16.20.00.13] [Error 1084] [SQLState HY000] Invalid SQL statement: ‘’

org.springframework.orm.jpa.JpaSystemException: could not prepare statement [[Teradata JDBC Driver] [TeraJDBC 16.20.00.13] [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)  
at

[Next page](https://discourse.hibernate.org/t/hibernate-6-dialect-with-teradata-17/7855.md?page=2)
