Java Security Manager Causes AccessControlException When Using ParallelStream Method (Doc ID 2094041.1)

Last updated on JUNE 25, 2017

Applies to:

Java SE JDK and JRE - Version 8 and later
Information in this document applies to any platform.

Symptoms


When using the new parallelStream() method, introduced in Java SE 8, threads created by an application that uses the parallelStreams() method are being blocked by the security manager.
Threads created by other methods use the security settings in the policy file and are not blocked.

A server process is created, use of a Security Manager is enabled, and a "custom.policy" file is generated to be used for all permissions.
The issue faced is that the application fails to function and honor the security settings provided in the "custom.policy"

The following exception is seen.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms