# Py4j Security Error

* **Error Message**: `py4j.security.Py4JSecurityException: Constructor <> is not whitelisted`
* **Explanation**: This error indicates you are being blocked by Py4j security rather than the Immuta Security Manager. [Py4j security](/2024.3/integrations/databricks-spark/how-to-guides/configuration/simplified.md#id-2-configure-cluster-policies) is strict and generally ends up blocking many ML libraries.
* **Solution**: Turn off Py4j security on the offending cluster by setting `IMMUTA_SPARK_DATABRICKS_PY4J_STRICT_ENABLED=false` in the environment variables section. Additionally, because there are limitations to the security mechanisms Immuta employs on-cluster when Py4j security is disabled, ensure that all users on the cluster have the same level of access to data, as users could theoretically see (policy-enforced) data that other users have queried.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/2024.3/integrations/databricks-spark/reference-guides/configuration-settings/py4j-error.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
