It's all about the answers!

Ask a question

[closed] java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z


Shibani Chadha (1111) | asked Aug 02 '13, 10:45 a.m.
closed Dec 28 '22, 6:43 p.m. by Ralph Schoon (63.5k33646)
I am using RTC 3.0.1 with eclipse to run a build. My build runs fine through a command prompt but not through RTC! This is the error I get:

build.xml:46: java.lang.NoSuchMethodError: org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z
at org.sonar.runner.api.Dirs.initProjectDirs(Dirs.java:57)
at org.sonar.runner.api.Dirs.init(Dirs.java:32)
at org.sonar.runner.api.Runner.execute(Runner.java:88)
at org.sonar.ant.SonarTask.launchAnalysis(SonarTask.java:53)
at org.sonar.ant.SonarTask.execute(SonarTask.java:48)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
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.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

I found out RTC's lib is using a commons-io.jar-- org.apache.commons.io_1.2.0.v20101110_2242. and this method is only available after 1.4. Is there anyway to update this lib with the new version ?

The question has been closed for the following reason: "Problem is not reproducible or outdated" by rschoon Dec 28 '22, 6:43 p.m.

One answer



permanent link
Gidi Weber (11) | answered Jan 07 '14, 3:49 a.m.
You can specify your common-io jar in the Ant section of your Build Definition by adding the -lib argument in Ant Arguments: -lib <path-to-common-io.jar>.
- Gidi