Unable to run grid4 with 4.0.0-alpha-7 : gives exception | Selenium Forum
R
Rahul Deshpande Posted on 29/01/2021

The Grid 4 video uses the alpha-6 jar. But presently alpha-7 jar is available on selenium.dev.

I wanted to use the same jar as in video, but it is not available(also old versions) anywhere. So i have to use alpha-7 jar.

When i used this latest jar and gave the command "java -jar selenium-server-4.0.0-alpha-7.jar standalone", it gave following exception:

SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/D:/CommonSoftwares/Grid4/selenium-server-4.0.0-alpha-7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
18:26:35.350 INFO [LoggingOptions.getTracer] - Using OpenTelemetry for tracing
18:26:36.210 INFO [NodeOptions.report] - Adding Firefox for {"browserName": "firefox"} 4 times
18:26:36.212 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome"} 4 times
Exception in thread "main" java.lang.NoSuchMethodError: java.util.Optional.isEmpty()Z
at org.openqa.selenium.grid.docker.DockerOptions.isEnabled(DockerOptions.java:98)
at org.openqa.selenium.grid.docker.DockerOptions.getDockerSessionFactories(DockerOptions.java:113)
at org.openqa.selenium.grid.node.local.LocalNodeFactory.create(LocalNodeFactory.java:69)
at org.openqa.selenium.grid.commands.Standalone.createHandlers(Standalone.java:195)
at org.openqa.selenium.grid.TemplateGridServerCommand.asServer(TemplateGridServerCommand.java:41)
at org.openqa.selenium.grid.commands.Standalone.execute(Standalone.java:206)
at org.openqa.selenium.grid.TemplateGridCommand.lambda$configure$2(TemplateGridCommand.java:98)
at org.openqa.selenium.grid.Main.launch(Main.java:154)
at org.openqa.selenium.grid.Main.go(Main.java:88)
at org.openqa.selenium.grid.Main.main(Main.java:54)
18:26:36.733 INFO [LocalNewSessionQueue.callExecutorShutdown] - Shutting down session queue executor service


R
Rahul Deshpande Replied on 29/01/2021

Same issue is discussed here: https://www.gitmemory.com/issue/SeleniumHQ/selenium/8860/724916492

And yes, the older versions of selenium jars are found here: https://selenium-release.storage.googleapis.com/index.html


A
Ashish Thakur Replied on 30/01/2021

You can also use aven to get older version of selenium