Starting Tests with java 8 not working (java.lang.UnsupportedClassVersionError)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- build-system
Hướng nghiên cứu
The reporter gives a full stack trace and a minimal test class, so the failure is reproducible: RemoteTestNG is compiled to class file 55 (Java 11) while the runtime is 52 (Java 8). Start by finding where the launcher classes are built — the Tycho pom.xml and the plug-in META-INF/MANIFEST.MF Bundle-RequiredExecutionEnvironment — and confirm which compiler source/target the remote launcher module uses. Done means the launcher artifacts carry Java 8 bytecode and the sample TestNG class runs under a Java 8 JRE.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
After the new release #586 the issue #583 seems to be fixed but I still cannot run TestNG-Tests in Java 8 projects due to this exception:
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)
My test-class looks like this
import org.testng.Assert;
import org.testng.annotations.Test;
public class JavaTest
{
@Test
public void test()
{
Assert.assertTrue(false);
}
}
- Ngôn ngữ chính
- Java
- Star
- 198
- Fork
- 163
- Merge trung bình
- 4 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của testng-team/testng-eclipse
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
testng-team/testng-eclipse#189 · 1 bình luận ·
-
Some errors during update?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
testng-team/testng-eclipse#589 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
testng-team/testng-eclipse#578 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
testng-team/testng-eclipse#568 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 18/100
testng-team/testng-eclipse#565 · 1 bình luận ·
Tất cả issue của testng-team/testng-eclipse
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
testng-team/testng#3672 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eclipse-edc/IdentityHub#1296 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
cloudfoundry/uaa#4194 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ui: 進捗状況線ダイアログが日本語表示で英語のままĐang mởarea: ui priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
tetsuji16/microProject#1721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày