WebFuzzing / EvoMaster

The first open-source AI-driven tool for automatically generating system-level test cases (also known as fuzzing) for web/enterprise applications. Currently targeting whitebox and blackbox testing of Web APIs, like REST, GraphQL and RPC (e.g., gRPC and Thrift).
GNU Lesser General Public License v3.0
524 stars 85 forks source link

Error in EvoMaster 3.1.0: Black-Box Testing Initialization Failure with InvocationTargetException and NoSuchMethodError #1069

Closed agrawalhemant5393 closed 2 months ago

agrawalhemant5393 commented 2 months ago
arcuri82 commented 2 months ago

Hi @agrawalhemant5393 , thanks for reporting this bug. I have seen something related when dealing with JDK 21, but thought it was fixed. Can you please clarify this for me:

1) how are you running EvoMaster? from JAR, or from a MSI/DEB installer? 2) if from jar, what version of JDK are you using?

thx

agrawalhemant5393 commented 2 months ago

I am testing this using jar directly using JDK -17.

arcuri82 commented 2 months ago

for now, until it is investigated and fixed, i ll suggest to use EM from one of its installers, or try with a different JDK

sathiyajith commented 2 months ago

@arcuri82 I'm also facing this exact error. I'm using JDK-11.0.24.

arcuri82 commented 2 months ago

thx @sathiyajith it looks like a critical issue. i have no idea why it was not caught in CI (as we build and test with JDK 17 and 11). unfortunately I am very busy this and next week. besides trying to use one of the installers, if that doesn't work either, I would suggest to revert to 3.0.0 until I make a hot fix maybe in 7-10 days from now

arcuri82 commented 2 months ago

@agrawalhemant5393 @sathiyajith thanks for bring this issue to my attention.

I understand what is going on.

The jar file for the release is wrongly built with latest LTS, which is now JDK 21. That was not a problem before, because Kotlin compiler was targeing JDK 8 bytecode. The problem is with extension function reversed(), which is now introduced as well in Java sinch JDK 21. In those cases, Kotlin does not use the extension function, but rather the native function in JDK. Which leads to a crash when using version below 21 :(

If you need to use JAR instead of an installer, then should use JDK 21 to run EM.

arcuri82 commented 2 months ago

this should be fixed now in the new 3.2.0 release