Skip to content

Commit 224ae62

Browse files
committed
Fix Quarkus Tika for complete reflection types
1 parent 9bd7810 commit 224ae62

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

sdk/mx.sdk/mx_sdk_benchmark.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5714,8 +5714,13 @@ def extra_image_build_argument(self, benchmark, args):
57145714
"org.apache.xmlbeans.metadata.system.sXMLLANG.TypeSystemHolder",
57155715
"org.apache.xmlbeans.metadata.system.sXMLSCHEMA.TypeSystemHolder"
57165716
]
5717+
tika_run_time_init = [
5718+
# Prevents build-time ininitialization of sun.awt.datatransfer.DesktopDatatransferServiceImpl through DefaultDesktopDatatransferService.INSTANCE
5719+
"sun.datatransfer.DataFlavorUtil$DefaultDesktopDatatransferService"
5720+
]
57175721
return [
57185722
f"--initialize-at-build-time={','.join(tika_build_time_init)}",
5723+
f"--initialize-at-run-time={','.join(tika_run_time_init)}",
57195724
] + super(BaseTikaBenchmarkSuite, self).extra_image_build_argument(benchmark, args)
57205725

57215726

substratevm/mx.substratevm/mx_substratevm_benchmark.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,12 @@ def extra_run_arg(self, benchmark, args, image_run_args):
376376
def extra_image_build_argument(self, benchmark, args):
377377
extra_image_build_args = []
378378
if benchmark == "quarkus-tika":
379-
# Band-aid solution for class initizalization deadlock due to org.openxmlformats.schemas.drawingml.x2006 (GR-59899)
380-
extra_image_build_args += ["-H:NumberOfThreads=1"]
379+
extra_image_build_args += [
380+
# Band-aid solution for class initizalization deadlock due to org.openxmlformats.schemas.drawingml.x2006 (GR-59899)
381+
"-H:NumberOfThreads=1",
382+
# Prevents build-time ininitialization of sun.awt.datatransfer.DesktopDatatransferServiceImpl through DefaultDesktopDatatransferService.INSTANCE
383+
"--initialize-at-run-time=sun.datatransfer.DataFlavorUtil$DefaultDesktopDatatransferService"
384+
]
381385
return extra_image_build_args + super().extra_image_build_argument(benchmark, args)
382386

383387
def build_assertions(self, benchmark: str, is_gate: bool) -> List[str]:

0 commit comments

Comments
 (0)