Summary
This article discusses how to resolve the PLAN ERROR: NullPointerException error when running system table queries such as SELECT * FROM sys.roles as well as other basic SELECT * queries due to a configuration issue with the distributed storage (dist store) path within the dremio.conf file.
Reported Issue
Queries such as SELECT * FROM sys.roles as well as other basic SELECT * queries fail with a NullPointerException.

With the below "Caused by" for the NullPointerException seen in the coordinator server.log file.
Caused by: java.lang.NullPointerException: null
at com.dremio.exec.catalog.CatalogServiceImpl.getStorageRules(CatalogServiceImpl.java:920)
at com.dremio.exec.catalog.EnterpriseCatalogServiceImpl.getStorageRules(EnterpriseCatalogServiceImpl.java:129)
at com.dremio.exec.planner.sql.handlers.SqlHandlerConfig.getRules(SqlHandlerConfig.java:105)
at com.dremio.exec.planner.sql.handlers.PlannerUtil.transform(PlannerUtil.java:92)
at com.dremio.exec.planner.sql.handlers.DrelTransformer.pushDownProjects(DrelTransformer.java:264)
at com.dremio.exec.planner.sql.handlers.DrelTransformer.convertToDrel(DrelTransformer.java:137)
at com.dremio.exec.planner.sql.handlers.DrelTransformer.convertToDrel(DrelTransformer.java:108)
at com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan(NormalHandler.java:113)
... 13 common frames omitted Relevant Versions
This issue applies to Dremio versions 25.x onwards.
Troubleshooting Steps
1. Navigate to the failing job profile as per the following documentation link steps: https://docs.dremio.com/current/sonar/monitoring/jobs/raw-profile/
2. After navigating to the "Raw Profile", click on the "Error" tab of the profile.
3. Confirm that the error is the same as mentioned in this article. As an example, the following error can be seen in the "Verbose" section of the "Error" tab of the job profile:
PLAN ERROR: NullPointerException
SQL Query SELECT * FROM "mySource".myTable
ErrorOrigin: COORDINATOR
(java.lang.NullPointerException) null
com.dremio.exec.catalog.CatalogServiceImpl.getStorageRules():920
com.dremio.exec.catalog.EnterpriseCatalogServiceImpl.getStorageRules():129
com.dremio.exec.planner.sql.handlers.SqlHandlerConfig.getRules():105
com.dremio.exec.planner.sql.handlers.PlannerUtil.transform():92
com.dremio.exec.planner.sql.handlers.DrelTransformer.pushDownProjects():264
com.dremio.exec.planner.sql.handlers.DrelTransformer.convertToDrel():137
com.dremio.exec.planner.sql.handlers.DrelTransformer.convertToDrel():108
com.dremio.exec.planner.sql.handlers.query.NormalHandler.getPlan():113
com.dremio.exec.planner.sql.handlers.commands.HandlerToExec.plan():56
com.dremio.exec.work.foreman.AttemptManager.plan():754
com.dremio.exec.work.foreman.AttemptManager.lambda$run$4():589
com.dremio.service.commandpool.ReleasableBoundCommandPool.lambda$getWrappedCommand$1():156
com.dremio.service.commandpool.CommandWrapper.run():73
com.dremio.context.RequestContext.run():103
com.dremio.common.concurrent.ContextMigratingExecutorService.lambda$decorate$4():246
com.dremio.common.concurrent.ContextMigratingExecutorService$ComparableRunnable.run():222
java.util.concurrent.Executors$RunnableAdapter.call():515
java.util.concurrent.FutureTask.run():264
java.util.concurrent.ThreadPoolExecutor.runWorker():1128
java.util.concurrent.ThreadPoolExecutor$Worker.run():628
java.lang.Thread.run():8344. Check the coordinator logs to see if similar errors to the below are reported:
2025-07-24 15:51:19,713 [scheduler-6] ERROR c.d.service.jobs.LocalJobsService - Could not build the cache
java.lang.IllegalStateException: com.dremio.common.exceptions.UserRemoteException: PLAN ERROR: NullPointerException
Caused by: com.dremio.common.exceptions.UserRemoteException: PLAN ERROR: NullPointerException
2025-07-24 15:51:19,713 [scheduler-6] ERROR c.d.service.jobs.LocalJobsService - Could not build jobAndUserStatsCache
java.lang.IllegalStateException: com.dremio.common.exceptions.UserRemoteException: PLAN ERROR: NullPointerException
Caused by: com.dremio.common.exceptions.UserRemoteException: PLAN ERROR: NullPointerException5. Check the dremio.conf file to see if individual properties have been configured on the distributed storage paths for accelerator, uploads, downloads, etc per below example:
paths: {
# the local path for dremio to store data.
local: "/myPath/Dremio/data"
accelerator: "dremioS3:///mydiststore/accelerator"
uploads: "dremioS3:///mydiststore/uploads"
downloads: "dremioS3:///mydiststore/downloads"
scratch: "dremioS3:///mydiststore/scratch"
metadata: "dremioS3:///mydiststore/metadata"
results: "dremioS3:///mydiststore/results"
# the distributed path Dremio data including job results, downloads, uploads, etc
}6. Carry out the "Steps to Resolve" described below.
Cause
This is a configuration issue with the distributed storage (dist store) path within the dremio.conf file where the individual properties have been configured on the distributed storage paths for accelerator, uploads, downloads, etc. Newer versions of Dremio attempt to create new tables/dist store paths and since individual paths have been hard-coded, the new paths fail to create.
Steps to Resolve
Simplify the distributed storage path to have something like the below:
paths: {
# the local path for dremio to store data.
local: "/myPath/Dremio/data"
# the distributed path Dremio data including job results, downloads, uploads, etc
dist: "dremioS3:///mydiststore"
}Additional Resources
Viewing a Raw Profile: https://docs.dremio.com/current/sonar/monitoring/jobs/raw-profile/
Configuring Distributed Storage: https://docs.dremio.com/current/deploy-dremio/other-options/standalone/dremio-config/dremio-conf/dist-store-config/