Skip to content

Commit baf612c

Browse files
author
Christian Wimmer
committed
Workarounds for wrong class initialization configuration in microservice frameworks
1 parent f51c7c3 commit baf612c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

java-benchmarks/mx.java-benchmarks/mx_java_benchmarks.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ def extra_image_build_argument(self, benchmark, args):
374374
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jni=ALL-UNNAMED',
375375
'--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.threadlocal=ALL-UNNAMED',
376376
'--initialize-at-run-time=io.netty.internal.tcnative.SSL,io.netty.handler.codec.compression.ZstdOptions',
377-
'--initialize-at-build-time=org.apache.pdfbox.rendering.ImageType',
378377
'-H:+StackTrace'] + super(BaseQuarkusBenchmarkSuite, self).extra_image_build_argument(benchmark, args)
379378

380379

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

400-
return super(BaseTikaBenchmarkSuite, self).extra_image_build_argument(benchmark, args)
399+
return [
400+
# Workaround for wrong class initialization configuration in Quarkus Tika
401+
'--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',
402+
] + super(BaseTikaBenchmarkSuite, self).extra_image_build_argument(benchmark, args)
401403

402404

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

472477
def default_stages(self):

0 commit comments

Comments
 (0)