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.

【4.0.0-RC2 & 4.0.0-RC3-SNAPSHOT】sharding-jdbc-spring-boot-starter init dataSource failed

See original GitHub issue

Bug Report

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

The is no problem in old version. when I upgrade to 4.0.0-RC2 or 4.0.0-RC3-SNAPSHOT, the dataSource can’t init

I found the problem may be in class shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.java can’t get dataSource.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:28 (3 by maintainers)

github_iconTop GitHub Comments

13reactions
gudepengcommented, Nov 24, 2019

我发现什么原因了,也是被困扰了两天,是因为引入的druid方式错误, 错误引入方式: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid.version}</version> </dependency> 正确引入方式: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency>

3reactions
zhaofangchengcommented, Nov 30, 2020

我发现什么原因了,也是被困扰了两天,是因为引入的druid方式错误, 错误引入方式: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>${druid.version}</version> </dependency> 正确引入方式: <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>${druid.version}</version> </dependency>

this works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

【4.0.0-RC2 & 4.0.0-RC3-SNAPSHOT】sharding-jdbc-spring ...
Bug Report Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
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