Search before asking
What happened
The AlertServer service may fail to start in specific PostgreSQL environments due to incompatible SQL syntax.
:: DolphinScheduler alert server :: (v3.4.2-SNAPSHOT)
ERROR SpringApplication Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alertServer': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
The error may exist in class path resource [org/apache/dolphinscheduler/dao/mapper/PluginDefineMapper.xml]
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: select count(*) from information_schema.TABLES where table_name = 't_ds_plugin_define'
Cause: org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
at org.apache.dolphinscheduler.alert.AlertServer.main(AlertServer.java:71)
Caused by: org.springframework.jdbc.BadSqlGrammarException:
What you expected to happen
All SQL queries must be compatible with as many versions of PostgreSQL and MySQL as possible to ensure the service starts up successfully.
How to reproduce
Start the AlertServer in a PostgreSQL environment that does not support uppercase table names like information_schema.TABLES.
Anything else
I observed that all PostgreSQL SQL scripts follow a lowercase naming convention.
Only the MySQL SQL scripts use a mix of uppercase and lowercase, because MySQL is case-insensitive.
Version
dev
Are you willing to submit PR?
Code of Conduct
Search before asking
What happened
The AlertServer service may fail to start in specific PostgreSQL environments due to incompatible SQL syntax.
:: DolphinScheduler alert server :: (v3.4.2-SNAPSHOT)
ERROR SpringApplication Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'alertServer': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:
Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
The error may exist in class path resource [org/apache/dolphinscheduler/dao/mapper/PluginDefineMapper.xml]
The error may involve defaultParameterMap
The error occurred while setting parameters
SQL: select count(*) from information_schema.TABLES where table_name = 't_ds_plugin_define'
Cause: org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "information_schema.TABLES" does not exist on node1
Position: 22
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:929)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:409)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1289)
at org.apache.dolphinscheduler.alert.AlertServer.main(AlertServer.java:71)
Caused by: org.springframework.jdbc.BadSqlGrammarException:
What you expected to happen
All SQL queries must be compatible with as many versions of PostgreSQL and MySQL as possible to ensure the service starts up successfully.
How to reproduce
Start the AlertServer in a PostgreSQL environment that does not support uppercase table names like information_schema.TABLES.
Anything else
I observed that all PostgreSQL SQL scripts follow a lowercase naming convention.
Only the MySQL SQL scripts use a mix of uppercase and lowercase, because MySQL is case-insensitive.
Version
dev
Are you willing to submit PR?
Code of Conduct