1

I have installed jdk-12.0.2 64bit on Windows 7 64bit Service Pack 1, I am using Eclipse IDE for Enterprise Java Developers. Version: 2019-06 (4.12.0) Build id:20190614-1200.

I created a new java project having a new package and a new java class.

When I added the following Jars in Project Build Path:

selenium-server-standalone-3.141.59.jar

selenium-3.141.59-nodeps.jar

selenium-3.141.59-nodeps-sources.jar (with and without this jar)

all jar files of lib folder

Then import entry import org.openqa.selenium.WebDriver; shows following error

The package org.openqa.selenium is accessible from more than one module: okio, org.openqa.selenium.core, selenium

other import entry import org.openqa.selenium.chrome.ChromeDriver; shows following error The type org.openqa.selenium.chrome.ChromeDriver is not accessible

When I removed selenium-server-standalone-3.141.59.jar from project build path then got the following exception.

Error occurred during initialization of boot layer

java.lang.module.FindException: Unable to derive module descriptor for D:\SS\Selenium-3.0.0\lib\xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module

I have already worked with Selenium 3.0 using JDK 1.8. with (Chrome, IE, Gecho) browsers.

Here with jdk-12.0.2, I have also tried selenium 3.0, with alternative addition and removal of jars. Also tried by adding/removing of jars from Selenium-Server-xxx versions.

Following is the Java class code:

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;


public class loginPage {

    WebDriver wd;

    public void invokeBrowser() {
        System.setProperty("webdriver.chrome.driver", "D:\\SS\\Selenium-3.141.59\\chromedriver.exe");
        wd = new ChromeDriver();
        wd.manage().deleteAllCookies();
        wd.manage().window().fullscreen();
        wd.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
        wd.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);
        wd.get("http://myurl/");    }

    public static void main(String[] args) {
        loginPage mlp = new loginPage();
        mlp.invokeBrowser();    }
}
Naman
  • 27,789
  • 26
  • 218
  • 353
Ziaullah
  • 257
  • 6
  • 10
  • Why do you need Java 12? Selenium was written for Java 8. – SiKing Jul 25 '19 at 15:48
  • "nodeps" means no dependencies. You need to include Selenium's dependencies. Also don't include both server and client versions. Use one or the other. – pcalkins Jul 25 '19 at 19:07
  • actually now that I look into this more, not sure that "xalan..." has anything to do with Selenium. This has something to do with "org.apache.bsf.BSFManager" I think... "bean scripting framework"? – pcalkins Jul 25 '19 at 19:30
  • Does this answer your question? [Java 11 Unable to derive module descriptor](https://stackoverflow.com/questions/54682417/java-11-unable-to-derive-module-descriptor) – Naman Dec 07 '19 at 15:50

0 Answers0