Hello Kris,
here is the query result
id |
qgate_id |
metric_id |
period |
operator |
value_error |
value_warning |
created_at |
updated_at |
1 |
1 |
113 |
1 |
GT |
0 |
NULL |
2016-09-23 11:03:30 |
NULL |
2 |
1 |
111 |
1 |
GT |
0 |
NULL |
2016-09-23 11:03:30 |
NULL |
3 |
1 |
119 |
1 |
GT |
5 |
NULL |
2016-09-23 11:03:30 |
NULL |
4 |
1 |
36 |
1 |
LT |
80 |
NULL |
2016-09-23 11:03:30 |
NULL |
5 |
2 |
111 |
1 |
GT |
0 |
|
2016-10-11 15:49:19 |
NULL |
6 |
2 |
113 |
1 |
GT |
0 |
|
2016-10-11 15:49:33 |
NULL |
7 |
2 |
119 |
1 |
GT |
5 |
|
2016-10-11 15:49:48 |
NULL |
8 |
4 |
111 |
1 |
GT |
0 |
|
2017-04-06 10:16:28 |
NULL |
9 |
4 |
113 |
1 |
GT |
0 |
|
2017-04-06 10:16:47 |
NULL |
11 |
4 |
15 |
NULL |
LT |
30 |
|
2017-04-06 10:18:20 |
2017-04-06 10:18:33 |
12 |
6 |
113 |
1 |
GT |
0 |
NULL |
2018-05-11 23:27:29 |
NULL |
13 |
6 |
111 |
1 |
GT |
0 |
NULL |
2018-05-11 23:27:29 |
NULL |
14 |
6 |
119 |
1 |
GT |
5 |
NULL |
2018-05-11 23:27:29 |
NULL |
16 |
7 |
175 |
1 |
GT |
1 |
NULL |
2018-07-06 14:34:29 |
NULL |
17 |
7 |
174 |
1 |
GT |
1 |
NULL |
2018-07-06 14:34:29 |
NULL |
18 |
7 |
173 |
1 |
GT |
1 |
NULL |
2018-07-06 14:34:29 |
NULL |
19 |
7 |
36 |
1 |
LT |
80 |
NULL |
2018-07-06 14:34:29 |
NULL |
20 |
7 |
172 |
1 |
GT |
3 |
NULL |
2018-07-06 14:34:29 |
NULL |
21 |
8 |
89 |
NULL |
GT |
10 |
NULL |
2018-07-12 10:24:13 |
2019-05-01 02:46:35 |
22 |
8 |
111 |
1 |
GT |
10 |
NULL |
2018-07-12 10:25:16 |
2019-05-01 02:46:35 |
23 |
8 |
173 |
1 |
GT |
1 |
NULL |
2018-07-12 10:26:08 |
NULL |
24 |
8 |
175 |
1 |
GT |
1 |
NULL |
2018-07-12 10:26:42 |
NULL |
25 |
8 |
119 |
1 |
GT |
4 |
NULL |
2018-07-12 10:28:17 |
2019-05-01 02:46:35 |
31 |
11 |
36 |
1 |
LT |
10 |
NULL |
2018-10-23 14:33:09 |
2019-05-01 02:46:35 |
34 |
11 |
172 |
1 |
GT |
10 |
NULL |
2018-10-23 14:37:44 |
2019-05-01 02:46:35 |
Here is the log using trace for the logs
**FYI, I removed the force user authentication option under ADMINISTRATION\CONFIGURATION\SECURITY, restarted instance and Im getting this log
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][o.s.s.p.w.UserSessionFilter] Thread[http-nio-0.0.0.0-9000-exec-2,5,main] serves /api/qualitygates/create_condition
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=0ms | sql=SELECT u.id as id, u.uuid as uuid, u.login as login, u.name as name, u.email as email, u.active as “active”, u.scm_accounts as “scmAccounts”, u.salt as “salt”, u.crypted_password as “cryptedPassword”, u.hash_method as “hashMethod”, u.external_id as “externalId”, u.external_login as “externalLogin”, u.external_identity_provider as “externalIdentityProvider”, u.user_local as “local”, u.is_root as “root”, u.onboarded as “onboarded”, u.homepage_type as “homepageType”, u.homepage_parameter as “homepageParameter”, u.last_connection_date as “lastConnectionDate”, u.created_at as “createdAt”, u.updated_at as “updatedAt” FROM users u WHERE u.uuid=? | params=AXMlx-6abtl7d9fzYlgU
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=select kee as “key”, is_empty as empty, text_value as value, created_at as createdAt from internal_properties where kee in ( ? ) | params=organization.default
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=select org.uuid as “uuid”, org.kee as “key”, org.name as “name”, org.description as “description”, org.default_quality_gate_uuid as “defaultQualityGateUuid”, org.url as “url”, org.avatar_url as “avatarUrl”, org.subscription as “subscription”, org.created_at as “createdAt”, org.updated_at as “updatedAt” from organizations org where org.uuid = ? | params=AV_Lkz_L4Pxexu9WYH3W
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=select org.uuid as “uuid”, org.kee as “key”, org.name as “name”, org.description as “description”, org.default_quality_gate_uuid as “defaultQualityGateUuid”, org.url as “url”, org.avatar_url as “avatarUrl”, org.subscription as “subscription”, org.created_at as “createdAt”, org.updated_at as “updatedAt” from organizations org where org.kee = ? | params=default-organization
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=SELECT qg.id as id, qg.uuid as uuid, qg.name as name, qg.is_built_in as isBuiltIn, oqg.organization_uuid as organizationUuid, qg.created_at as createdAt, qg.updated_at as updatedAd FROM quality_gates qg INNER JOIN org_quality_gates oqg ON oqg.quality_gate_uuid = qg.uuid AND oqg.organization_uuid = ? WHERE qg.id = ? | params=AV_Lkz_L4Pxexu9WYH3W, 19
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=select gr.role from group_roles gr inner join groups_users gu on gr.group_id=gu.group_id where gr.organization_uuid=? and gr.resource_id is null and gu.user_id=? union select gr.role from group_roles gr where gr.organization_uuid=? and gr.group_id is null and gr.resource_id is null union select ur.role from user_roles ur where ur.organization_uuid=? and ur.user_id=? and ur.resource_id is null | params=AV_Lkz_L4Pxexu9WYH3W, 4492, AV_Lkz_L4Pxexu9WYH3W, AV_Lkz_L4Pxexu9WYH3W, 4492
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=SELECT m.id, m.name as kee, m.description, m.direction, m.domain, m.short_name as shortName, m.qualitative, m.val_type as valueType, m.user_managed as userManaged, m.enabled, m.worst_value as worstValue, m.best_value as bestValue, m.optimized_best_value as optimizedBestValue, m.hidden, m.delete_historical_data as deleteHistoricalData, m.decimal_scale as decimalScale FROM metrics m WHERE m.name=? | params=new_bugs
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=1ms | sql=select id, qgate_id as qualityGateId, metric_id as metricId, operator, value_error as errorThreshold, created_at as createdAt, updated_at as updatedAt from quality_gate_conditions where qgate_id=? order by created_at asc | params=19
2020.07.06 17:52:24 TRACE web[AXMmF1XMjruwbwjQAABs][sql] time=3ms | sql=insert into quality_gate_conditions (qgate_id, metric_id, operator, value_error, created_at, updated_at) values (?, ?, ?, ?, ?, ?) | params=19, 111, GT, 1, 2020-07-06 17:52:24.656, 0
2020.07.06 17:52:24 ERROR web[AXMmF1XMjruwbwjQAABs][o.s.s.w.WebServiceEngine] Fail to process request http://localhost:9000/api/qualitygates/create_condition
org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Implicit conversion from data type varbinary to datetime2 is not allowed. Use the CONVERT function to run this query.
The error may exist in org.sonar.db.qualitygate.QualityGateConditionMapper
The error may involve org.sonar.db.qualitygate.QualityGateConditionMapper.insert-Inline
The error occurred while setting parameters
SQL: insert into quality_gate_conditions (qgate_id, metric_id, operator, value_error, created_at, updated_at) values (?, ?, ?, ?, ?, ?)
Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Implicit conversion from data type varbinary to datetime2 is not allowed. Use the CONVERT function to run this query.
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:93)
at com.sun.proxy.$Proxy34.insert(Unknown Source)
at org.sonar.db.qualitygate.QualityGateConditionDao.insert(QualityGateConditionDao.java:30)
at org.sonar.server.qualitygate.QualityGateConditionsUpdater.createCondition(QualityGateConditionsUpdater.java:98)
at org.sonar.server.qualitygate.ws.CreateConditionAction.handle(CreateConditionAction.java:89)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:110)
at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:88)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:88)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:72)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.SecurityServletFilter.doHttpFilter(SecurityServletFilter.java:76)
at org.sonar.server.platform.web.SecurityServletFilter.doFilter(SecurityServletFilter.java:48)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RedirectFilter.doFilter(RedirectFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RequestIdFilter.doFilter(RequestIdFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.sonar.server.platform.web.RootFilter.doFilter(RootFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at ch.qos.logback.access.tomcat.LogbackValve.invoke(LogbackValve.java:256)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:808)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Implicit conversion from data type varbinary to datetime2 is not allowed. Use the CONVERT function to run this query.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1621)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:592)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:522)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7194)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2935)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:248)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:223)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:503)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:94)
at jdk.internal.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonar.db.profiling.InvocationUtils.invokeQuietly(InvocationUtils.java:34)
at org.sonar.db.profiling.ProfilingPreparedStatementHandler.invoke(ProfilingPreparedStatementHandler.java:45)
at com.sun.proxy.$Proxy76.execute(Unknown Source)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:52)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
… 53 common frames omitted
2020.07.06 17:52:30 TRACE web[AXMmF1XMjruwbwjQAABt][o.s.s.p.w.UserSessionFilter] Thread[http-nio-0.0.0.0-9000-exec-3,5,main] serves /
2020.07.06 17:52:30 TRACE web[AXMmF1XMjruwbwjQAABt][sql] time=0ms | sql=select p.prop_key as “key”, p.is_empty as empty, p.text_value as textValue, p.clob_value as clobValue, p.resource_id as resourceId, p.user_id as userId from properties p where p.prop_key=? and p.resource_id is null and p.user_id is null | params=sonar.forceAuthentication
2020.07.06 17:52:31 TRACE web[sql] time=0ms | sql=select top (?) id, data from notifications order by id asc | params=1