Ben McKenneby
Ben McKenneby

Reputation: 501

How can I configure, disable, or override the sbt SecurityManager?

I'm trying to embed Apache Derby into an application. When I run it directly from IntelliJ, everything works fine, but sbt run generates the exception:

Caused by: java.security.AccessControlException: access denied org.apache.derby.security.SystemPermission( "engine", "usederbyinternals" )

This seems to relate to the SecurityManager that SBT uses. Are there ways to disable, reconfigure, or override the default SBT SecurityManager?

Upvotes: 1

Views: 2310

Answers (1)

Ben McKenneby
Ben McKenneby

Reputation: 501

JGC provided the insight in this question.

In the relevant app:

System.setSecurityManager(null)

Alternatively, one could simply provide a preferred security manager in this way.

Upvotes: 0

Related Questions