Javafaker doesn't work

Hello ,

I’m trying to use javafaker but it doesn’t work, it throws me an error and I haven’t really been able to fix it.

import com.github.javafaker.Faker

/**
 * sample code from http://makeseleniumeasy.com/2020/12/12/javafaker-api-generate-real-time-fake-data-faker-class/#Example_with_the_default_locale
 */

// Create an object of Faker class with default locale i.e ENG
Faker faker = new Faker();
// To generate valid random first name
System.out.println("First name is: "+faker.name().firstName());
// To generate valid random last name
System.out.println("Last name is: "+faker.name().lastName());
// To generate valid random city name
System.out.println("City name is: "+faker.address().cityName());
// To generate valid random state name
System.out.println("State name is: "+faker.address().state());
// To generate valid random country name
System.out.println("Country name is: "+faker.address().country());
// To generate valid random cell number
System.out.println("Cell number is: "+faker.phoneNumber().cellPhone());
// To generate valid random animal name
System.out.println("Animal name is: "+faker.animal().name());
	

Output

2022-12-07 09:05:03.973 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2022-12-07 09:05:03.977 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/javafaker
2022-12-07 09:05:04.494 DEBUG testcase.javafaker                       - 1: faker = new com.github.javafaker.Faker()
2022-12-07 09:05:04.520 DEBUG testcase.javafaker                       - 2: out.println("First name is: " + name().firstName())
First name is: Lashay
2022-12-07 09:05:04.683 DEBUG testcase.javafaker                       - 3: out.println("Last name is: " + name().lastName())
Last name is: Will
2022-12-07 09:05:04.685 DEBUG testcase.javafaker                       - 4: out.println("City name is: " + address().cityName())
City name is: Ismaelbury
2022-12-07 09:05:04.728 DEBUG testcase.javafaker                       - 5: out.println("State name is: " + address().state())
State name is: Louisiana
2022-12-07 09:05:04.738 DEBUG testcase.javafaker                       - 6: out.println("Country name is: " + address().country())
Country name is: Denmark
2022-12-07 09:05:04.743 DEBUG testcase.javafaker                       - 7: out.println("Cell number is: " + phoneNumber().cellPhone())
Cell number is: 297-236-6705
2022-12-07 09:05:04.772 DEBUG testcase.javafaker                       - 8: out.println("Animal name is: " + animal().name())
Animal name is: horse
2022-12-07 09:05:04.822 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/javafaker