question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Accessing data with MySQL" guide does not work

See original GitHub issue

Following the steps in https://spring.io/guides/gs/accessing-data-mysql/ to the letter, the application fails to start with the following error:

Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
	at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:137) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	... 33 common frames omitted

Presumably, some configuration is missing. Or Spring boot is broken.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

4reactions
Maokaitoucommented, Dec 2, 2019

try add ‘spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect’ to application.properties

0reactions
Nooaahcommented, Apr 2, 2022

This works for me 👌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Started | Accessing data with MySQL - Spring
This guide walks you through the process of creating a Spring application connected to a MySQL Database (as opposed to an in-memory, embedded...
Read more >
4.22 Troubleshooting Problems Connecting to MySQL
4.22 Troubleshooting Problems Connecting to MySQL · Make sure that the server is running. · It might be that the server is running,...
Read more >
How To Troubleshoot Issues in MySQL - DigitalOcean
Sometimes users run into problems once they begin issuing queries on their data. In some database systems, including MySQL, query statements in must...
Read more >
How to fix common problems with MySQL databases - UpCloud
When MySQL is running but your website still doesn't load as it should, or if when attempting to connect to your database manually...
Read more >
Trouble connecting spring application to Mysql Database
There are two issues in your code. 1 - You have not added @Repository annotation to your repository class. So, system is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found