Make sure to tell us:
- What version are you upgrading from?- 9.6 to 9.9
- System information (Operating system, Java version, Database provider/version):-using ubuntu 22.04, java 17, postgrlsql 14.
- What’s the issue you’re facing?
please find below error details
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.server.rule.RegisterRules': Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #6) failed. 5 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
'AYM6bmjsYUbNt8vgCGE7',
'AXoEd8IYzhHA0r9q15f_',
'default',
'<p>Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a local variable or function parameter name does
not match the provided regular expression.</p>
<h2>Exceptions</h2>
<p>Loop counters are ignored by this rule.</p>
<pre>
for i in range(limit): # Compliant
print(i)
</pre>',
NULL,
NULL
) was aborted: ERROR: duplicate key value violates unique constraint "pk_rule_desc_sections"
Detail: Key (uuid)=(AYM6bmjsYUbNt8vgCGE7) already exists. Call getNextException to see other errors in the batch.
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #6) failed. 5 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
'AYM6bmjsYUbNt8vgCGE7',
'AXoEd8IYzhHA0r9q15f_',
'default',
'<p>Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a local variable or function parameter name does
not match the provided regular expression.</p>
<h2>Exceptions</h2>
<p>Loop counters are ignored by this rule.</p>
<pre>
for i in range(limit): # Compliant
print(i)
</pre>',
NULL,
NULL
) was aborted: ERROR: duplicate key value violates unique constraint "pk_rule_desc_sections"
Detail: Key (uuid)=(AYM6bmjsYUbNt8vgCGE7) already exists. Call getNextException to see other errors in the batch.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:55)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:127)
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:124)
at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:183)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:344)
at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:107)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:328)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error committing transaction. Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #6) failed. 5 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
'AYM6bmjsYUbNt8vgCGE7',
'AXoEd8IYzhHA0r9q15f_',
'default',
'<p>Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a local variable or function parameter name does
not match the provided regular expression.</p>
<h2>Exceptions</h2>
<p>Loop counters are ignored by this rule.</p>
<pre>
for i in range(limit): # Compliant
print(i)
</pre>',
NULL,
NULL
) was aborted: ERROR: duplicate key value violates unique constraint "pk_rule_desc_sections"
Detail: Key (uuid)=(AYM6bmjsYUbNt8vgCGE7) already exists. Call getNextException to see other errors in the batch.
### Cause: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #6) failed. 5 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
'AYM6bmjsYUbNt8vgCGE7',
'AXoEd8IYzhHA0r9q15f_',
'default',
'<p>Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a local variable or function parameter name does
not match the provided regular expression.</p>
<h2>Exceptions</h2>
<p>Loop counters are ignored by this rule.</p>
<pre>
for i in range(limit): # Compliant
print(i)
</pre>',
NULL,
NULL
) was aborted: ERROR: duplicate key value violates unique constraint "pk_rule_desc_sections"
Detail: Key (uuid)=(AYM6bmjsYUbNt8vgCGE7) already exists. Call getNextException to see other errors in the batch.
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:223)
at org.apache.ibatis.session.defaults.DefaultSqlSession.commit(DefaultSqlSession.java:214)
at org.sonar.db.DbSessionImpl.commit(DbSessionImpl.java:42)
at org.sonar.db.BatchSession.commit(BatchSession.java:168)
at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:134)
at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
... 19 common frames omitted
Caused by: org.apache.ibatis.executor.BatchExecutorException: org.sonar.db.rule.RuleMapper.insertRuleDescriptionSection (batch index #6) failed. 5 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Batch entry 0 insert into rule_desc_sections (
uuid,
rule_uuid,
kee,
content,
context_key,
context_display_name
)
values (
'AYM6bmjsYUbNt8vgCGE7',
'AXoEd8IYzhHA0r9q15f_',
'default',
'<p>Shared naming conventions allow teams to collaborate effectively. This rule raises an issue when a local variable or function parameter name does
not match the provided regular expression.</p>
<h2>Exceptions</h2>
<p>Loop counters are ignored by this rule.</p>
<pre>
for i in range(limit): # Compliant
print(i)