Skip to content

Commit

Permalink
Workarounds for wrong class initialization configuration in microserv…
Browse files Browse the repository at this point in the history
…ice frameworks
  • Loading branch information
Christian Wimmer committed Jul 12, 2023
1 parent f51c7c3 commit baf612c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ def extra_image_build_argument(self, benchmark, args):
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jni=ALL-UNNAMED',
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.threadlocal=ALL-UNNAMED',
'--initialize-at-run-time=io.netty.internal.tcnative.SSL,io.netty.handler.codec.compression.ZstdOptions',
'--initialize-at-build-time=org.apache.pdfbox.rendering.ImageType',
'-H:+StackTrace'] + super(BaseQuarkusBenchmarkSuite, self).extra_image_build_argument(benchmark, args)


Expand All @@ -397,7 +396,10 @@ def extra_image_build_argument(self, benchmark, args):
if mx.get_jdk().version < expectedJdkVersion:
mx.abort(benchmark + " needs at least JDK version " + str(expectedJdkVersion))

return super(BaseTikaBenchmarkSuite, self).extra_image_build_argument(benchmark, args)
return [
# Workaround for wrong class initialization configuration in Quarkus Tika
'--initialize-at-build-time=org.apache.pdfbox.rendering.ImageType,org.apache.pdfbox.rendering.ImageType$1,org.apache.pdfbox.rendering.ImageType$2,org.apache.pdfbox.rendering.ImageType$3,org.apache.pdfbox.rendering.ImageType$4',
] + super(BaseTikaBenchmarkSuite, self).extra_image_build_argument(benchmark, args)


class TikaWrkBenchmarkSuite(BaseTikaBenchmarkSuite, mx_sdk_benchmark.BaseWrkBenchmarkSuite):
Expand Down Expand Up @@ -467,6 +469,9 @@ def build_assertions(self, benchmark, is_gate):
def extra_image_build_argument(self, benchmark, args):
return [
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED',
# Workaround for wrong class initialization configuration in Micronaut 3.9
'--initialize-at-build-time=io.netty.handler.codec.http.cookie.ServerCookieEncoder',
'--initialize-at-build-time=org.xml.sax.helpers.AttributesImpl,org.xml.sax.helpers.LocatorImpl',
] + super(BaseMicronautBenchmarkSuite, self).extra_image_build_argument(benchmark, args)

def default_stages(self):
Expand Down

0 comments on commit baf612c

Please sign in to comment.