0

I am receiving this error:

java.lang.NoSuchMethodError: 'java.lang.String org.apache.commons.io.IOUtils.toString(java.io.InputStream, java.nio.charset.Charset)'** on line "WebDriverManager.chromedriver().setup();

I am using WebDriverManager version 5.3.1 and the commons.io version 2.11.0.

2
  • Q: are you including Apache Commons (including, but not limited to, commons.io) in your classpath? If you're using Maven (or equivalent) for your build, then it should automatically identify, download and include library dependencies for you. Otherwise, you'll need to add the dependencies yourself, manually. Commented Dec 23, 2022 at 6:35
  • No, I haven't added that in the .classpath file. Do I have to? I have already added below code in the pom.xml <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.8.0</version> </dependency> Commented Dec 23, 2022 at 6:43

1 Answer 1

1

WebDriverManager 5.3.1 depends transitively on commons-io 2.6. You can try to force that version in your pom.

Sign up to request clarification or add additional context in comments.

2 Comments

I tried with commons-io 2.6, but it's throwing the same error
Even though I am getting same issue if I don't add commons.io dependency in my pom.xml

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.