cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Not able to mount ADLS Gen2 in Data bricks

vibhakar
New Contributor

py4j.security.Py4JSecurityException: Method public com.databricks.backend.daemon.dbutils.DBUtilsCore$Result com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.Map) is not whitelisted on class class com.databricks.backend.daemon.dbutils.DBUtilsCore

3 REPLIES 3

Cedric
Valued Contributor

Hi @Vibhakar Prasadโ€‹,

Thanks for reaching out to us. Could you please share which access mode your cluster is using?

Kaniz_Fatma
Community Manager
Community Manager

Hi @Vibhakar Prasadโ€‹, This error message suggests you are encountering a Py4JSecurityException when trying to mount a file system in Databricks.

Py4J is the Java gateway library used by Databricks to enable communication between Python and Java code.

The error occurs when the mounting method in the DBUtilsCore class is not whitelisted for security reasons.

By default, only a limited set of methods are whitelisted to prevent potentially unsafe operations.

SnehalTamhane
New Contributor II

@Kaniz Fatmaโ€‹ I am also facing the same exception when I am trying to mount Gen1 datalake store on azure databricks through python.

I get that by default, only a limited set of methods are whitelisted to prevent potentially unsafe operations, but how do I whitelist this method and get the mount working without the error?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group