Spring Boot - Cannot determine embedded database driver class for database type NONE
By : Đàm Thị Ngọc Lan
Date : March 29 2020, 07:55 AM
this one helps. You haven't provided Spring Boot with enough information to auto-configure a DataSource. To do so, you'll need to add some properties to application.properties with the spring.datasource prefix. Take a look at DataSourceProperties to see all of the properties that you can set. You'll need to provide the appropriate url and driver class name: code :
spring.datasource.url = …
spring.datasource.driver-class-name = …
|
spring-boot, spring-boot-starter-data-jpa: database type NONE or Cannot find changelog location
By : churryck
Date : March 29 2020, 07:55 AM
This might help you GOT IT WORKING! Finally... What i did: delete HSQLDB from pom deb. Put liquidbaseautoconfiguration.class to exclude... 1 line of Code and 8 hours code reading.. here my Configuration Class. Hope i could help somebody: code :
@Configuration
@EnableAutoConfiguration(exclude =
LiquibaseAutoConfiguration.class
)
@EnableJpaRepositories("com.kage.bigdata.bida.repository.postgres")
public class PostgresConfig {
@Bean
public DataSource dataSource() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName("org.postgresql.Driver");
dataSource.setUrl("jdbc:postgresql://127.0.0.1:5432/postgres");
dataSource.setUsername("postgres");
dataSource.setPassword("postgres");
return dataSource;
}
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
LocalContainerEntityManagerFactoryBean entityManagerFactoryBean = new LocalContainerEntityManagerFactoryBean();
entityManagerFactoryBean.setDataSource(dataSource());
entityManagerFactoryBean.setPackagesToScan("com.kage.bigdata.bida.model");
entityManagerFactoryBean.setJpaProperties(buildHibernateProperties());
entityManagerFactoryBean.setJpaProperties(new Properties() {{
put("hibernate.current_session_context_class", SpringSessionContext.class.getName());
}});
entityManagerFactoryBean.setJpaVendorAdapter(new HibernateJpaVendorAdapter() {{
setDatabase(Database.POSTGRESQL);
}});
return entityManagerFactoryBean;
}
protected Properties buildHibernateProperties()
{
Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("hibernate.dialect", "org.hibernate.dialect.PostgreSQL9Dialect");
hibernateProperties.setProperty("hibernate.show_sql", "true");
hibernateProperties.setProperty("hibernate.use_sql_comments", "false");
hibernateProperties.setProperty("hibernate.format_sql", "false");
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", "create-drop");
hibernateProperties.setProperty("hibernate.generate_statistics", "false");
hibernateProperties.setProperty("javax.persistence.validation.mode", "none");
//Audit History flags
hibernateProperties.setProperty("org.hibernate.envers.store_data_at_delete", "true");
hibernateProperties.setProperty("org.hibernate.envers.global_with_modified_flag", "true");
return hibernateProperties;
}
@Bean
public PlatformTransactionManager transactionManager() {
return new JpaTransactionManager();
}
@Bean
public TransactionTemplate transactionTemplate() {
return new TransactionTemplate(transactionManager());
}
}
|
Cannot determine embedded database driver class for database type NONE with Redis in Spring Boot
By : syed
Date : March 29 2020, 07:55 AM
around this issue There is a couple of issues: spring-boot-starter-redis is deprecated. Use spring-boot-starter-data-redis instead. Remove the spring-boot-starter-data-jpa dependency. Spring Data Redis does not support JPA and it's not needed. This is actually causing your error.
|
Spring boot Bean exception: Cannot determine embedded database driver class for database type NONE
By : Sandeep Saini
Date : March 29 2020, 07:55 AM
should help you out I found a solution to run my application with Eclipse. Before I tried to run my application using Java Application -> SpringApplication with the main class: org.springframework.boot.SpringApplication. Changing the main class to xxx.Application (where xxx is the projectname) works.
|
Spring Boot: Cannot determine embedded database driver class for database type NONE
By : Kirill Lee
Date : March 29 2020, 07:55 AM
To fix this issue I think the following code addition to spring-config.xml might resolve the issue: code :
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${DbDriverName}" />
<property name="url" value="${DbUrl}" />
<property name="username" value="${DbUsername}" />
<property name="password" value="${DbPassword}" />
</bean>
|