You have two errors here. The first error message...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
...implies that either you have a slf4j
dependency in your pom.xml
and the version is not compatible with the other binaries.
Solution
Upgrade slf4j
dependency to the latest stable SLF4J Simple Binding version using the following dependency:
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<scope>test</scope>
</dependency>
You can find a relevant detailed discussion in SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"
The second error message...
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
...implies that a new session can't be initialized bcause of invalid address of the remote server or browser start-up failure.
Possibly you are compiling your program using java-17. Ideally you need to compile the Selenium program with java-8 through pom.xml
dependency:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>