Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported class file major version 61 with project JDK 8 #653

Closed
rmzs0711 opened this issue Aug 3, 2022 · 4 comments
Closed

Unsupported class file major version 61 with project JDK 8 #653

rmzs0711 opened this issue Aug 3, 2022 · 4 comments
Assignees
Labels
ctg-bug Issue is a bug status-duplicate This issue or pull request already exists

Comments

@rmzs0711
Copy link

rmzs0711 commented Aug 3, 2022

Description
At my first try I was using JDK 17 and met this exception, so then I downgraded my jdk version, recompiled project, reinstalled plugin, but it didn't help to me

Steps to reproduce

  1. Install plugin from Idea marketplace
  2. Run the project in IntelliJ Idea with JDK 8
  3. Generate tests in TrieImpl.java

Expected behavior

Tests are supposed to be generated.

Actual behavior and visual proofs (screenshots, logs, images)

java.lang.IllegalArgumentException: Unsupported class file major version 61
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284)
	at soot.asm.AsmClassSource.resolve(AsmClassSource.java:64)
	at soot.SootResolver.bringToHierarchyUnchecked(SootResolver.java:253)
	at soot.SootResolver.bringToHierarchy(SootResolver.java:221)
	at soot.SootResolver.bringToSignatures(SootResolver.java:292)
	at soot.SootResolver.bringToBodies(SootResolver.java:332)
	at soot.SootResolver.processResolveWorklist(SootResolver.java:171)
	at soot.SootResolver.resolveClass(SootResolver.java:141)
	at soot.Scene.tryLoadClass(Scene.java:965)
	at soot.Scene.loadBasicClasses(Scene.java:1670)
	at soot.Scene.loadNecessaryClasses(Scene.java:1770)
	at org.utbot.framework.plugin.api.SootUtilsKt.runSoot(SootUtils.kt:80)
	at org.utbot.framework.plugin.api.UtBotTestCaseGenerator.init(UtBotTestCaseGenerator.kt:111)
	at org.utbot.intellij.plugin.generator.CodeGenerator.<init>(CodeGenerator.kt:44)
	at org.utbot.intellij.plugin.generator.CodeGenerator.<init>(CodeGenerator.kt:36)
	at org.utbot.intellij.plugin.ui.UtTestsDialogProcessor$createTests$2$1.run(UtTestsDialogProcessor.kt:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

Environment
java -version

openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1~20.04-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

JUnit 5

IntelliJ IDEA 2022.2 (Ultimate Edition)
Build #IU-222.3345.118, built on July 26, 2022

Runtime version: 17.0.3+7-b469.32 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.0-41-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1922M
Cores: 12
Non-Bundled Plugins:
com.markskelton.one-dark-theme (5.6.0)
com.jetbrains.darkPurpleTheme (1.3)
com.jetbrains.CyanTheme (1.3)
com.intellij.ideolog (203.0.30.0)
com.github.oowekyala.javacc (1.10)
com.elliotwaite.cyberpunk_theme (1.0.12)
Rider UI Theme Pack (0.10.1)
Pythonid (222.3345.131)
org.utbot.intellij.plugin.id (2022.7-beta)

Kotlin: 222-1.7.10-release-334-IJ3345.118
Current Desktop: ubuntu:GNOME

Additional context

@alisevych please review

@korifey korifey moved this to Todo in UTBot Java Aug 3, 2022
@rmzs0711
Copy link
Author

rmzs0711 commented Aug 3, 2022

Gradle18Test.zip

@alisevych
Copy link
Member

alisevych commented Aug 3, 2022

@rmzs0711
Please take the Bug template - and follow it. "Steps to reproduce" instead of "To reproduce" an etc.
"Use plugin from marketplace" - must be as precondition or the first step, like : Install the plugin UTBot version ... from ...
Add the information about Environment : OS, IDEA version.
Include information about JDK 17 used for the project first - in the steps.

@alisevych alisevych added the ctg-question Further information is requested label Aug 3, 2022
@rmzs0711
Copy link
Author

rmzs0711 commented Aug 3, 2022

@alisevych done

@alisevych alisevych added ctg-bug Issue is a bug status-duplicate This issue or pull request already exists and removed ctg-question Further information is requested labels Aug 3, 2022
@alisevych
Copy link
Member

alisevych commented Aug 3, 2022

@rmzs0711
Now I see that that you're using IntelliJ IDEA with JRE 17 - and it's incompatible with UTBotJava plugin currently.
Nevertheless your project code is compiled with JDK 8.
So it's duplicate of: #481
Please use IntelliJ IDEA 2022.1.4 version for UTBot plugin - latest IDEA is not yet supported.

Repository owner moved this from Todo to Done in UTBot Java Aug 3, 2022
@alisevych alisevych closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2022
@alisevych alisevych changed the title UTBot from Idea Marketplace plugin throws exception and doesn't generate tests Unsupported class file major version 61 with project JDK 8 Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ctg-bug Issue is a bug status-duplicate This issue or pull request already exists
Projects
Archived in project
Development

No branches or pull requests

2 participants