Skip to content

NullPointerException Failures in Privacera Trino Plugin

This section explains how to resolve NullPointerException failures when initiating the Privacera Trino Plugin during the Trino Server startup. This issue typically occurs with Trino Version 459 and above.

Error

You may see the following error in your Trino Server logs:

Bash
Caused by: java.lang.NullPointerException: Cannot invoke "String.contains(java.lang.CharSequence)" because "tempCacheDir" is null

Root Cause

From Trino version 459 onwards, the Java runtime was upgraded to JDK 23. As part of this update, a specific security flag is required in the default JVM configuration. If you use a custom JVM configuration, it overrides Trino's defaults. If the flag below is missing from your custom config, the Privacera plugin will fail to initialize:

Bash
#https://bugs.openjdk.org/browse/JDK-8327134
-Djava.security.manager=allow

Resolution Steps

  1. Identify your JVM Config source: Review your Trino deployment files to find where JVM configurations are defined. The JVM configs can be passed throughvarious files such as values.yaml, configmap-coordinator.yml, etc.
  2. Update the Configuration: Add the following flag to the existing list of JVM arguments:

    Bash
    #https://bugs.openjdk.org/browse/JDK-8327134
    -Djava.security.manager=allow
    

  3. Redeploy: Apply the changes and redeploy the Trino Server.

Verification

After redeploying, follow these steps to confirm the flag has been applied successfully.

  1. Get the name of the Trino coordinator pod:
    Bash
    kubectl get pods -n <NAMESPACE>
    
  2. Access the Trino coordinator Pod shell:

    Bash
    kubectl exec -it <COORDINATOR_POD_NAME> -n <NAMESPACE> -- /bin/bash
    

  3. Run below command to check the above-mentioned flag is present in the JVM config:

    Bash
    grep -a -- "-Djava.security.manager=allow" /etc/trino/jvm.config
    

The Privacera Trino Plugin should now initialize successfully, and the NullPointerException should no longer occur for Trino version 459 and later.