Accessing cache target table in Data Virtualization fails with error "Direct access to cache table is not allowed."

Accessing cache target table in Data Virtualization fails with error "Direct access to cache table is not allowed."

book

Article ID: KB0137964

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.8.1 and above

Description

Accessing any cache target table in DV fails with error "Direct access to cache table is not allowed". For example the "SalesView" from examples folder is cached in ds_orders data source using multi-table cache tables, however accessing the bucket VS_cache_0 fails with error -  

image.png

Complete stack trace of the error message found in cs_server.log 

===

ERROR [jetty thread pool-2378] 2025-09-10 18:30:51.147 -0400 Util - User Exception Occurred
com.compositesw.common.UserException: An internal error has occurred.
Cause: Error [qengine--1]: Unable to execute: select * from /shared/examples/ds_orders/tutorial/VS_cache_0
Direct access to cache table '/shared/examples/ds_orders/tutorial/VS_cache_0' is not allowed. On line 1, column 15.  [parser-2900560] [Log ID: e5826bea-a3fe-42c1-a885-de26f1a36b31]  [Log ID: d0c3b6e9-b009-45ca-aa5a-835171b0cf80] 
at com.compositesw.common.UserException$Builder.build(UserException.java:169) ~[cscommon.jar:?]
at com.compositesw.cdms.webapi.service.Util.createWebapiException(Util.java:91) ~[cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.Util.createWebapiException(Util.java:77) ~[cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WSessionImpl.executeQuery(WSessionImpl.java:199) ~[cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataImpl.session_executeQueryEx2(WMetaDataImpl.java:1317) ~[cswebapi-server.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataSvc_Tie.invoke_session_executeQueryEx2(WMetaDataSvc_Tie.java:1459) ~[cswebapi.jar:?]
at com.compositesw.cdms.webapi.service.WMetaDataSvc_Tie.processingHook(WMetaDataSvc_Tie.java:21714) ~[cswebapi.jar:?]
at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:350) ~[webservices-rt-2.1.jar:2.1]
at com.sun.xml.rpc.server.http.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:465) ~[webservices-rt-2.1.jar:?]
at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:119) ~[webservices-rt-2.1.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) ~[servlet-api-3.1-cis-trunk.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[servlet-api-3.1-cis-trunk.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:811) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at com.compositesw.server.services.SecurityHeadersFilter.doFilter(SecurityHeadersFilter.java:106) ~[csserver.jar:?]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:584) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:142) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:576) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:222) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1126) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:514) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:184) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1060) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:140) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:212) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:96) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.Server.handle(Server.java:498) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) ~[jetty-all-9.2.30.v20200428.jar:9.2.30.v20200428]
at java.lang.Thread.run(Thread.java:842) ~[?:?]
Caused by: com.compositesw.common.SafeException: Error [qengine--1]: Unable to execute: select * from /shared/examples/ds_orders/tutorial/VS_cache_0
Direct access to cache table '/shared/examples/ds_orders/tutorial/VS_cache_0' is not allowed. On line 1, column 15.  [parser-2900560] [Log ID: e5826bea-a3fe-42c1-a885-de26f1a36b31] 
at com.compositesw.cdms.services.parser.TableRefFilter.checkDirectCacheTableAccess(TableRefFilter.java:360) ~[csserver.jar:?]
at com.compositesw.cdms.services.parser.TableRefFilter.doFilter(TableRefFilter.java:216) ~[csserver.jar:?]
at com.compositesw.cdms.services.parser.TableRefFilter.doFilter(TableRefFilter.java:53) ~[csserver.jar:?]
at com.compositesw.cdms.services.parser.CommandChain.doFilter(CommandChain.java:30) ~[cscommon.jar:?]
at com.compositesw.cdms.services.parser.Resolver.resolve(Resolver.java:842) ~[cscommon.jar:?]
at com.compositesw.cdms.services.parser.Select.resolve(Select.java:567) ~[cscommon.jar:?]
at com.compositesw.server.qe.QueryEngine.a(SourceFile:1740) ~[csqe.jar:?]
at com.compositesw.server.qe.QueryEngine.a(SourceFile:280) ~[csqe.jar:?]
at com.compositesw.server.qe.QueryEngine.execute(SourceFile:202) ~[csqe.jar:?]
at com.compositesw.server.qe.QESqlRequest.execute(SourceFile:152) ~[csqe.jar:?]
at com.compositesw.server.request.HookSqlRequest.execute(HookSqlRequest.java:67) ~[csserver.jar:?]
at com.compositesw.cdms.webapi.service.WSessionImpl.executeQuery(WSessionImpl.java:178) ~[cswebapi-server.jar:?]
... 31 more

===

Environment

All supported Operating Systems

Resolution

This error can occur if the DV Server configuration "Disable Direct Cache Table Access" is set to true.

To resolve this issue, follow the below steps -

(1) From Studio > Configuration panel > Server > Configuration > Cache > set the configuration value "Disable Direct Cache Table Access" to false.

Note - No DV Server restart is required for the configuration changes to take effect. 

Screenshot of the configuration for reference - 

image.png

(2) Now, test by executing the cache table access. 

Additional information regrading this configuration from DV User Guide : Disabling Direct Cache Table Access
To enforce transparency of the Caching function, TDV prohibits direct references to cache target tables, allowing them only as replacements for cached resources. To manually allow direct cache table references, change the setting Server -> Configuration -> Cache -> Disable Direct Cache Table Access to TRUE. By default this is set to FALSE.

Issue/Introduction

Accessing cache target table in Data Virtualization fails with error "Direct access to cache table is not allowed."