[GRADLE-1585] NoSuchMethodError when running Sonar task Created: 01/Jun/11  Updated: 04/Jan/13  Resolved: 01/Nov/11

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-3
Fix Version/s: None

Type: Bug
Reporter: Peter Niederwieser Assignee: Peter Niederwieser
Resolution: Won't Fix Votes: 1


 Description   

When running the Sonar task against Sonar server 2.6 and later against 2.8, the following error occurs:

java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.write(Ljava/io/File;Ljava/lang/CharSequence;)V
        at org.sonar.plugins.pmd.PmdExecutor.writeXmlReport(PmdExecutor.java:140)
        at org.sonar.plugins.pmd.PmdExecutor.execute(PmdExecutor.java:83)
        at org.sonar.plugins.pmd.PmdSensor.analyse(PmdSensor.java:45)
        at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:58)
        at org.sonar.batch.phases.Phases.execute(Phases.java:80)
        at org.sonar.batch.ProjectBatch.execute(ProjectBatch.java:59)
        at org.sonar.batch.Batch.analyzeModule(Batch.java:164)
        at org.sonar.batch.Batch.analyzeModules(Batch.java:82)
        at org.sonar.batch.Batch.execute(Batch.java:62)
        at org.sonar.batch.Batch$execute.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.gradle.api.plugins.sonar.internal.SonarCodeAnalyzer.execute(SonarCodeAnalyzer.groovy:52)
        at org.gradle.api.plugins.sonar.internal.SonarCodeAnalyzer$execute.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.gradle.api.plugins.sonar.Sonar$_execute_closure1.doCall(Sonar.groovy:116)
        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.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.gradle.api.plugins.sonar.Sonar$_execute_closure1.doCall(Sonar.groovy)
        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.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
        at org.gradle.api.plugins.sonar.Sonar.withErrorSqlLogging(Sonar.groovy:253)
        at org.gradle.api.plugins.sonar.Sonar.this$5$withErrorSqlLogging(Sonar.groovy)
        at org.gradle.api.plugins.sonar.Sonar$this$5$withErrorSqlLogging.callCurrent(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
        at org.gradle.api.plugins.sonar.Sonar.execute(Sonar.groovy:104)
        at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)
        at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)
        at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)
        at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113)
        at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)
        at org.gradle.launcher.ExecuteBuildAction.run(ExecuteBuildAction.java:44)
        at org.gradle.launcher.DefaultGradleLauncherActionExecuter.execute(DefaultGradleLauncherActionExecuter.java:49)
        at org.gradle.launcher.DaemonMain.build(DaemonMain.java:143)
        at org.gradle.launcher.DaemonMain.doRunWithExceptionHandling(DaemonMain.java:132)
        at org.gradle.launcher.DaemonMain.doRunWithLogging(DaemonMain.java:114)
        at org.gradle.launcher.DaemonMain.doRun(DaemonMain.java:94)
        at org.gradle.launcher.DaemonMain.access$000(DaemonMain.java:45)
        at org.gradle.launcher.DaemonMain$1.handle(DaemonMain.java:75)
        at org.gradle.launcher.DaemonConnector$1.execute(DaemonConnector.java:165)
        at org.gradle.launcher.DaemonConnector$1.execute(DaemonConnector.java:161)
        at org.gradle.messaging.remote.internal.TcpIncomingConnector$Receiver.run(TcpIncomingConnector.java:102)
        at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:63)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


 Comments   
Comment by Peter Niederwieser [ 01/Nov/11 ]

This issue is obsolete.

Generated at Wed Jun 30 11:59:17 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.