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.

DevToolsDataSourceAutoConfiguration fails when FactoryBean in Spring XML

See original GitHub issue

I prepared example when adding devtools breaks application: https://github.com/michaldo/dev-tools-defect

DevToolsDataSourceAutoConfiguration$DevToolsDataSourceCondition.getMatchOutcome calls context.getBeanFactory().getBeanNamesForType(DataSource.class);

If FactoryBean is defined within Spring XML configuration, the factory is instantiated before placeholders ${} are resolved, which can cause exceptions.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
philwebbcommented, Mar 21, 2018

Sorry, we’re going to have a hard time spending too much time on this since it’s XML based configuration. Our recommendation is to move to Java config.

1reaction
michaldocommented, Nov 16, 2017

I use XML in application due legacy configuration. Workaround is working

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot - Error creating bean with name 'dataSource ...
It looks like a classpath problem. What kind of dependency do you have for your database, and how is it defined in the...
Read more >
How to use the Spring FactoryBean? - Baeldung
2. The Basics of Factory Beans · 2.1. Implement a FactoryBean · 2.2. Use FactoryBean With XML-based Configuration · 2.3. Use FactoryBean With...
Read more >
Issue with SpringConfiguration.XML in Munit Error creating ...
Error creating bean with name '_muleNotificationManager': FactoryBean threw exception on object ... <spring:import resource="classpath:App-Config1.xml"/>.
Read more >
Spring Boot Error - Error creating a bean with name ...
Spring Boot Error - Error creating a bean with name 'dataSource' defined in class path resource DataSourceAutoConfiguration. Hello guys, If you are using...
Read more >
[Solved]-Bean definition store exception caused by ...
Exception was caused due to using different version of spring framework - Defined ... You can fix it by adding a "Bill of...
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