ruanwenjun opened a new pull request, #10296:
URL: https://github.com/apache/dolphinscheduler/pull/10296

   ## Purpose of the pull request
   When I start StandaloneServer, find the master will throw exception:
   ```java
   [ERROR] 2022-05-30 18:37:34.967 +0800 
org.apache.dolphinscheduler.server.master.registry.ServerNodeManager:[221] - 
WorkerNodeInfoAndGroupDbSyncTask error:
   org.springframework.jdbc.BadSqlGrammarException: 
   ### Error querying database.  Cause: 
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "t_ds_worker_group" not found; 
SQL statement:
   select *
           from t_ds_worker_group
           order by update_time desc [42102-200]
   ### The error may exist in file 
[/Users/ruanwenjun/Project/Github/dolphinscheduler/dolphinscheduler-dao/target/classes/org/apache/dolphinscheduler/dao/mapper/WorkerGroupMapper.xml]
   ### The error may involve 
org.apache.dolphinscheduler.dao.mapper.WorkerGroupMapper.queryAllWorkerGroup
   ### The error occurred while executing a query
   ### SQL: select *         from t_ds_worker_group         order by 
update_time desc
   ### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table 
"t_ds_worker_group" not found; SQL statement:
   select *
           from t_ds_worker_group
           order by update_time desc [42102-200]
   ; bad SQL grammar []; nested exception is 
org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "t_ds_worker_group" not found; 
SQL statement:
   select *
           from t_ds_worker_group
           order by update_time desc [42102-200]
   ```
   
   This is caused by the h2 database is not initialized when we query the work 
group.
   
   ## Brief change log
   Inject the DataSourceScriptDatabaseInitializer to make sure the database is 
initialized after we can get connector.
   
   ## Verify this pull request
   Start StandaloneServer, find there is no exception.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to