Maven build errors

I downloaded the git repo on my Mac and am having trouble building the source. I’m using Java 21 and Maven 3.9.6. mvn install shows a bunch of jacoco errors with “Unsupported class file major version 65”. Is there a specific java/maven version that needs to be used, or anything overridden in the pom file to eliminate these errors?

Note: I did run docker-compose up prior to building and that succeeded (not sure if the services need to be running for the build to work).

In the end, the tests passed except for one. I’m not sure if the class version errors are related.
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.826 s – in

[INFO] Results:

[ERROR] Failures:

[ERROR] ApiWorkflowExecutorTest.testValidateTest:144

[ERROR] Errors:

[ERROR] ApiWorkflowExecutorTest.testExecuteCode:57 » NullPointer Cannot invoke “javax.script.ScriptEngine.eval(String)” because “engine” is null

[ERROR] Tests run: 32, Failures: 1, Errors: 1, Skipped: 0

Hi @lightningrob

It needs Java 8 (which is very very old I understand!!). You can check the requirements here on GitHub repo - GitHub - akto-api-security/akto: Proactive, Open source API security → API discovery, Testing in CI/CD, Test Library with 150+ Tests, Add custom tests, Sensitive data exposure

OpenJDK 8, node(v18.7.0+ link), npm(v8.15.0+), maven (v3.6.3 link), MongoDB (v5.0.3+ link)

Try running with Java 8 please.

By the way, if that’s the only test that’s failing, you can ignore that test. You should be able to use pretty much all Akto functionality.

Hi Ankush, where exactly on that github page do you see the requirements you mentioned above like OpenJDK 8, node, maven etc.? I search for those words and don’t find them.

Expand Manual Setup Instructions and you will see all setup instructions.

1 Like

Oh there it is. I was clicking on the triangle instead of the text. Thanks!

1 Like