Quantcast

org.sonar.api.utils.SonarException: The resource "XXXX" is duplicated in database.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

org.sonar.api.utils.SonarException: The resource "XXXX" is duplicated in database.

pbarama
This post has NOT been accepted by the mailing list yet.
I upgraded my sonar version 1.9.2 to 2.6, while running sonar:sonar I got below error. Appreciate your help

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project ArchitectureReferenceServiceBase: Can not execute Sonar: The resource 'com.pv.core.httpconnector:HttpConnectorServiceImpl' is duplicated in database. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project ArchitectureReferenceServiceBase: Can not execute Sonar
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
        at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
        at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: org.sonar.api.utils.SonarException: The resource 'com.pv.core.httpconnector:HttpConnectorServiceImpl' is duplicated in database.
        at org.sonar.batch.index.DefaultResourcePersister.findOrCreateModel(DefaultResourcePersister.java:226)
        at org.sonar.batch.index.DefaultResourcePersister.persistLibrary(DefaultResourcePersister.java:137)
        at org.sonar.batch.index.DefaultResourcePersister.persist(DefaultResourcePersister.java:127)
        at org.sonar.batch.index.DefaultResourcePersister.saveResource(DefaultResourcePersister.java:113)
        at org.sonar.batch.index.DefaultPersistenceManager.saveResource(DefaultPersistenceManager.java:72)
        at org.sonar.batch.index.DefaultIndex.doIndex(DefaultIndex.java:478)
        at org.sonar.batch.index.DefaultIndex.doIndex(DefaultIndex.java:444)
        at org.sonar.batch.index.DefaultIndex.addResource(DefaultIndex.java:379)
        at org.sonar.batch.DefaultSensorContext.saveResource(DefaultSensorContext.java:96)
        at org.sonar.plugins.design.batch.MavenDependenciesSensor.toResource(MavenDependenciesSensor.java:118)
        at org.sonar.plugins.design.batch.MavenDependenciesSensor.saveDependency(MavenDependenciesSensor.java:106)
        at org.sonar.plugins.design.batch.MavenDependenciesSensor$1.endVisit(MavenDependenciesSensor.java:81)
        at org.apache.maven.shared.dependency.tree.DependencyNode.accept(DependencyNode.java:317)
        at org.apache.maven.shared.dependency.tree.DependencyNode.accept(DependencyNode.java:313)
        at org.apache.maven.shared.dependency.tree.traversal.BuildingDependencyNodeVisitor.endVisit(BuildingDependencyNodeVisitor.java:116)
        at org.apache.maven.shared.dependency.tree.traversal.FilteringDependencyNodeVisitor.endVisit(FilteringDependencyNodeVisitor.java:93)
        at org.apache.maven.shared.dependency.tree.DependencyNode.accept(DependencyNode.java:317)
        at org.sonar.plugins.design.batch.MavenDependenciesSensor.analyse(MavenDependenciesSensor.java:97)
        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:60)
        at org.sonar.batch.phases.Phases.execute(Phases.java:75)
        at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:55)
        at org.sonar.batch.Batch.analyzeModule(Batch.java:161)
        at org.sonar.batch.Batch.analyzeModule(Batch.java:152)
        at org.sonar.batch.Batch.analyzeModules(Batch.java:106)
        at org.sonar.batch.Batch.execute(Batch.java:66)
        at org.sonar.maven3.SonarMojo.executeBatch(SonarMojo.java:144)
        at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:135)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
        ... 23 more
Loading...