Hibernate Teradata dialect issue

Database
Enthusiast

Hibernate Teradata dialect issue

When using the Spring Tool Suite try to connect to Teradata database but always appear Error message "unable to reslove name org.hibernate.dialect.TeradataDialect " Plz help me fix this issue.Thx!

Application setting file is below:

spring.datasource.driverClassName=com.teradata.jdbc.TeraDriver

spring.datasource.url=jdbc:teradata://192.168.206.1/database=PCORE

spring.datasource.username=dwauto

spring.datasource.password=dwauto

spring.jpa.database-platform=org.hibernate.dialect.TeradataDialect                                            

spring.jpa.show-sql=true

spring.datasource.initialize=true

spring.datasource.testOnBorrow=true

spring.datasource.validationQuery=SELECT

spring.datasource.max-active=15

spring.jpa.hibernate.ddl-auto=update


4 REPLIES
Teradata Employee

Re: Hibernate Teradata dialect issue

In the set of parameters you sent, there is extra whitespace after the word TeradataDialect. This needs to be removed.

There are also 2 extra space characters that shouldn't be present. The corrected values without white space are:

spring.datasource.driverClassName=com.teradata.jdbc.TeraDriver

spring.jpa.database-platform=org.hibernate.dialect.TeradataDialect

Please try these and also ensure that the Hibernate jar files are on your classpath. If this doesn't resolve the problem, please send a stacktrace of the failure. 

Enthusiast

Re: Hibernate Teradata dialect issue

Thank for your replying.this issue have resolved but I met another problem: if I set "spring.jpa.hibernate.ddl-auto=true", it will failure. I think it found wrong default SCHEMA. Would you help me set default SCHEMA?
Teradata Employee

Re: Hibernate Teradata dialect issue

According to the Spring Documentation:

http://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html

the legal values for “spring.jpa.hibernate.ddl-auto” are: none, validate, update or create-drop

I’d suggest using “create-drop” if your target table doesn’t exist and “update” if it does. 

Enthusiast

Re: Hibernate Teradata dialect issue

Dear Drepshas,

I saw log messages show DB connect to Teradata Db,default Schema is PAD, but it should connect to Schema PCORE and concern if it set “spring.jpa.hibernate.ddl-auto:create-drop",That will create or drop some table into Schema PAD.

I don't know whether it is about connecting db infomation,usernmae or passwor or

Teradata get some parmater to point default DB Schema?