SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-1838

The Sonar ant task can't be executed if the Ant classloader contains some classes not compatible with Sonar

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: ANT-TASK-2.0
    • Component/s: Ant Task
    • Labels:
      None
    • Number of attachments :
      1

      Description

      The following error occurs when running sonar-ant-task-1.4 with ant:

      java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/Cache;
      

      Here is the full output:

           [java] test-sonar:
           [java] [sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 3 2011
           [java] [sonar:sonar] Sonar Ant Task version: 1.4
           [java] [sonar:sonar] Loaded from: file:/var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/lib/temp/sonar-ant-task-1.4.jar
           [java] [sonar:sonar] Sonar work directory: /var/lib/jenkins/jobs/inv-common/workspace/03_modules/de.invesdwin.common/dist/junit/.sonar
           [java] [sonar:sonar] Sonar server: http://invesdwin.de:8083
           [java] [sonar:sonar] Sonar version: 3.0.1
      
           [java] [sonar:sonar] 13:21:37.481 DEBUG .b.b.TempDirectories - Temporary directory: /tmp/sonar-batch4437758378298826869161912805619218
           [java] [sonar:sonar] 13:21:37.483 DEBUG b.ArtifactDownloader - Downloading JDBC driver to /tmp/sonar-batch4437758378298826869161912805619218/jdbc-driver.jar
           [java] [sonar:sonar] 13:21:37.483 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/jdbc-driver.jar (no proxy)
           [java] [sonar:sonar] 13:21:37.516 INFO      o.s.c.p.Database - Create JDBC datasource
           [java] [sonar:sonar] 13:21:38.013 INFO  actDatabaseConnector - Initializing Hibernate
           [java] [sonar:sonar] 13:21:38.015 DEBUG actDatabaseConnector - hibernate.generate_statistics: false
           [java] [sonar:sonar] 13:21:38.015 DEBUG actDatabaseConnector - hibernate.dialect: org.sonar.core.persistence.dialect.MySql$MySqlWithDecimalDialect
           [java] [sonar:sonar] 13:21:38.015 DEBUG actDatabaseConnector - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider
           [java] [sonar:sonar] 13:21:38.015 DEBUG actDatabaseConnector - hibernate.hbm2ddl.auto: validate
      
           [java] [sonar:sonar] 13:21:38.630 DEBUG b.ArtifactDownloader - Downloading index of plugins
           [java] [sonar:sonar] 13:21:38.630 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/index.txt (no proxy)
           [java] [sonar:sonar] 13:21:38.635 DEBUG b.ArtifactDownloader - Downloading plugin findbugs into /tmp/sonar-batch4437758378298826869161912805619218/plugins/findbugs
           [java] [sonar:sonar] 13:21:38.635 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/findbugs/sonar-findbugs-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.686 DEBUG atchPluginRepository - Excluded plugin: findbugs
           [java] [sonar:sonar] 13:21:38.686 DEBUG b.ArtifactDownloader - Downloading plugin jacoco into /tmp/sonar-batch4437758378298826869161912805619218/plugins/jacoco
           [java] [sonar:sonar] 13:21:38.686 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/jacoco/sonar-jacoco-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.690 DEBUG atchPluginRepository - Excluded plugin: jacoco
           [java] [sonar:sonar] 13:21:38.691 DEBUG b.ArtifactDownloader - Downloading plugin l10nen into /tmp/sonar-batch4437758378298826869161912805619218/plugins/l10nen
           [java] [sonar:sonar] 13:21:38.691 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/l10nen/sonar-l10n-en-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.693 DEBUG atchPluginRepository - Excluded plugin: l10nen
           [java] [sonar:sonar] 13:21:38.693 DEBUG b.ArtifactDownloader - Downloading plugin surefire into /tmp/sonar-batch4437758378298826869161912805619218/plugins/surefire
           [java] [sonar:sonar] 13:21:38.693 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/surefire/sonar-surefire-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.694 DEBUG atchPluginRepository - Excluded plugin: surefire
           [java] [sonar:sonar] 13:21:38.694 DEBUG b.ArtifactDownloader - Downloading plugin cpd into /tmp/sonar-batch4437758378298826869161912805619218/plugins/cpd
           [java] [sonar:sonar] 13:21:38.695 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/cpd/sonar-cpd-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.696 DEBUG atchPluginRepository - Excluded plugin: cpd
           [java] [sonar:sonar] 13:21:38.696 DEBUG b.ArtifactDownloader - Downloading plugin checkstyle into /tmp/sonar-batch4437758378298826869161912805619218/plugins/checkstyle
           [java] [sonar:sonar] 13:21:38.696 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/checkstyle/sonar-checkstyle-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.698 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/checkstyle/README.txt (no proxy)
           [java] [sonar:sonar] 13:21:38.706 DEBUG atchPluginRepository - Excluded plugin: checkstyle
           [java] [sonar:sonar] 13:21:38.707 DEBUG b.ArtifactDownloader - Downloading plugin pmd into /tmp/sonar-batch4437758378298826869161912805619218/plugins/pmd
           [java] [sonar:sonar] 13:21:38.707 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/pmd/sonar-pmd-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.710 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/pmd/README.txt (no proxy)
           [java] [sonar:sonar] 13:21:38.721 DEBUG atchPluginRepository - Excluded plugin: pmd
           [java] [sonar:sonar] 13:21:38.721 DEBUG b.ArtifactDownloader - Downloading plugin core into /tmp/sonar-batch4437758378298826869161912805619218/plugins/core
           [java] [sonar:sonar] 13:21:38.721 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/core/sonar-core-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.723 DEBUG atchPluginRepository - Excluded plugin: core
           [java] [sonar:sonar] 13:21:38.723 DEBUG b.ArtifactDownloader - Downloading plugin dbcleaner into /tmp/sonar-batch4437758378298826869161912805619218/plugins/dbcleaner
           [java] [sonar:sonar] 13:21:38.723 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/dbcleaner/sonar-dbcleaner-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.724 DEBUG atchPluginRepository - Excluded plugin: dbcleaner
           [java] [sonar:sonar] 13:21:38.724 DEBUG b.ArtifactDownloader - Downloading plugin cobertura into /tmp/sonar-batch4437758378298826869161912805619218/plugins/cobertura
           [java] [sonar:sonar] 13:21:38.724 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/cobertura/sonar-cobertura-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.725 DEBUG atchPluginRepository - Excluded plugin: cobertura
           [java] [sonar:sonar] 13:21:38.725 DEBUG b.ArtifactDownloader - Downloading plugin squidjava into /tmp/sonar-batch4437758378298826869161912805619218/plugins/squidjava
           [java] [sonar:sonar] 13:21:38.725 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/squidjava/sonar-squid-java-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.736 DEBUG atchPluginRepository - Excluded plugin: squidjava
           [java] [sonar:sonar] 13:21:38.736 DEBUG b.ArtifactDownloader - Downloading plugin emailnotifications into /tmp/sonar-batch4437758378298826869161912805619218/plugins/emailnotifications
           [java] [sonar:sonar] 13:21:38.736 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/emailnotifications/sonar-email-notifications-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.742 DEBUG atchPluginRepository - Excluded plugin: emailnotifications
           [java] [sonar:sonar] 13:21:38.742 DEBUG b.ArtifactDownloader - Downloading plugin design into /tmp/sonar-batch4437758378298826869161912805619218/plugins/design
           [java] [sonar:sonar] 13:21:38.742 DEBUG s.a.u.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/design/sonar-design-plugin-3.0.1.jar (no proxy)
           [java] [sonar:sonar] 13:21:38.744 DEBUG atchPluginRepository - Excluded plugin: design
           [java] [sonar:sonar] 13:21:39.280 INFO  .s.b.b.ProjectModule - -------------  Analyzing de.invesdwin.common
      
           [java] [sonar:sonar] 13:21:39.819 INFO  .s.b.ProfileProvider - Selected quality profile : [name=Sonar way with Findbugs,language=java]
           [java] [sonar:sonar] 13:21:39.838 INFO  nPluginsConfigurator - Configure maven plugins...
           [java] [sonar:sonar] 13:21:39.926 INFO        org.sonar.INFO - Compare to previous analysis
           [java] [sonar:sonar] 13:21:39.957 INFO        org.sonar.INFO - Compare over 5 days (2012-05-11)
           [java] [sonar:sonar] 13:21:39.982 INFO        org.sonar.INFO - Compare over 30 days (2012-04-16)
           [java] [sonar:sonar] 13:21:40.020 DEBUG b.b.JdbcDriverHolder - To prevent a memory leak, the JDBC Driver [com.mysql.jdbc.Driver] has been forcibly deregistered
           [java] [sonar:sonar] 13:21:40.024 DEBUG .b.b.TempDirectories - Delete temporary directory: /tmp/sonar-batch4437758378298826869161912805619218
           [java] 
           [java] BUILD FAILED
           [java] /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.module.xml:379: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/Cache;
           [java] 	at org.sonar.core.review.ReviewDao.<init>(ReviewDao.java:43)
           [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
           [java] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
           [java] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
           [java] 	at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147)
           [java] 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:348)
           [java] 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272)
           [java] 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370)
           [java] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
           [java] 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
           [java] 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
           [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:692)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
           [java] 	at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
           [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
           [java] 	at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
           [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
           [java] 	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:105)
           [java] 	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
           [java] 	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:75)
           [java] 	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:315)
           [java] 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:341)
           [java] 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272)
           [java] 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370)
           [java] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
           [java] 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
           [java] 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
           [java] 	at org.picocontainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:606)
           [java] 	at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)
           [java] 	at org.sonar.api.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:121)
           [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.completeBatchExtensions(BatchExtensionDictionnary.java:91)
           [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.getExtensions(BatchExtensionDictionnary.java:85)
           [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:98)
           [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:57)
           [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.selectMavenPluginHandlers(BatchExtensionDictionnary.java:65)
           [java] 	at org.sonar.batch.phases.MavenPluginsConfigurator.execute(MavenPluginsConfigurator.java:49)
           [java] 	at org.sonar.batch.phases.Phases.execute(Phases.java:88)
           [java] 	at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
           [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
           [java] 	at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
           [java] 	at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
           [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
           [java] 	at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:109)
           [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
           [java] 	at org.sonar.batch.Batch.execute(Batch.java:104)
           [java] 	at org.sonar.ant.Launcher.execute(Launcher.java:78)
           [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
           [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [java] 	at java.lang.reflect.Method.invoke(Method.java:616)
           [java] 	at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:244)
           [java] 	at org.sonar.ant.SonarTask.execute(SonarTask.java:193)
           [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
           [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           [java] 	at java.lang.reflect.Method.invoke(Method.java:616)
           [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
           [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
           [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
           [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
           [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
           [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
           [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
           [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
           [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
           [java] 	at org.apache.tools.ant.Main.start(Main.java:180)
           [java] 	at org.apache.tools.ant.Main.main(Main.java:268)
           [java] 
           [java] Total time: 29 seconds
      

      Maybe sonar-ant-task needs to fetch the correct guava/google-commons lib or needs an upgrade to a recent version of the lib?

        Activity

        Hide
        subes added a comment - - edited

        The project being tested with sonar has guava-11.0.1 in its sonar.libraries property dir lying.

        The task that executes sonar looks as follows:

                <target name="test-sonar" depends="test">
        		<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
        			<classpath>
        				<fileset dir="${metaproject.lib.temp.dir}" includes="sonar-ant-task-*.jar" />
        			</classpath>
        		</taskdef>
        		<property name="sonar.projectKey" value="${ivy.organisation}:${ivy.module}" />
        		<property name="sonar.sources" value="${src.dir}" />
        		<property name="sonar.tests" value="${test.dir}" />
        		<property name="sonar.binaries" value="${dist.junit.bin.dir}" />
        		<property name="sonar.libraries" value="${dist.junit.lib.dir}" />
        		<!-- http://stackoverflow.com/questions/8864765/project-coverage-is-set-to-0-jacoco-and-sonar-in-jenkins -->
        		<property name="sonar.dynamicAnalysis" value="reuseReports" />
        		<property name="sonar.surefire.reportsPath" value="${dist.junit.dir}" />
        		<property name="sonar.core.codeCoveragePlugin" value="jacoco" />
        		<property name="sonar.jacoco.reportPath" value="${dist.junit.dir}/jacoco.exec" />
        		<sonar:sonar basedir="${dist.junit.dir}" key="${ivy.organisation}:${ivy.module}" version="${ivy.revision}" xmlns:sonar="antlib:org.sonar.ant" />
        	</target>
        

        While the test task prepares everything, runs the tests and analyzes code coverage with jacoco automatically.

        The test-sonar task as above runs fine for other modules, even though they also have guava-11.0.1 in their sonar.libraries dir.

        Show
        subes added a comment - - edited The project being tested with sonar has guava-11.0.1 in its sonar.libraries property dir lying. The task that executes sonar looks as follows: <target name= "test-sonar" depends= "test" > <taskdef uri= "antlib:org.sonar.ant" resource= "org/sonar/ant/antlib.xml" > <classpath> <fileset dir= "${metaproject.lib.temp.dir}" includes= "sonar-ant-task-*.jar" /> </classpath> </taskdef> <property name= "sonar.projectKey" value= "${ivy.organisation}:${ivy.module}" /> <property name= "sonar.sources" value= "${src.dir}" /> <property name= "sonar.tests" value= "${test.dir}" /> <property name= "sonar.binaries" value= "${dist.junit.bin.dir}" /> <property name= "sonar.libraries" value= "${dist.junit.lib.dir}" /> <!-- http: //stackoverflow.com/questions/8864765/project-coverage-is-set-to-0-jacoco-and-sonar-in-jenkins --> <property name= "sonar.dynamicAnalysis" value= "reuseReports" /> <property name= "sonar.surefire.reportsPath" value= "${dist.junit.dir}" /> <property name= "sonar.core.codeCoveragePlugin" value= "jacoco" /> <property name= "sonar.jacoco.reportPath" value= "${dist.junit.dir}/jacoco.exec" /> <sonar:sonar basedir= "${dist.junit.dir}" key= "${ivy.organisation}:${ivy.module}" version= "${ivy.revision}" xmlns:sonar= "antlib:org.sonar.ant" /> </target> While the test task prepares everything, runs the tests and analyzes code coverage with jacoco automatically. The test-sonar task as above runs fine for other modules, even though they also have guava-11.0.1 in their sonar.libraries dir.
        Hide
        subes added a comment -

        attached the complete ant run log

        Show
        subes added a comment - attached the complete ant run log
        Hide
        subes added a comment -

        This also happens with sonar-2.14:

             [java] test-sonar:
             [java] [sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 3 2011
             [java] [sonar:sonar] Sonar Ant Task version: 1.4
             [java] [sonar:sonar] Loaded from: file:/var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/lib/temp/sonar-ant-task-1.4.jar
             [java] [sonar:sonar] Sonar work directory: /var/lib/jenkins/jobs/inv-common/workspace/03_modules/de.invesdwin.common/dist/junit/.sonar
             [java] [sonar:sonar] Sonar server: http://invesdwin.de:8083
             [java] [sonar:sonar] Sonar version: 2.14
        
             [java] [sonar:sonar] 15:09:58.847 DEBUG        o.s.b.b.TempDirectories - Temporary directory: /tmp/sonar-batch1723840745761222189168414171679672
             [java] [sonar:sonar] 15:09:58.850 DEBUG     o.s.b.b.ArtifactDownloader - Downloading JDBC driver to /tmp/sonar-batch1723840745761222189168414171679672/jdbc-driver.jar
             [java] [sonar:sonar] 15:09:58.850 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/jdbc-driver.jar (no proxy)
             [java] [sonar:sonar] 15:09:58.882 WARN         o.s.c.p.DefaultDatabase - Derby database should be used for evaluation purpose only
             [java] [sonar:sonar] 15:09:58.882 INFO   o.s.core.persistence.Database - Create JDBC datasource
             [java] [sonar:sonar] 15:09:59.272 INFO                  org.sonar.INFO - Initializing Hibernate
             [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.generate_statistics: false
             [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.dialect: org.sonar.core.persistence.dialect.Derby$DerbyWithDecimalDialect
             [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider
             [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.hbm2ddl.auto: validate
        
             [java] [sonar:sonar] 15:10:00.239 DEBUG     o.s.b.b.ArtifactDownloader - Downloading index of plugins
             [java] [sonar:sonar] 15:10:00.239 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/index.txt (no proxy)
             [java] [sonar:sonar] 15:10:00.245 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin findbugs into /tmp/sonar-batch1723840745761222189168414171679672/plugins/findbugs
             [java] [sonar:sonar] 15:10:00.245 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/findbugs/sonar-findbugs-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.291 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: findbugs
             [java] [sonar:sonar] 15:10:00.291 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin jacoco into /tmp/sonar-batch1723840745761222189168414171679672/plugins/jacoco
             [java] [sonar:sonar] 15:10:00.291 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/jacoco/sonar-jacoco-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.295 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: jacoco
             [java] [sonar:sonar] 15:10:00.295 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin l10nen into /tmp/sonar-batch1723840745761222189168414171679672/plugins/l10nen
             [java] [sonar:sonar] 15:10:00.295 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/l10nen/sonar-l10n-en-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.297 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: l10nen
             [java] [sonar:sonar] 15:10:00.297 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin surefire into /tmp/sonar-batch1723840745761222189168414171679672/plugins/surefire
             [java] [sonar:sonar] 15:10:00.297 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/surefire/sonar-surefire-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.299 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: surefire
             [java] [sonar:sonar] 15:10:00.299 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin cpd into /tmp/sonar-batch1723840745761222189168414171679672/plugins/cpd
             [java] [sonar:sonar] 15:10:00.299 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/cpd/sonar-cpd-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.301 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: cpd
             [java] [sonar:sonar] 15:10:00.301 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin checkstyle into /tmp/sonar-batch1723840745761222189168414171679672/plugins/checkstyle
             [java] [sonar:sonar] 15:10:00.301 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/checkstyle/sonar-checkstyle-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.306 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/checkstyle/README.txt (no proxy)
             [java] [sonar:sonar] 15:10:00.319 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: checkstyle
             [java] [sonar:sonar] 15:10:00.319 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin pmd into /tmp/sonar-batch1723840745761222189168414171679672/plugins/pmd
             [java] [sonar:sonar] 15:10:00.319 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/pmd/sonar-pmd-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.325 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/pmd/README.txt (no proxy)
             [java] [sonar:sonar] 15:10:00.342 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: pmd
             [java] [sonar:sonar] 15:10:00.342 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin core into /tmp/sonar-batch1723840745761222189168414171679672/plugins/core
             [java] [sonar:sonar] 15:10:00.342 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/core/sonar-core-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.345 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: core
             [java] [sonar:sonar] 15:10:00.346 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin dbcleaner into /tmp/sonar-batch1723840745761222189168414171679672/plugins/dbcleaner
             [java] [sonar:sonar] 15:10:00.346 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/dbcleaner/sonar-dbcleaner-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.347 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: dbcleaner
             [java] [sonar:sonar] 15:10:00.348 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin cobertura into /tmp/sonar-batch1723840745761222189168414171679672/plugins/cobertura
             [java] [sonar:sonar] 15:10:00.348 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/cobertura/sonar-cobertura-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.349 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: cobertura
             [java] [sonar:sonar] 15:10:00.349 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin squidjava into /tmp/sonar-batch1723840745761222189168414171679672/plugins/squidjava
             [java] [sonar:sonar] 15:10:00.350 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/squidjava/sonar-squid-java-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.367 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: squidjava
             [java] [sonar:sonar] 15:10:00.367 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin design into /tmp/sonar-batch1723840745761222189168414171679672/plugins/design
             [java] [sonar:sonar] 15:10:00.367 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/design/sonar-design-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.370 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: design
             [java] [sonar:sonar] 15:10:00.370 DEBUG     o.s.b.b.ArtifactDownloader - Downloading plugin emailnotifications into /tmp/sonar-batch1723840745761222189168414171679672/plugins/emailnotifications
             [java] [sonar:sonar] 15:10:00.370 DEBUG   o.s.api.utils.HttpDownloader - Download: http://invesdwin.de:8083/deploy/plugins/emailnotifications/sonar-email-notifications-plugin-2.14.jar (no proxy)
             [java] [sonar:sonar] 15:10:00.376 DEBUG  o.s.b.b.BatchPluginRepository - Excluded plugin: emailnotifications
        
             [java] [sonar:sonar] 15:10:00.855 INFO   o.s.b.bootstrap.ProjectModule - -------------  Analyzing de.invesdwin.common
             [java] [sonar:sonar] 15:10:01.619 INFO   o.sonar.batch.ProfileProvider - Selected quality profile : [name=Sonar way with Findbugs,language=java]
             [java] [sonar:sonar] 15:10:01.633 INFO  s.b.p.MavenPluginsConfigurator - Configure maven plugins...
             [java] [sonar:sonar] 15:10:01.727 INFO                  org.sonar.INFO - Compare to previous analysis
             [java] 
             [java] BUILD FAILED
             [java] /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.module.xml:379: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/Cache;
             [java] 	at org.sonar.core.review.ReviewDao.<init>(ReviewDao.java:43)
             [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
             [java] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
             [java] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
             [java] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
             [java] 	at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147)
             [java] 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:348)
             [java] 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272)
             [java] 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370)
             [java] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
             [java] 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
             [java] 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
             [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:692)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
             [java] 	at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
             [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621)
             [java] 	at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40)
             [java] 	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
             [java] 	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:105)
             [java] 	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
             [java] 	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:75)
             [java] 	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:315)
             [java] 	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:341)
             [java] 	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272)
             [java] 	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370)
             [java] 	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
             [java] 	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
             [java] 	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
             [java] 	at org.picocontainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:606)
             [java] 	at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587)
             [java] 	at org.sonar.api.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:121)
             [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.completeBatchExtensions(BatchExtensionDictionnary.java:91)
             [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.getExtensions(BatchExtensionDictionnary.java:85)
             [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:98)
             [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:57)
             [java] 	at org.sonar.api.batch.BatchExtensionDictionnary.selectMavenPluginHandlers(BatchExtensionDictionnary.java:65)
             [java] 	at org.sonar.batch.phases.MavenPluginsConfigurator.execute(MavenPluginsConfigurator.java:49)
             [java] 	at org.sonar.batch.phases.Phases.execute(Phases.java:88)
             [java] 	at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
             [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
             [java] 	at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
             [java] 	at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
             [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
             [java] 	at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102)
             [java] 	at org.sonar.batch.bootstrap.Module.start(Module.java:83)
             [java] 	at org.sonar.batch.Batch.execute(Batch.java:104)
             [java] 	at org.sonar.ant.Launcher.execute(Launcher.java:78)
             [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
             [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
             [java] 	at java.lang.reflect.Method.invoke(Method.java:616)
             [java] 	at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:244)
             [java] 	at org.sonar.ant.SonarTask.execute(SonarTask.java:193)
             [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
             [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
             [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
             [java] 	at java.lang.reflect.Method.invoke(Method.java:616)
             [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
             [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
             [java] 	at org.apache.tools.ant.Target.execute(Target.java:390)
             [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:411)
             [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
             [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
             [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
             [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
             [java] 	at org.apache.tools.ant.Main.runBuild(Main.java:809)
             [java] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
             [java] 	at org.apache.tools.ant.Main.start(Main.java:180)
             [java] 	at org.apache.tools.ant.Main.main(Main.java:268)
             [java] 
             [java] Total time: 30 seconds
             [java] [sonar:sonar] 15:10:01.759 INFO                  org.sonar.INFO - Compare over 5 days (2012-05-11)
             [java] [sonar:sonar] 15:10:01.788 INFO                  org.sonar.INFO - Compare over 30 days (2012-04-16)
             [java] [sonar:sonar] 15:10:01.827 DEBUG       o.s.b.b.JdbcDriverHolder - To prevent a memory leak, the JDBC Driver [org.apache.derby.jdbc.ClientDriver] has been forcibly deregistered
             [java] [sonar:sonar] 15:10:01.830 DEBUG        o.s.b.b.TempDirectories - Delete temporary directory: /tmp/sonar-batch1723840745761222189168414171679672
        
        BUILD FAILED
        /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/build.xml:99: The following error occurred while executing this line:
        /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/build.xml:121: The following error occurred while executing this line:
        /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:234: The following error occurred while executing this line:
        /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:242: The following error occurred while executing this line:
        /var/lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:252: Java returned: 1
        
        Total time: 7 minutes 58 seconds
        Build step 'Invoke Ant' marked build as failure
        Xvfb stopping
        Recording test results
        Finished: FAILURE
        
        Show
        subes added a comment - This also happens with sonar-2.14: [java] test-sonar: [java] [sonar:sonar] Apache Ant(TM) version 1.8.2 compiled on December 3 2011 [java] [sonar:sonar] Sonar Ant Task version: 1.4 [java] [sonar:sonar] Loaded from: file:/ var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/lib/temp/sonar-ant-task-1.4.jar [java] [sonar:sonar] Sonar work directory: / var /lib/jenkins/jobs/inv-common/workspace/03_modules/de.invesdwin.common/dist/junit/.sonar [java] [sonar:sonar] Sonar server: http: //invesdwin.de:8083 [java] [sonar:sonar] Sonar version: 2.14 [java] [sonar:sonar] 15:09:58.847 DEBUG o.s.b.b.TempDirectories - Temporary directory: /tmp/sonar-batch1723840745761222189168414171679672 [java] [sonar:sonar] 15:09:58.850 DEBUG o.s.b.b.ArtifactDownloader - Downloading JDBC driver to /tmp/sonar-batch1723840745761222189168414171679672/jdbc-driver.jar [java] [sonar:sonar] 15:09:58.850 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/jdbc-driver.jar (no proxy) [java] [sonar:sonar] 15:09:58.882 WARN o.s.c.p.DefaultDatabase - Derby database should be used for evaluation purpose only [java] [sonar:sonar] 15:09:58.882 INFO o.s.core.persistence.Database - Create JDBC datasource [java] [sonar:sonar] 15:09:59.272 INFO org.sonar.INFO - Initializing Hibernate [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.generate_statistics: false [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.dialect: org.sonar.core.persistence.dialect.Derby$DerbyWithDecimalDialect [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.connection.provider_class: org.sonar.jpa.session.CustomHibernateConnectionProvider [java] [sonar:sonar] 15:09:59.275 DEBUG .j.s.AbstractDatabaseConnector - hibernate.hbm2ddl.auto: validate [java] [sonar:sonar] 15:10:00.239 DEBUG o.s.b.b.ArtifactDownloader - Downloading index of plugins [java] [sonar:sonar] 15:10:00.239 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/index.txt (no proxy) [java] [sonar:sonar] 15:10:00.245 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin findbugs into /tmp/sonar-batch1723840745761222189168414171679672/plugins/findbugs [java] [sonar:sonar] 15:10:00.245 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/findbugs/sonar-findbugs-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.291 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: findbugs [java] [sonar:sonar] 15:10:00.291 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin jacoco into /tmp/sonar-batch1723840745761222189168414171679672/plugins/jacoco [java] [sonar:sonar] 15:10:00.291 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/jacoco/sonar-jacoco-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.295 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: jacoco [java] [sonar:sonar] 15:10:00.295 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin l10nen into /tmp/sonar-batch1723840745761222189168414171679672/plugins/l10nen [java] [sonar:sonar] 15:10:00.295 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/l10nen/sonar-l10n-en-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.297 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: l10nen [java] [sonar:sonar] 15:10:00.297 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin surefire into /tmp/sonar-batch1723840745761222189168414171679672/plugins/surefire [java] [sonar:sonar] 15:10:00.297 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/surefire/sonar-surefire-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.299 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: surefire [java] [sonar:sonar] 15:10:00.299 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin cpd into /tmp/sonar-batch1723840745761222189168414171679672/plugins/cpd [java] [sonar:sonar] 15:10:00.299 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/cpd/sonar-cpd-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.301 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: cpd [java] [sonar:sonar] 15:10:00.301 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin checkstyle into /tmp/sonar-batch1723840745761222189168414171679672/plugins/checkstyle [java] [sonar:sonar] 15:10:00.301 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/checkstyle/sonar-checkstyle-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.306 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/checkstyle/README.txt (no proxy) [java] [sonar:sonar] 15:10:00.319 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: checkstyle [java] [sonar:sonar] 15:10:00.319 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin pmd into /tmp/sonar-batch1723840745761222189168414171679672/plugins/pmd [java] [sonar:sonar] 15:10:00.319 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/pmd/sonar-pmd-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.325 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/pmd/README.txt (no proxy) [java] [sonar:sonar] 15:10:00.342 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: pmd [java] [sonar:sonar] 15:10:00.342 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin core into /tmp/sonar-batch1723840745761222189168414171679672/plugins/core [java] [sonar:sonar] 15:10:00.342 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/core/sonar-core-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.345 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: core [java] [sonar:sonar] 15:10:00.346 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin dbcleaner into /tmp/sonar-batch1723840745761222189168414171679672/plugins/dbcleaner [java] [sonar:sonar] 15:10:00.346 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/dbcleaner/sonar-dbcleaner-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.347 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: dbcleaner [java] [sonar:sonar] 15:10:00.348 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin cobertura into /tmp/sonar-batch1723840745761222189168414171679672/plugins/cobertura [java] [sonar:sonar] 15:10:00.348 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/cobertura/sonar-cobertura-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.349 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: cobertura [java] [sonar:sonar] 15:10:00.349 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin squidjava into /tmp/sonar-batch1723840745761222189168414171679672/plugins/squidjava [java] [sonar:sonar] 15:10:00.350 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/squidjava/sonar-squid-java-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.367 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: squidjava [java] [sonar:sonar] 15:10:00.367 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin design into /tmp/sonar-batch1723840745761222189168414171679672/plugins/design [java] [sonar:sonar] 15:10:00.367 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/design/sonar-design-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.370 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: design [java] [sonar:sonar] 15:10:00.370 DEBUG o.s.b.b.ArtifactDownloader - Downloading plugin emailnotifications into /tmp/sonar-batch1723840745761222189168414171679672/plugins/emailnotifications [java] [sonar:sonar] 15:10:00.370 DEBUG o.s.api.utils.HttpDownloader - Download: http: //invesdwin.de:8083/deploy/plugins/emailnotifications/sonar-email-notifications-plugin-2.14.jar (no proxy) [java] [sonar:sonar] 15:10:00.376 DEBUG o.s.b.b.BatchPluginRepository - Excluded plugin: emailnotifications [java] [sonar:sonar] 15:10:00.855 INFO o.s.b.bootstrap.ProjectModule - ------------- Analyzing de.invesdwin.common [java] [sonar:sonar] 15:10:01.619 INFO o.sonar.batch.ProfileProvider - Selected quality profile : [name=Sonar way with Findbugs,language=java] [java] [sonar:sonar] 15:10:01.633 INFO s.b.p.MavenPluginsConfigurator - Configure maven plugins... [java] [sonar:sonar] 15:10:01.727 INFO org.sonar.INFO - Compare to previous analysis [java] [java] BUILD FAILED [java] / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.module.xml:379: java.lang.NoSuchMethodError: com.google.common.cache.CacheBuilder.build(Lcom/google/common/cache/CacheLoader;)Lcom/google/common/cache/Cache; [java] at org.sonar.core.review.ReviewDao.<init>(ReviewDao.java:43) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [java] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [java] at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [java] at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147) [java] at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:348) [java] at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272) [java] at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370) [java] at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56) [java] at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64) [java] at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91) [java] at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:692) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621) [java] at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40) [java] at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:621) [java] at org.picocontainer.containers.ImmutablePicoContainer.getComponent(ImmutablePicoContainer.java:40) [java] at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:711) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646) [java] at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632) [java] at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:105) [java] at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136) [java] at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:75) [java] at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:315) [java] at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:341) [java] at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:272) [java] at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:370) [java] at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56) [java] at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64) [java] at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91) [java] at org.picocontainer.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:606) [java] at org.picocontainer.DefaultPicoContainer.getComponents(DefaultPicoContainer.java:587) [java] at org.sonar.api.platform.ComponentContainer.getComponentsByType(ComponentContainer.java:121) [java] at org.sonar.api.batch.BatchExtensionDictionnary.completeBatchExtensions(BatchExtensionDictionnary.java:91) [java] at org.sonar.api.batch.BatchExtensionDictionnary.getExtensions(BatchExtensionDictionnary.java:85) [java] at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:98) [java] at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:57) [java] at org.sonar.api.batch.BatchExtensionDictionnary.selectMavenPluginHandlers(BatchExtensionDictionnary.java:65) [java] at org.sonar.batch.phases.MavenPluginsConfigurator.execute(MavenPluginsConfigurator.java:49) [java] at org.sonar.batch.phases.Phases.execute(Phases.java:88) [java] at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) [java] at org.sonar.batch.bootstrap.Module.start(Module.java:83) [java] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115) [java] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105) [java] at org.sonar.batch.bootstrap.Module.start(Module.java:83) [java] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102) [java] at org.sonar.batch.bootstrap.Module.start(Module.java:83) [java] at org.sonar.batch.Batch.execute(Batch.java:104) [java] at org.sonar.ant.Launcher.execute(Launcher.java:78) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:616) [java] at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:244) [java] at org.sonar.ant.SonarTask.execute(SonarTask.java:193) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [java] at java.lang.reflect.Method.invoke(Method.java:616) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.Target.execute(Target.java:390) [java] at org.apache.tools.ant.Target.performTasks(Target.java:411) [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1368) [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251) [java] at org.apache.tools.ant.Main.runBuild(Main.java:809) [java] at org.apache.tools.ant.Main.startAnt(Main.java:217) [java] at org.apache.tools.ant.Main.start(Main.java:180) [java] at org.apache.tools.ant.Main.main(Main.java:268) [java] [java] Total time: 30 seconds [java] [sonar:sonar] 15:10:01.759 INFO org.sonar.INFO - Compare over 5 days (2012-05-11) [java] [sonar:sonar] 15:10:01.788 INFO org.sonar.INFO - Compare over 30 days (2012-04-16) [java] [sonar:sonar] 15:10:01.827 DEBUG o.s.b.b.JdbcDriverHolder - To prevent a memory leak, the JDBC Driver [org.apache.derby.jdbc.ClientDriver] has been forcibly deregistered [java] [sonar:sonar] 15:10:01.830 DEBUG o.s.b.b.TempDirectories - Delete temporary directory: /tmp/sonar-batch1723840745761222189168414171679672 BUILD FAILED / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/build.xml:99: The following error occurred while executing this line: / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/build.xml:121: The following error occurred while executing this line: / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:234: The following error occurred while executing this line: / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:242: The following error occurred while executing this line: / var /lib/jenkins/jobs/inv-common/workspace/01_metaproject/src/build.basis.xml:252: Java returned: 1 Total time: 7 minutes 58 seconds Build step 'Invoke Ant' marked build as failure Xvfb stopping Recording test results Finished: FAILURE
        Hide
        subes added a comment -

        This also happens with sonar-ant-task-1.3.

        Show
        subes added a comment - This also happens with sonar-ant-task-1.3.
        Hide
        subes added a comment -

        I found a workaround to this by running the junit tests in a separate jvm:

        <target name="test-sonar" depends="-init-ivy-settings">
        		<ANT_FORK antfile="${basedir}/build.xml" target="test" />
        		<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
        			<classpath>
        				<fileset dir="${metaproject.lib.temp.dir}">
        					<include name="sonar-ant-task-*.jar" />
        				</fileset>
        			</classpath>
        		</taskdef>
        		<property name="sonar.projectKey" value="${ivy.organisation}:${ivy.module}" />
        		<property name="sonar.sources" value="${src.dir}" />
        		<property name="sonar.tests" value="${test.dir}" />
        		<property name="sonar.binaries" value="${dist.junit.bin.dir}" />
        		<property name="sonar.libraries" value="${dist.junit.lib.dir}" />
        		<!-- http://stackoverflow.com/questions/8864765/project-coverage-is-set-to-0-jacoco-and-sonar-in-jenkins -->
        		<property name="sonar.dynamicAnalysis" value="reuseReports" />
        		<property name="sonar.surefire.reportsPath" value="${dist.junit.dir}" />
        		<property name="sonar.core.codeCoveragePlugin" value="jacoco" />
        		<property name="sonar.jacoco.reportPath" value="${dist.junit.dir}/jacoco.exec" />
        		<sonar:sonar basedir="${dist.junit.dir}" key="${ivy.organisation}:${ivy.module}" version="${ivy.revision}" xmlns:sonar="antlib:org.sonar.ant" />
        	</target>
        
        <macrodef name="ANT_FORK" description="Emulates the ant task, while forking instances for each call. This prevents OutOfMemory Exceptions.">
        		<attribute name="antfile" />
        		<attribute name="target" />
        		<sequential>
        			<java failonerror="true" spawn="false" fork="true" classname="org.apache.tools.ant.Main">
        				<classpath>
        					<fileset dir="${ant.library.dir}">
        						<include name="*.jar" />
        					</fileset>
        				</classpath>
        				<sysproperty key="ant.library.dir" value="${ant.library.dir}" />
        				<arg value="-f" />
        				<arg value="@{antfile}" />
        				<arg value="@{target}" />
        			</java>
        			<delete dir="${basedir}/log" quiet="true" />
        		</sequential>
        	</macrodef>
        

        It seems this is a classloader issue. Only the tests in that particular project use the Cache class from guava. That seems to pollute the ant classloader which in turn causes the sonar task to run with the wrong guava class version.

        Show
        subes added a comment - I found a workaround to this by running the junit tests in a separate jvm: <target name= "test-sonar" depends= "-init-ivy-settings" > <ANT_FORK antfile= "${basedir}/build.xml" target= "test" /> <taskdef uri= "antlib:org.sonar.ant" resource= "org/sonar/ant/antlib.xml" > <classpath> <fileset dir= "${metaproject.lib.temp.dir}" > <include name= "sonar-ant-task-*.jar" /> </fileset> </classpath> </taskdef> <property name= "sonar.projectKey" value= "${ivy.organisation}:${ivy.module}" /> <property name= "sonar.sources" value= "${src.dir}" /> <property name= "sonar.tests" value= "${test.dir}" /> <property name= "sonar.binaries" value= "${dist.junit.bin.dir}" /> <property name= "sonar.libraries" value= "${dist.junit.lib.dir}" /> <!-- http: //stackoverflow.com/questions/8864765/project-coverage-is-set-to-0-jacoco-and-sonar-in-jenkins --> <property name= "sonar.dynamicAnalysis" value= "reuseReports" /> <property name= "sonar.surefire.reportsPath" value= "${dist.junit.dir}" /> <property name= "sonar.core.codeCoveragePlugin" value= "jacoco" /> <property name= "sonar.jacoco.reportPath" value= "${dist.junit.dir}/jacoco.exec" /> <sonar:sonar basedir= "${dist.junit.dir}" key= "${ivy.organisation}:${ivy.module}" version= "${ivy.revision}" xmlns:sonar= "antlib:org.sonar.ant" /> </target> <macrodef name= "ANT_FORK" description= "Emulates the ant task, while forking instances for each call. This prevents OutOfMemory Exceptions." > <attribute name= "antfile" /> <attribute name= "target" /> <sequential> <java failonerror= " true " spawn= " false " fork= " true " classname= "org.apache.tools.ant.Main" > <classpath> <fileset dir= "${ant.library.dir}" > <include name= "*.jar" /> </fileset> </classpath> <sysproperty key= "ant.library.dir" value= "${ant.library.dir}" /> <arg value= "-f" /> <arg value= "@{antfile}" /> <arg value= "@{target}" /> </java> <delete dir= "${basedir}/log" quiet= " true " /> </sequential> </macrodef> It seems this is a classloader issue. Only the tests in that particular project use the Cache class from guava. That seems to pollute the ant classloader which in turn causes the sonar task to run with the wrong guava class version.
        Hide
        Freddy Mallet added a comment -

        I haven't managed to reproduce the issue with previous version to be sure that this bug is really fixed but we can close it.

        Show
        Freddy Mallet added a comment - I haven't managed to reproduce the issue with previous version to be sure that this bug is really fixed but we can close it.
        Hide
        Simon Brandhof added a comment -

        Freddy, you can add guava 11 to Ant libs in order to reproduce the issue.

        Show
        Simon Brandhof added a comment - Freddy, you can add guava 11 to Ant libs in order to reproduce the issue.

          People

          • Assignee:
            Fabrice Bellingard
            Reporter:
            subes
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: