Unable to run Azure Pipeline using java selenium code

27 views
Skip to first unread message

Sreelakshmi M

unread,
Jun 21, 2024, 12:59:35 AM (12 days ago) Jun 21
to Selenium Users
Hi,

When I try to set up the pipeline for a selenium java project I am getting the following error.

ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project NRE_Fintech_Automation: Compilation failure

##[error]NRE_Fintech_Automation\src\main\java\com\nre\actiondriver\Action.java(13,27): error : /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert

[ERROR] /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert

[ERROR]   bad class file: C:\Users\VssAdministrator\.m2\repository\org\seleniumhq\selenium\selenium-api\4.20.0\selenium-api-4.20.0.jar(org/openqa/selenium/Alert.class)

[ERROR]     class file has wrong version 55.0, should be 52.0

[ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.


I tried updating the selenium and java versions. How can I resolve this.


Thank you.


[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project NRE_Fintech_Automation: Compilation failure
##[error]NRE_Fintech_Automation\src\main\java\com\nre\actiondriver\Action.java(13,27): error : /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert
[ERROR] /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert
[ERROR] bad class file: C:\Users\VssAdministrator\.m2\repository\org\seleniumhq\selenium\selenium-api\4.20.0\selenium-api-4.20.0.jar(org/openqa/selenium/Alert.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project NRE_Fintech_Automation: Compilation failure
##[error]NRE_Fintech_Automation\src\main\java\com\nre\actiondriver\Action.java(13,27): error : /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert
[ERROR] /D:/a/1/s/NRE_Fintech_Automation/src/main/java/com/nre/actiondriver/Action.java:[13,27] cannot access org.openqa.selenium.Alert
[ERROR] bad class file: C:\Users\VssAdministrator\.m2\repository\org\seleniumhq\selenium\selenium-api\4.20.0\selenium-api-4.20.0.jar(org/openqa/selenium/Alert.class)
[ERROR] class file has wrong version 55.0, should be 52.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.

Krishnan Mahadevan

unread,
Jun 21, 2024, 1:28:39 AM (12 days ago) Jun 21
to seleniu...@googlegroups.com

[ERROR]     class file has wrong version 55.0, should be 52.0


This is Java’s way of telling you that you are using an incompatible JDK (You need JDK11 but you are on maybe JDK8)
So you need to figure out the JDK version and fix that.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9bb95576-90ab-4c1d-a68c-e5129cf1cf3en%40googlegroups.com.

SiKing

unread,
Jun 21, 2024, 3:06:44 PM (11 days ago) Jun 21
to Selenium Users
If you were to copy-paste that error into google, the very first hit is: https://stackoverflow.com/q/28180915/3124333 Which has a very good explanation of what is happening!
;)
Reply all
Reply to author
Forward
0 new messages