16:06:17.626 [main] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
16:06:17.629 [main] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
16:06:17.629 [main] DEBUG org.springframework.jdbc.support.SQLErrorCodesFactory - Database product name cached for DataSource [com.zaxxer.hikari.HikariDataSource@655a5d9c]: name is 'MySQL'
16:06:17.630 [main] DEBUG org.springframework.jdbc.support.SQLErrorCodesFactory - SQL error codes for 'MySQL' found
16:06:17.631 [main] DEBUG org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator - Translating SQLException with SQL state '42S22', error code '1054', message [Unknown column 'ext' in 'field list']; SQL was [SELECT group_name, kind, master_address, broker_state, tag, ext,update_time FROM broker_group] for task [StatementCallback]
Exception in thread "main" org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [SELECT group_name, kind, master_address, broker_state, tag, ext,update_time FROM broker_group]; nested exception is java.sql.SQLSyntaxErrorException: Unknown column 'ext' in 'field list'
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:415)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:470)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:480)
at qunar.tc.qmq.meta.store.impl.DatabaseStore.getAllBrokerGroups(DatabaseStore.java:183)
at qunar.tc.qmq.meta.cache.CachedMetaInfoManager.refreshBrokerGroups(CachedMetaInfoManager.java:196)
at qunar.tc.qmq.meta.cache.CachedMetaInfoManager.refresh(CachedMetaInfoManager.java:147)
at qunar.tc.qmq.meta.cache.CachedMetaInfoManager.<init>(CachedMetaInfoManager.java:94)
at qunar.tc.qmq.meta.startup.ServerWrapper.start(ServerWrapper.java:105)
at qunar.tc.qmq.meta.startup.Bootstrap.main(Bootstrap.java:36)
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'ext' in 'field list'
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1201)
at com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:108)
at com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java)
at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:454)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:404)
... 8 more
问题描述 当前的代码 init.sql 是不是缺少了
ext
字段,在启动 metaserver 的时候会报错,这里 环境配置 本地开发环境复现步骤 1.手动添加
qmq-metaserver
的配置后启动qmq-metaserver#Bootstrap.java
实际输出结果
期望输出结果