TestNG error

58 views
Skip to first unread message

Miriam Samson

unread,
Dec 9, 2023, 10:51:05 AM12/9/23
to testng-users
Hi I am trying to work with TestNG on Eclipse IDE Version: 2023-09 (4.29.0) and build id: Build id: 20230907-1323 (Ubuntu 18.04) by adding the dependency from maven repository in pom.xml. 

The TestNG dependency is: 

<!-- https://mvnrepository.com/artifact/org.testng/testng -->

<dependency>

<groupId>org.testng</groupId>

<artifactId>testng</artifactId>

<version>7.4.0</version>

<scope>test</scope>

</dependency>


The error I'm getting is:

Error: A JNI error has occurred, please check your installation and try again

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/testng/remote/RemoteTestNG has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:756)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)

at java.net.URLClassLoader.access$100(URLClassLoader.java:74)

at java.net.URLClassLoader$1.run(URLClassLoader.java:369)

at java.net.URLClassLoader$1.run(URLClassLoader.java:363)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:362)

at java.lang.ClassLoader.loadClass(ClassLoader.java:418)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)

at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)


Please let me know about a possible solution for it.
Thanks

⇜Krishnan Mahadevan⇝

unread,
Dec 9, 2023, 10:53:52 AM12/9/23
to testng...@googlegroups.com
You seem to be using the latest version of eclipse TestNG plugin (which requires JDK11) but you are on JDK8.
Please upgrade to JDK11 and try again.

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 "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/983e8c26-116b-49f1-a087-df19d2160163n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages