noconnor / JUnitPerf

API performance testing framework built using JUnit
Apache License 2.0
68 stars 18 forks source link

Fails if using java17 #86

Closed willbender closed 1 year ago

willbender commented 1 year ago

As it is considered here: https://github.com/sirthias/parboiled/issues/175 there is a problem from Java 16 with Parboiled. When using the framework to generate html reports, it uses jtwig, which has a very old latest release (https://github.com/jtwig/jtwig-core/releases/tag/5.87.0.RELEASE) and uses Parboiled, this doesn't allow to make a build using java > 16, having the following result:

java.lang.RuntimeException: Error creating extended parser class: Could not determine whether class 'org.jtwig.parser.parboiled.base.BooleanParser$$parboiled' has already been loaded
Caused by: java.lang.RuntimeException: Could not determine whether class 'org.jtwig.parser.parboiled.base.BooleanParser$$parboiled' has already been loaded
Caused by: java.lang.NoSuchMethodException: org.jtwig.parser.parboiled.base.BooleanParser.findLoadedClass(java.lang.String).

As the jtwig project doesn's seem to be mantained anymore, probably the best solution is to use another framework for the html reports creation. Maybe thymeleaf?

noconnor commented 1 year ago

I'll have a look at fixing this, thanks for reporting.

willbender commented 1 year ago

I'm not sure how would you like to work with this, but I would be glad to help.

noconnor commented 1 year ago

Think i have a fix almost complete . I'll open a PR shortly.

If you can test PR locally and see if it resolves the issue, that would be great, test instructions will be in PR. Otherwise, I should be able to finish testing this week and release if it looks good.

noconnor commented 1 year ago

@willbender 1.25.0 should be available now with this fix. Let me know if you run into any problems.