You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/writing-native-applications-tips.adoc
+21-12Lines changed: 21 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,23 @@ and in the case of using the Maven configuration instead of `application.propert
320
320
----
321
321
====
322
322
323
+
[[managing-proxy-classes-app]]
324
+
=== Managing Proxy Classes
325
+
326
+
While writing native application you'll need to define proxy classes at image build time by specifying the list of interfaces that they implement.
327
+
328
+
In such a situation, the error you might encounter is:
329
+
330
+
[source]
331
+
----
332
+
com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.apache.http.conn.HttpClientConnectionManager, interface org.apache.http.pool.ConnPoolControl, interface com.amazonaws.http.conn.Wrapped] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
333
+
----
334
+
335
+
To solve the issue you can create a `proxy-config.json` file under the `src/main/resources/META-INF/native-image/<group-id>/<artifact-id>` folder.
336
+
For more information about the format of the `proxy-config.json`, see the https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/metadata/#dynamic-proxy-metadata-in-json[Dynamic Proxy Metadata in JSON] documentation.
337
+
338
+
Alternatively, you can create a quarkus extension and register the proxy classes as described in <<managing-proxy-classes-extension>>.
339
+
323
340
[[modularity-benefits]]
324
341
=== Modularity Benefits
325
342
@@ -618,18 +635,10 @@ Using such a construct means that a `--initialize-at-run-time` option will autom
618
635
For more information about the `--initialize-at-run-time` option, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/optimizations-and-performance/ClassInitialization/[GraalVM Class Initialization in Native Image] guide.
619
636
====
620
637
638
+
[[managing-proxy-classes-extension]]
621
639
=== Managing Proxy Classes
622
640
623
-
While writing native application you'll need to define proxy classes at image build time by specifying the list of interfaces that they implement.
624
-
625
-
In such a situation, the error you might encounter is:
626
-
627
-
[source]
628
-
----
629
-
com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.apache.http.conn.HttpClientConnectionManager, interface org.apache.http.pool.ConnPoolControl, interface com.amazonaws.http.conn.Wrapped] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
630
-
----
631
-
632
-
Quarkus allows extensions authors to register a `NativeImageProxyDefinitionBuildItem`. An example of doing so is:
641
+
Similarly, Quarkus allows extensions authors to register a `NativeImageProxyDefinitionBuildItem`. An example of doing so is:
633
642
634
643
[source,java]
635
644
----
@@ -645,8 +654,8 @@ public class S3Processor {
645
654
----
646
655
647
656
This will allow Quarkus to generate the necessary configuration for handling the proxy class.
648
-
Alternatively, you may create a `proxy-config.json` file under the `src/main/resources/META-INF/native-image/<group-id>/<artifact-id>` folder.
649
-
For more information about the format of this file, see the https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/metadata/#dynamic-proxy-metadata-in-json[Dynamic Proxy Metadata in JSON] documentation.
657
+
658
+
Alternatively, you may create a `proxy-config.json` as described in <<managing-proxy-classes-app>>.
0 commit comments