dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Question] [DAO] Application failed to start when active profile was set other than mysql/h2/postgresql

Open faketrader opened this issue 2 years ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

***************************
APPLICATION FAILED TO START
***************************

Description:

Field daoPluginConfiguration in org.apache.dolphinscheduler.dao.DaoConfiguration required a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'org.apache.dolphinscheduler.dao.plugin.api.DaoPluginConfiguration' in your configuration.

What you expected to happen

Start application normally

How to reproduce

  1. create a local configuration file application-local.yaml, set active profile to local, application failed to start.
  2. change file name to application-mysql.yaml, set active profile to mysql, application started successfully.

Anything else

It seems the dao plugin checkes the profile and hardcodes as "mysql", "postgresql" and "h2", only loading the configuration when environment condition is met in org.apache.dolphinscheduler.dao.plugin.api.DatabaseEnvironmentCondition.

Version

3.2.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

faketrader avatar Nov 25 '24 06:11 faketrader

Can you describe what you what to do?

SbloodyS avatar Nov 25 '24 07:11 SbloodyS

Would like to create some profiles (dev/test/prod) so I can customize configurations for different environments.

faketrader avatar Nov 25 '24 07:11 faketrader

Since the current mysql profile is bound with many configurations, it is not recommended to change the configuration file to be compatible with different environments. You can create a profile with the same name and different contents for each environment to use in different environments.

SbloodyS avatar Nov 25 '24 08:11 SbloodyS

Hello, how was this issue ultimately resolved?

Penglhx avatar May 15 '25 05:05 Penglhx

dolphinscheduler_env.sh 文件中 ${DATABASE}不用修改

omyhub avatar Apr 22 '26 05:04 omyhub