【 使用环境 】测试环境
odc版本:4.3.4_bp3_20250729 部署odc-web
odc部署服务器: centos7.6
docker版本: 19.03.13
odc 部署的元数据库: mysql.5.7.20
【报错】
第一种报错:
Bean create failed, beanName=dataSourceScriptDatabaseInitializer, message=Error creating bean with name ‘dataSourceScriptDatabaseInitializer’ defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #7 of class path resource [data.sql]: INSERT INTO config_system_configuration (key, value, application, profile, label, description) VALUES (‘odc.config.userConfig.cacheRefreshTimeSeconds’, ‘60’, ‘odc’, ‘default’, ‘master’, ‘个人配置缓存刷新时间’) ON DUPLICATE KEY UPDATE id=id; nested exception is java.sql.SQLTransientConnectionException: (conn=28319) Incorrect string value: ‘\xE4\xB8\xAA\xE4\xBA\xBA…’ for column ‘description’ at row 1
Action:
please check configuration then restart odc-server
APPLICATION FAILED TO START
第二种报错:
Description:
Bean create failed, beanName=dataSourceScriptDatabaseInitializer, message=Error creating bean with name ‘dataSourceScriptDatabaseInitializer’ defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #1 of class path resource [schema.sql]: CREATE TABLE IF NOT EXISTS config_system_configuration( id bigint(20) NOT NULL AUTO_INCREMENT COMMENT ‘auto-increment id’, key varchar(256) NOT NULL COMMENT ‘system config key’, value varchar(1024) DEFAULT NULL COMMENT ‘system config value’, application varchar(256) NOT NULL DEFAULT ‘odc’ COMMENT ‘application name’, profile varchar(256) NOT NULL DEFAULT ‘default’ COMMENT ‘profile name’, label varchar(128) NOT NULL DEFAULT ‘master’ COMMENT ‘label name’, create_time datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ‘insertion time’, update_time datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT ‘latest update time’, description varchar(1024) DEFAULT NULL COMMENT ‘description of the config’, creator_id bigint(20) DEFAULT NULL COMMENT ‘user id of the creator’, last_modifier_id bigint(20) DEFAULT NULL COMMENT ‘user id of the last modifier’, CONSTRAINT pk_system_configuration_id PRIMARY KEY (id), UNIQUE KEY uk_system_configuration_key_label (application, profile, label, key) ) ; nested exception is java.sql.SQLSyntaxErrorException: (conn=29682) Specified key was too long; max key length is 1000 bytes
如果元数据库为mysql,建议mysql最低版本是哪个版本