Sonar scanner failed to Analyse

Hi Team,
Yesterday, I tried to analyze the project using a scanner: sonar-maven-plugin:3.9.1.2184:sonar
with SonarQube version: 9.5.0.56709.
but the process got failed due to the below reasons. Please help me to resolve this.

Error Details
org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='locations', mode=IN, javaType=class [B, jdbcType=BINARY, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType BINARY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "0a0a088d02108d021804201112e2050a4a120a088d02108d02180420111a1a2762756646696c6527... (2016230)" [22001-210]
### The error may exist in org.sonar.db.issue.IssueMapper
### The error may involve org.sonar.db.issue.IssueMapper.insert-Inline
### The error occurred while setting parameters
### Cause: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='locations', mode=IN, javaType=class [B, jdbcType=BINARY, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType BINARY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "0a0a088d02108d021804201112e2050a4a120a088d02108d02180420111a1a2762756646696c6527... (2016230)" [22001-210]
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:196)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
	at org.sonar.db.DbSessionImpl.insert(DbSessionImpl.java:132)
	at org.sonar.db.BatchSession.insert(BatchSession.java:126)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
	at com.sun.proxy.$Proxy63.insert(Unknown Source)
	at org.sonar.ce.task.projectanalysis.step.PersistIssuesStep.lambda$persistNewIssues$0(PersistIssuesStep.java:135)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.sonar.ce.task.projectanalysis.step.PersistIssuesStep.persistNewIssues(PersistIssuesStep.java:132)
	at org.sonar.ce.task.projectanalysis.step.PersistIssuesStep.execute(PersistIssuesStep.java:93)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:80)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:71)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:58)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='locations', mode=IN, javaType=class [B, jdbcType=BINARY, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType BINARY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "0a0a088d02108d021804201112e2050a4a120a088d02108d02180420111a1a2762756646696c6527... (2016230)" [22001-210]
	at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:89)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:94)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:64)
	at org.apache.ibatis.executor.BatchExecutor.doUpdate(BatchExecutor.java:65)
	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:194)
	... 30 more
Caused by: org.apache.ibatis.type.TypeException: Error setting non null for parameter #7 with JdbcType BINARY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "0a0a088d02108d021804201112e2050a4a120a088d02108d02180420111a1a2762756646696c6527... (2016230)" [22001-210]
	at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:75)
	at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87)
	... 36 more
Caused by: org.h2.jdbc.JdbcSQLDataException: Value too long for column "BINARY VARYING": "0a0a088d02108d021804201112e2050a4a120a088d02108d02180420111a1a2762756646696c6527... (2016230)" [22001-210]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:525)
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:496)
	at org.h2.message.DbException.get(DbException.java:227)
	at org.h2.message.DbException.getValueTooLongException(DbException.java:341)
	at org.h2.value.ValueVarbinary.<init>(ValueVarbinary.java:34)
	at org.h2.value.ValueVarbinary.getNoCopy(ValueVarbinary.java:65)
	at org.h2.value.ValueVarbinary.get(ValueVarbinary.java:51)
	at org.h2.jdbc.JdbcPreparedStatement.setBytes(JdbcPreparedStatement.java:1001)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.setBytes(DelegatingPreparedStatement.java:306)
	at org.apache.commons.dbcp2.DelegatingPreparedStatement.setBytes(DelegatingPreparedStatement.java:306)
	at org.apache.ibatis.type.ByteArrayTypeHandler.setNonNullParameter(ByteArrayTypeHandler.java:31)
	at org.apache.ibatis.type.ByteArrayTypeHandler.setNonNullParameter(ByteArrayTypeHandler.java:26)
	at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:73)
	... 37 more

Hey there.

Typically we see this error when users are using the internal H2 database (which is not meant for production use). It may be best that you properly connect it to an external database and see if the issue persists.

Hi Colin,

Thank you for your help! I used Oracle database and it worked.

Regards,
Tarique