Unable to start embedded Tomcat org.springframework.context.ApplicationContextException

We Are Going To Discuss About Unable to start embedded Tomcat org.springframework.context.ApplicationContextException. So lets Start this Java Article.

Unable to start embedded Tomcat org.springframework.context.ApplicationContextException

  1. Unable to start embedded Tomcat org.springframework.context.ApplicationContextException

    First, you usually can find the root cause on last Caused by statement for debugging.
    Therefore, according to the error log you posted, Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set should be key!

  2. Unable to start embedded Tomcat org.springframework.context.ApplicationContextException

    First, you usually can find the root cause on last Caused by statement for debugging.
    Therefore, according to the error log you posted, Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set should be key!

Solution 1

First, you usually can find the root cause on last Caused by statement for debugging.

Therefore, according to the error log you posted, Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set should be key!

Although Hibernate is database agnostic, we can specify the current database dialect to let it generate better SQL queries for that database. Therefore, this exception can be solved by simply identifying hibernate.dialect in your properties file as follows:

For application.properties:

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

For application.yml:

spring:
  jpa:
    database-platform: org.hibernate.dialect.MySQL5Dialect

Original Author Of This Content

Solution 2

Resolved it by adding a missing property to application.properties file.

spring.jpa.hibernate.ddl-auto=update

Original Author Of This Content

Solution 3

In my case:

  1. I have created separate new project with the same code and in the same work-space.
  2. Started the application.
  3. This time tomcat started successfully in the first instance itself.

Original Author Of This Content

Solution 4

1: please create a new project, make it work well, and the tomcat is working well, 2: then copy the codes which you had write with your old project to the new
project.
3: is’s work very well
it’s maybe the old workplace with old project is broken, wo can’t repair it
i hope i can help you!

Original Author Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment