Open
Description
Description
When generating tests for Recursion$fibonacci and Recursion$factorial with UTBot Java CLI,
ExceptionInInitializer is thrown.
It can be seen in the Test generation result on utbot.org
However tests are generated.
To Reproduce
- Open utbot.org
- Select Example
Recursion: factorial
orRecursion: fibonacci
- Click
Generate & Run Tests
button - Wait test generation is finished
- Scroll down test generation summaries (bottom section of the page)
Expected behavior
There should be no exception in test generation results.
Actual behavior
There is ExceptionInInitializerError from org.utbot.framework.plugin.api.util.ReflectionUtilsKt in utbot-cli-2023.5.jar
Screenshots, logs
| ERROR | TestCaseGenerator | Error in flow
java.lang.ExceptionInInitializerError: null
at org.utbot.framework.plugin.api.util.ReflectionUtilsKt.getAnyInstance(ReflectionUtils.kt:45) ~[utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.util.constructor.ValueConstructor.constructObject(ValueConstructor.kt:229) ~[utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.util.constructor.ValueConstructor.construct(ValueConstructor.kt:188) ~[utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.util.constructor.ValueConstructor.construct(ValueConstructor.kt:102) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.Resolver.concreteException(Resolver.kt:419) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.Resolver.concreteException(Resolver.kt:413) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.Resolver.resolve(Resolver.kt:395) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.Resolver.resolveResult(Resolver.kt:383) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.UtBotSymbolicEngine.consumeTerminalState(UtBotSymbolicEngine.kt:479) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.UtBotSymbolicEngine.access$consumeTerminalState(UtBotSymbolicEngine.kt:101) ~[utbot-cli-2023.5.jar:?]
at org.utbot.engine.UtBotSymbolicEngine$traverseImpl$1.invokeSuspend(UtBotSymbolicEngine.kt:315) ~[utbot-cli-2023.5.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38) [utbot-cli-2023.5.jar:?]
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source) [utbot-cli-2023.5.jar:?]
at org.utbot.common.ConcurrencyKt.runBlockingWithCancellationPredicate(Concurrency.kt:38) [utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.TestCaseGenerator$generate$3.invoke(TestCaseGenerator.kt:156) [utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.TestCaseGenerator$generate$3.invoke(TestCaseGenerator.kt:155) [utbot-cli-2023.5.jar:?]
at org.utbot.common.ConcurrencyKt.runIgnoringCancellationException(Concurrency.kt:47) [utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.TestCaseGenerator.generate(TestCaseGenerator.kt:155) [utbot-cli-2023.5.jar:?]
at org.utbot.framework.plugin.api.TestCaseGenerator.generate$default(TestCaseGenerator.kt:133) [utbot-cli-2023.5.jar:?]
at org.utbot.cli.GenerateTestsAbstractCommand.generateTestSets(GenerateTestsAbstractCommand.kt:160) [utbot-cli-2023.5.jar:?]
at org.utbot.cli.GenerateTestsCommand.run(GenerateTestsCommand.kt:113) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:204) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:213) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:17) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:396) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:393) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:411) [utbot-cli-2023.5.jar:?]
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:436) [utbot-cli-2023.5.jar:?]
at org.utbot.cli.ApplicationKt.main(Application.kt:31) [utbot-cli-2023.5.jar:?]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private native java.lang.reflect.Field[] java.lang.Class.getDeclaredFields0(boolean) accessible: module java.base does not "opens java.lang" to unnamed module @2b742ace
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[?:?]
at java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[?:?]
at java.lang.reflect.Method.checkCanSetAccessible(Method.java:199) ~[?:?]
at java.lang.reflect.Method.setAccessible(Method.java:193) ~[?:?]
at org.utbot.common.Reflection.<clinit>(ReflectionUtil.kt:22) ~[utbot-cli-2023.5.jar:?]
... 35 more
Environment
utbot-cli-2023.5.jar
Additional context
Not reproducing in UTBot Java IntelliJ plugin.
Metadata
Metadata
Assignees
Type
Projects
Status
Todo