RuntimePermission issue - ("java.lang.RuntimePermission" "accessDeclaredMembers") #316
-
Hi AWS Team, I am trying to leverage your plugin, and I seem to be running into a very strange Runtime Permission issue at the line linked below. The Issue
We suspect it has something to do with the new StringReader created and passed to the GSON in the line. Wondering if this is an issue anyone on your team has experienced? Wondering if this StringReader is even necessary here? We are using openJDK 8. Thank you 😃, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Are you just running the BasicDiscovery greengrass sample when you run into this error? also what OS are you running this on? |
Beta Was this translation helpful? Give feedback.
-
Hi, The issue is likely caused by the fact that is executed through CompletableFuture.supplyAsync() using the Fork Join Pool common pool. Quoting from ForkJoinPool Javadoc, If a SecurityManager is present and no factory is specified, then the default pool uses a factory supplying threads that have no Permissions enabled.. The DiscoveryClient should be probably modified to allow customizing the execution facility. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi,
The issue is likely caused by the fact that
aws-iot-device-sdk-java-v2/sdk/src/main/java/software/amazon/awssdk/iot/discovery/DiscoveryClient.java
Line 97 in 472d0ec
is executed through CompletableFuture.supplyAsync() using the Fork Join Pool common pool.
Quoting from ForkJoinPool Javadoc, If a SecurityManager is present and no factory is specified, then the default pool uses a factory supplying threads that have no Permissions enabled..
The DiscoveryClient should be probably modified to allow customizing the execution facility.