Closed bennipalmhert closed 5 months ago
@bennipalmhert, thank you for creating this issue. We will troubleshoot it as soon as we can.
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
@bennipalmhert - Please show us what your <dependencies>
looks like
@krmahadevan These are the selenium dependencies i added:
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.19.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.8.0</version>
</dependency>
and these are all dependencies in my pom.XML:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>4.4.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.19.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.8.0</version>
</dependency>
</dependencies>
@bennipalmhert - Can you please remove the following two dependencies and try again ?
You are getting this via selenium-java
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-chrome-driver -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>4.19.1</version>
</dependency>
You don't need this anymore. This is internally taken care of by selenium
<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.8.0</version>
</dependency>
It might also be an issue with springframework,
as it embeds Selenium, and I think they always have an older version.
Good point @diemol. I forgot that.
@bennipalmhert - Please check here https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html
@krmahadevan - I've removed the dependencies and reloaded maven project but still get the same error
@bennipalmhert - You might want to try running the below commands to sort out your dependencies discrepancy
This will help you identify the problem in your dependencies
@krmahadevan - running the comand dependency:analyze leads to this warning:
org.seleniumhq.selenium:selenium-api:jar:4.14.1:compile
org.springframework.data:spring-data-jpa:jar:3.2.2:compile
org.springframework:spring-context:jar:6.1.3:compile
org.springframework:spring-core:jar:6.1.3:compile
org.springframework.boot:spring-boot:jar:3.2.2:compile
com.fasterxml.jackson.core:jackson-databind:jar:2.15.3:compile
org.springframework:spring-jdbc:jar:6.1.3:compile
jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
org.springframework:spring-beans:jar:6.1.3:compile
org.springframework:spring-webmvc:jar:6.1.3:compile
org.springframework:spring-web:jar:6.1.3:compile
org.springframework.security:spring-security-core:jar:6.2.1:compile
org.springframework.data:spring-data-commons:jar:3.2.2:compile
org.springframework.security:spring-security-config:jar:6.2.1:compile
org.springframework.security:spring-security-web:jar:6.2.1:compile
org.springframework.boot:spring-boot-autoconfigure:jar:3.2.2:compile
org.apache.tomcat.embed:tomcat-embed-core:jar:10.1.18:provided
jakarta.persistence:jakarta.persistence-api:jar:3.1.0:compile
org.aspectj:aspectjweaver:jar:1.9.21:compile
org.springframework:spring-tx:jar:6.1.3:compile
org.seleniumhq.selenium:selenium-support:jar:4.14.1:compile
org.springframework.boot:spring-boot-test:jar:3.2.2:test
org.slf4j:slf4j-api:jar:2.0.11:compile
com.fasterxml.jackson.core:jackson-core:jar:2.15.3:compile
org.springframework.security:spring-security-crypto:jar:6.2.1:compile
com.fasterxml.jackson.core:jackson-annotations:jar:2.15.3:compile
Unused declared dependencies found:
org.springframework.boot:spring-boot-starter-web:jar:3.2.2:compile
org.springframework.boot:spring-boot-devtools:jar:3.2.2:runtime
org.projectlombok:lombok:jar:1.18.30:compile
org.springframework.boot:spring-boot-starter-data-jpa:jar:3.2.2:compile
org.springframework.boot:spring-boot-starter-tomcat:jar:3.2.2:provided
org.springframework.boot:spring-boot-starter-test:jar:3.2.2:test
org.springframework.boot:spring-boot-starter-security:jar:3.2.2:compile
org.junit.jupiter:junit-jupiter-params:jar:5.10.2:test
org.mockito:mockito-core:jar:5.11.0:test
org.mockito:mockito-junit-jupiter:jar:5.10.0:test
org.seleniumhq.selenium:selenium-java:jar:4.19.1:compile
Non-test scoped test only dependencies found:
org.seleniumhq.selenium:selenium-chrome-driver:jar:4.19.1:compile
and running dependency:analyze-report shows me a build success, with no warning or error messages.
Does this mean i should downgrade my selenium-java version to 4.14.1?
@bennipalmhert - Try adding a property like below and see if that helps
<properties>
<selenium.version>4.19.1</selenium.version>
</properties>
You might want to spend sometime going through this page to help you learn how to fix this discrepancy
I will close this, as we have seen the same issue in the past due to dependency conflicts.
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.
What happened?
I have implemented a basic JUnit 5 testing class, where i want to test functions of my Maven Project. Before all test I set the system properties for webdriver.chrome.driver and webdriver.http.factory, before each test i initialise a new Chromedriver. Inside my test I get the url for my driver. After starting up my web application I execute my tests, but all tests fail and i get an error message for the test class (java.lang.NoSuchMethodError: 'javax.net.ssl.SSLContext org.openqa.selenium.remote.http.ClientConfig.sslContext()').
I imported the dependencies selenium-java, selenium-chrome-driver and also webdrivermanager to my pom.XML
How can we reproduce the issue?
Relevant log output
Operating System
macOS Sonoma Version 14.4.1 on mac-arm64 (M1)
Selenium version
Java 4.19.1
What are the browser(s) and version(s) where you see this issue?
Chrome 123.0.6312.124
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 123.0.6312.122
Are you using Selenium Grid?
No