{"record":{"id":"579f21a1e0e45af7","repo":"hibernate/hibernate-orm","slug":"cache-storage-not-supported","errorCode":null,"errorMessage":"Cache storage not supported","messagePattern":"Cache storage not supported","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQuery.java","lineNumber":454,"sourceCode":"\n\t@Override\n\t@Nonnull\n\tpublic CacheRetrieveMode getCacheRetrieveMode() {\n\t\tthrow new IllegalStateException( \"Cache retrieval not supported\" );\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic QueryImplementor<T> setCacheRetrieveMode(@Nonnull CacheRetrieveMode cacheRetrieveMode) {\n\t\tverifySelectionOption( \"Result caching\" );\n\t\tsuper.setCacheRetrieveMode( cacheRetrieveMode );\n\t\treturn this;\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic CacheStoreMode getCacheStoreMode() {\n\t\tthrow new IllegalStateException( \"Cache storage not supported\" );\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic QueryImplementor<T> setCacheStoreMode(@Nonnull CacheStoreMode cacheStoreMode) {\n\t\tverifySelectionOption( \"Result caching\" );\n\t\tsuper.setCacheStoreMode( cacheStoreMode );\n\t\treturn this;\n\t}\n\n\t@Override @SuppressWarnings(\"removal\")\n\t@Nullable\n\tpublic LockModeType getLockMode() {\n\t\treturn queryOptions.getLockOptions().getLockMode().toJpaLockMode();\n\t}\n\n\t@Override\n\t@Nonnull","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractQuery.java#L436-L472","documentation":"Error \"Cache storage not supported\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Query caching is used in an unsupported way: Cache storage not supported","commonSituations":"Enabling result-set caching on historical (audit) queries, or using cache modes the query does not support.","solutions":["Cache storage (CacheStoreMode) is not supported for this query kind. Do not set a cache store mode here."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}