2016.11.12 13:41:05 TRACE ce [AVhXlYUu6eaRvX5y_I2S] [sql] time = 265ms | sql = INSERT INTO问题(kee,rule_id,严重性,manual_severity,消息,行,位置,间隙,工作量,状态,标签,分辨率,校验和,受理人,author_login,issue_attributes,issue_creation_date,issue_update_date,issue_close_date,created_at,updated_at,component_uuid, project_uuid,issue_type)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?, ?,?)| params = AVhXlgd3R6hiEKFMKI0Y,417,MAJOR,false,类“Command”有34个方法,大于20个授权方法。将它分成更小的类。,32,[B @ 51e88e5,8,60,OPEN,脑过载,12,56a5cf39bde2227246f55f9c64d17971,12,12,1478937725000,1478937725000,-5,1478938264903,1478938264903,AVhXcDrFyWOqRIX3Ks1c,AVhXcBE2vDxoF5vpXWIC,1 2016.11.12 13:41:07错误ce [AVhXlYUu6eaRvX5y_I2S] [o.s.s.c.t.CeWorkerCallableImpl]执行任务失败AVhXlYUu6eaRvX5y_I2S org.apache.ibatis.exceptions.PersistenceException:
提交事务时出错。原因:org.apache.ibatis.executor.BatchExecutorException:org.sonar.db.issue.IssueMapper.insert(批处理索引#2)失败。 1个先前的子执行程序已成功完成,但将被回滚。原因:java.sql.BatchUpdateException:错误的字符串值:'\ xF0 \ x9F \ x92 \ x9A S ...'列第189行的“消息”
原因:org.apache.ibatis.executor.BatchExecutorException:org.sonar.db.issue.IssueMapper.insert(批处理索引#2)失败。 1个先前的子执行程序已成功完成,但将被回滚。原因:java.sql.BatchUpdateException:错误的字符串值:'\ xF0 \ x9F \ x92 \ x9A S ...'列第189行的“消息”
系统配置是 Centos下 mysql Ver 14.14 Distrib 5.7.16,适用于Linux(x86_64),使用EditLine包装器
数据库集:
mysql> SHOW VARIABLES LIKE 'char%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
由于某种原因,服务器试图在表'问题'中插入UTF8mb4而不是utf-8字符。
编辑于11月15日
以下JDBC已经全部添加到Sonar runner和声纳服务器 - sonar.jdbc.url = JDBC:MySQL的://本地主机:3306 /声纳??了useUnicode =真安培;的characterEncoding = UTF8&安培; rewriteBatchedStatements =真安培; useConfigs = maxPerformance
请在MySQL下面找到字节流:
0, 'Remove this unused "$definition" local variable.', 106,
x'0A08086A106A180C2017',
null, 5, 'OPEN',
'unused', null, '99ac744eeafa6b37f7e8eac5c646437c',
null, null,
'',
1479190059000,1479190059000, null,
1479190593317, 1479190593317,
'AVhmn_WkMWzR03Kl-FYv', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4i', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "raw_text" 4 times.', 152,
x'0A0A089801109801181B2025120E0A0C120A089801109801181B2025120E0A0C120A0898011098011834203E120E0A0C120A08C20110C201181B2025120E0A0C120A08C20110C2011834203E',
4.0, 10, 'OPEN',
'design', null, '60c1c8e7e300be894ca50e3d8148a45e',
null, null,
'',
1479190059000,1479190059000, null,
1479190593317, 1479190593317,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4j', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "name_width" 6 times.', 38,
x'0A080826102618242030120C0A0A12080826102618242030120C0A0A120808261026183E204A120C0A0A1208083A103A18242030120C0A0A1208083A103A183E204A120C0A0A1208085C105C18542060120C0A0A1208086910691850205C',
6.0, 14, 'OPEN',
'design', null, '8ff134e37a45467429fb6ed08813ef27',
null, null,
'',
1479190059000,1479190059000, null,
1479190593318, 1479190593318,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4k', 475,
'MINOR',
0, 'Remove the literal "true" boolean value.', 195,
x'0A0A08C30110C3011846204A',
null, 2, 'OPEN',
'clumsy', null, 'c24b378689aac9d485209fd0a4e3ade1',
null, null,
'',
1479190059000,1479190059000, null,
1479190593319, 1479190593319,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1)
2016-11-15T06:16:33.374835Z 12 Query rollback
2016-11-15T06:16:33.390547Z 12 Query SET autocommit=1
2016-11-15T06:16:35.947505Z 12 Query SELECT 1
2016-11-15T06:16:35.948774Z 12 Query SET autocommit=0
2016-11-15T06:16:35.949893Z 12 Query select
cq.uuid,
cq.task_type as taskType,
cq.component_uuid as componentUuid,
cq.status as status,
cq.submitter_login as submitterLogin,
cq.started_at as startedAt,
cq.created_at as createdAt,
cq.updated_at as updatedAt
from ce_queue cq
where cq.uuid='AVhmn81bDHDOdW61_faq'
2016-11-15T06:16:35.957953Z 12 Query insert into ce_activity (
uuid,
component_uuid,
analysis_uuid,
status,
task_type,
is_last,
is_last_key,
submitter_login,
submitted_at,
started_at,
executed_at,
created_at,
updated_at,
execution_time_ms,
error_message,
error_stacktrace
)
values (
'AVhmn81bDHDOdW61_faq',
'AVhmn8tKDHDOdW61_fap',
null,
'FAILED',
'REPORT',
0,
'REPORTAVhmn8tKDHDOdW61_fap',
'admin',
1479190500789,
1479190502631,
1479190595952,
1479190595955,
1479190595955,
93321,
'\n### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189',
'org.apache.ibatis.exceptions.PersistenceException: \n### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)\n at org.sonar.db.DbSession.commit(DbSession.java:41)\n at org.sonar.db.BatchSession.commit(BatchSession.java:168)\n at org.sonar.db.BatchSession.increment(BatchSession.java:205)\n at org.sonar.db.BatchSession.insert(BatchSession.java:125)\n at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51)\n at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)\n at com.sun.proxy.$Proxy48.insert(Unknown Source)\n at org.sonar.server.computation.task.projectanalysis.step.PersistIssuesStep.execute(PersistIssuesStep.java:71)\n at org.sonar.server.computation.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64)\n at org.sonar.server.computation.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52)\n at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:84)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:57)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35)\n at java.util.concurrent.FutureTask.run(FutureTask.java:266)\n at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n at java.util.concurrent.FutureTask.run(FutureTask.java:266)\n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n at java.lang.Thread.run(Thread.java:745)\nCaused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)\n at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)\n at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)\n at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)\n at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)\n ... 23 more\nCaused by: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n at java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)\n at com.mysql.jdbc.Util.getInstance(Util.java:387)\n at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1161)\n at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1582)\n at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1248)\n at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:958)\n at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)\n at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)\n at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.sonar.db.profiling.InvocationUtils.invokeQuietly(InvocationUtils.java:34)\n at org.sonar.db.profiling.ProfilingPreparedStatementHandler.invoke(ProfilingPreparedStatementHandler.java:45)\n at com.sun.proxy.$Proxy24.executeBatch(Unknown Source)\n at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)\n ... 28 more\nCaused by: java.sql.SQLException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)\n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)\n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)\n at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)\n at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)\n at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)\n at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)\n at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)\n at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)\n at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5098)\n at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1543)\n ... 39 more\n'
)
2016-11-15T06:16:35.960623Z 12 Query select uuid
from ce_activity
where is_last_key='REPORTAVhmn8tKDHDOdW61_fap'
and status <> 'CANCELED'
order by id desc
已于16月16日编辑
最后几次提交错误表'问题'
2016-11-15T06:16:33.100057Z 12 Query commit
2016-11-15T06:16:33.326963Z 12 Query INSERT INTO issues (kee, rule_id, severity, manual_severity,
message, line, locations, gap, effort, status, tags,
resolution, checksum, assignee, author_login, issue_attributes, issue_creation_date, issue_update_date,
issue_close_date, created_at, updated_at, component_uuid, project_uuid, issue_type)
VALUES ('AVhmoExZMWzR03Kl-I0r', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "Australia/Brisbane" 4 times.', 51,
x'0A08083310331826203A120C0A0A1208083310331826203A120E0A0C120A08AF0110AF011826203A120E0A0C120A08A50210A50218242038120E0A0C120A08E30210E302180E2022',
4.0, 10, 'OPEN',
'design', null, '4c83bf60e890268e4c28fc0d535fbead',
null, null,
'',
1479190059000,1479190059000, null,
1479190593306, 1479190593306,
'AVhmn_WjMWzR03Kl-FYn', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE13MWzR03Kl-I4W', 463,
'MAJOR',
0, 'Remove the unused function parameter "$input".', 191,
x'0A0A08BF0110BF0118312037',
null, 5, 'OPEN',
'cert,misra,unused', null, '2537f941461c393954f764887895a456',
null, null,
'',
1479190059000,1479190059000, null,
1479190593307, 1479190593307,
'AVhmn_WjMWzR03Kl-FYn', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE13MWzR03Kl-I4X', 463,
'MAJOR',
0, 'Remove the unused function parameter "$output".', 191,
x'0A0A08BF0110BF0118492050',
null, 5, 'OPEN',
'cert,misra,unused', null, '2537f941461c393954f764887895a456',
null, null,
'',
1479190059000,1479190059000, null,
1479190593308, 1479190593308,
'AVhmn_WjMWzR03Kl-FYn', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE13MWzR03Kl-I4Y', 417,
'MAJOR',
0, 'Class "Command" has 34 methods, which is greater than 20 authorized. Split it into smaller classes.', 32,
x'0A080820102018002005',
null, 60, 'OPEN',
'brain-overload', null, '56a5cf39bde2227246f55f9c64d17971',
null, null,
'',
1479190059000,1479190059000, null,
1479190593308, 1479190593308,
'AVhmn_WjMWzR03Kl-FYn', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE14MWzR03Kl-I4Z', 486,
'MAJOR',
0, 'Rename "$name" which has the same name as the field declared at line 35.', 520,
x'0A0A0888041088041808200D120C0A0A120808231023180C2011',
null, 5, 'OPEN',
'cert,pitfall', null, '4387290590318a46e73a00de79200861',
null, null,
'',
1479190059000,1479190059000, null,
1479190593309, 1479190593309,
'AVhmn_WjMWzR03Kl-FYn', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE19MWzR03Kl-I4a', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "format" 4 times.', 41,
x'0A080829102918202028120C0A0A12080829102918202028120C0A0A120808501050181E2026120C0A0A120808551055180C2014120C0A0A120808551055182A2032',
4.0, 10, 'OPEN',
'design', null, '16686315e25cf56e4ddca44fccd55317',
null, null,
'',
1479190059000,1479190059000, null,
1479190593310, 1479190593310,
'AVhmn_WkMWzR03Kl-FYo', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2BMWzR03Kl-I4b', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "format" 4 times.', 72,
x'0A0808481048181E2026120C0A0A120808481048181E2026120C0A0A1208084D104D180C2014120C0A0A1208084D104D182D2035120C0A0A1208085C105C181C2024',
4.0, 10, 'OPEN',
'design', null, '0e27a71d30ca3a85d427d4187dcd2509',
null, null,
'',
1479190059000,1479190059000, null,
1479190593311, 1479190593311,
'AVhmn_WkMWzR03Kl-FYp', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2BMWzR03Kl-I4c', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "namespace" 3 times.', 79,
x'0A08084F104F180C2017120C0A0A1208084F104F180C2017120C0A0A1208084F104F182F203A120C0A0A120808591059181E2029',
3.0, 8, 'OPEN',
'design', null, '1a02bd65046ea1936adb8f6b555770e3',
null, null,
'',
1479190059000,1479190059000, null,
1479190593312, 1479190593312,
'AVhmn_WkMWzR03Kl-FYp', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2QMWzR03Kl-I4d', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "description" 3 times.', 103,
x'0A0808671067180C2019120C0A0A120808671067180C2019120C0A0A120808791079180C2019120E0A0C120A089F01109F01180C2019',
3.0, 8, 'OPEN',
'design', null, '9936da4d327342ba3432096385e745fc',
null, null,
'',
1479190059000,1479190059000, null,
1479190593313, 1479190593313,
'AVhmn_WkMWzR03Kl-FYu', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2QMWzR03Kl-I4e', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "namespace" 3 times.', 64,
x'0A0808401040182D2038120C0A0A120808401040182D2038120C0A0A12080840104018462051120C0A0A120808491049182D2038',
3.0, 8, 'OPEN',
'design', null, '6912cec8ed8dd70391c1cc14d15130d1',
null, null,
'',
1479190059000,1479190059000, null,
1479190593314, 1479190593314,
'AVhmn_WkMWzR03Kl-FYu', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2UMWzR03Kl-I4f', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "<none>" 6 times.', 34,
x'0A080822102218312039120C0A0A12080822102218312039120C0A0A120808251025183F2047120C0A0A1208083210321875207D120C0A0A120808361036183D2045120C0A0A120808601060183E2046120C0A0A120808621062186E2076',
6.0, 14, 'OPEN',
'design', null, '1b6527507aa924b426507804f2901b43',
null, null,
'',
1479190059000,1479190059000, null,
1479190593315, 1479190593315,
'AVhmn_WkMWzR03Kl-FYv', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2UMWzR03Kl-I4g', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "* Description: " 3 times.', 37,
x'0A0808251025180D201E120C0A0A120808251025180D201E120C0A0A120808361036180D201E120C0A0A120808601060180D201E',
3.0, 8, 'OPEN',
'design', null, 'a30f23c3ee9c6650ad296e3e26ec6260',
null, null,
'',
1479190059000,1479190059000, null,
1479190593316, 1479190593316,
'AVhmn_WkMWzR03Kl-FYv', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2UMWzR03Kl-I4h', 468,
'MINOR',
0, 'Remove this unused "$definition" local variable.', 106,
x'0A08086A106A180C2017',
null, 5, 'OPEN',
'unused', null, '99ac744eeafa6b37f7e8eac5c646437c',
null, null,
'',
1479190059000,1479190059000, null,
1479190593317, 1479190593317,
'AVhmn_WkMWzR03Kl-FYv', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4i', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "raw_text" 4 times.', 152,
x'0A0A089801109801181B2025120E0A0C120A089801109801181B2025120E0A0C120A0898011098011834203E120E0A0C120A08C20110C201181B2025120E0A0C120A08C20110C2011834203E',
4.0, 10, 'OPEN',
'design', null, '60c1c8e7e300be894ca50e3d8148a45e',
null, null,
'',
1479190059000,1479190059000, null,
1479190593317, 1479190593317,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4j', 480,
'CRITICAL',
0, 'Define a constant instead of duplicating this literal "name_width" 6 times.', 38,
x'0A080826102618242030120C0A0A12080826102618242030120C0A0A120808261026183E204A120C0A0A1208083A103A18242030120C0A0A1208083A103A183E204A120C0A0A1208085C105C18542060120C0A0A1208086910691850205C',
6.0, 14, 'OPEN',
'design', null, '8ff134e37a45467429fb6ed08813ef27',
null, null,
'',
1479190059000,1479190059000, null,
1479190593318, 1479190593318,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1),('AVhmoE2ZMWzR03Kl-I4k', 475,
'MINOR',
0, 'Remove the literal "true" boolean value.', 195,
x'0A0A08C30110C3011846204A',
null, 2, 'OPEN',
'clumsy', null, 'c24b378689aac9d485209fd0a4e3ade1',
null, null,
'',
1479190059000,1479190059000, null,
1479190593319, 1479190593319,
'AVhmn_WkMWzR03Kl-FYw', 'AVhmn8tKDHDOdW61_fap', 1)
2016-11-15T06:16:33.374835Z 12 Query rollback
2016-11-15T06:16:33.390547Z 12 Query SET autocommit=1
2016-11-15T06:16:35.947505Z 12 Query SELECT 1
2016-11-15T06:16:35.948774Z 12 Query SET autocommit=0
2016-11-15T06:16:35.949893Z 12 Query select
cq.uuid,
cq.task_type as taskType,
cq.component_uuid as componentUuid,
cq.status as status,
cq.submitter_login as submitterLogin,
cq.started_at as startedAt,
cq.created_at as createdAt,
cq.updated_at as updatedAt
from ce_queue cq
where cq.uuid='AVhmn81bDHDOdW61_faq'
2016-11-15T06:16:35.957953Z 12 Query insert into ce_activity (
uuid,
component_uuid,
analysis_uuid,
status,
task_type,
is_last,
is_last_key,
submitter_login,
submitted_at,
started_at,
executed_at,
created_at,
updated_at,
execution_time_ms,
error_message,
error_stacktrace
)
values (
'AVhmn81bDHDOdW61_faq',
'AVhmn8tKDHDOdW61_fap',
null,
'FAILED',
'REPORT',
0,
'REPORTAVhmn8tKDHDOdW61_fap',
'admin',
1479190500789,
1479190502631,
1479190595952,
1479190595955,
1479190595955,
93321,
'\n### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189',
'org.apache.ibatis.exceptions.PersistenceException: \n### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:177)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:169)\n at org.sonar.db.DbSession.commit(DbSession.java:41)\n at org.sonar.db.BatchSession.commit(BatchSession.java:168)\n at org.sonar.db.BatchSession.increment(BatchSession.java:205)\n at org.sonar.db.BatchSession.insert(BatchSession.java:125)\n at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:51)\n at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)\n at com.sun.proxy.$Proxy48.insert(Unknown Source)\n at org.sonar.server.computation.task.projectanalysis.step.PersistIssuesStep.execute(PersistIssuesStep.java:71)\n at org.sonar.server.computation.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:64)\n at org.sonar.server.computation.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:52)\n at org.sonar.server.computation.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.executeTask(CeWorkerCallableImpl.java:84)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:57)\n at org.sonar.server.computation.taskprocessor.CeWorkerCallableImpl.call(CeWorkerCallableImpl.java:35)\n at java.util.concurrent.FutureTask.run(FutureTask.java:266)\n at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n at java.util.concurrent.FutureTask.run(FutureTask.java:266)\n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)\n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)\n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n at java.lang.Thread.run(Thread.java:745)\nCaused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.issue.IssueMapper.insert (batch index #1) failed. Cause: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:127)\n at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:114)\n at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:109)\n at org.apache.ibatis.executor.BaseExecutor.commit(BaseExecutor.java:201)\n at org.apache.ibatis.executor.CachingExecutor.commit(CachingExecutor.java:104)\n at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:174)\n ... 23 more\nCaused by: java.sql.BatchUpdateException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n at java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)\n at com.mysql.jdbc.Util.getInstance(Util.java:387)\n at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1161)\n at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1582)\n at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1248)\n at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:958)\n at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)\n at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)\n at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)\n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.lang.reflect.Method.invoke(Method.java:498)\n at org.sonar.db.profiling.InvocationUtils.invokeQuietly(InvocationUtils.java:34)\n at org.sonar.db.profiling.ProfilingPreparedStatementHandler.invoke(ProfilingPreparedStatementHandler.java:45)\n at com.sun.proxy.$Proxy24.executeBatch(Unknown Source)\n at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:103)\n ... 28 more\nCaused by: java.sql.SQLException: Incorrect string value: \'\\xF0\\x9F\\x92\\x9A S...\' for column \'message\' at row 189\n at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963)\n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966)\n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902)\n at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526)\n at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2673)\n at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)\n at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)\n at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)\n at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)\n at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5098)\n at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1543)\n ... 39 more\n'
)
答案 0 :(得分:0)
\xF0\x9F\x92\x9A
是utf8mb4编码。您需要确定客户端具有utf8mb4字节。
假设您正在使用JDBC,请将?useUnicode=yes&characterEncoding=UTF-8
添加到JDBC URL。
如果还有其他问题,请在系统中提供更多字节详细信息。
答案 1 :(得分:0)
正如Rick James所回答的,当问题的消息包含表情符号时会出现问题。根本原因是表具有名为utf8
的字符集...在MySQL上不是UTF-8。实际上只有utf8mb4
支持像emojis这样的4字节字符。
由于此约束对MySQL设计数据模型的方式有重大的副作用,因此修复并不简单。目前唯一的解决方法是使用emojis从分析中排除源文件。