{"record":{"id":"53e6563d21cc7d57","repo":"hibernate/hibernate-orm","slug":"s-should-specify-either-s-or-s-was-s","errorCode":null,"errorMessage":"'%s' should specify either '%s' or '%s' (was '%s')","messagePattern":"'(.+?)' should specify either '(.+?)' or '(.+?)' \\(was '(.+?)'\\)","errorType":"exception","errorClass":"AnnotationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java","lineNumber":528,"sourceCode":"\n\t\t\timplicitlyQuoteIdentifiers = configService.getSetting(\n\t\t\t\t\tGLOBALLY_QUOTED_IDENTIFIERS,\n\t\t\t\t\tBOOLEAN,\n\t\t\t\t\tfalse\n\t\t\t);\n\n\t\t\timplicitCacheAccessType = configService.getSetting(\n\t\t\t\t\tDEFAULT_CACHE_CONCURRENCY_STRATEGY,\n\t\t\t\t\tvalue -> AccessType.fromExternalName( value.toString() )\n\t\t\t);\n\n\t\t\timplicitListClassification = configService.getSetting(\n\t\t\t\t\tDEFAULT_LIST_SEMANTICS,\n\t\t\t\t\tvalue -> {\n\t\t\t\t\t\tfinal var classification = CollectionClassification.interpretSetting( value );\n\t\t\t\t\t\tif ( classification != CollectionClassification.LIST\n\t\t\t\t\t\t\t&& classification != CollectionClassification.BAG ) {\n\t\t\t\t\t\t\tthrow new AnnotationException(\n\t\t\t\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\t\t\t\tLocale.ROOT,\n\t\t\t\t\t\t\t\t\t\t\t\"'%s' should specify either '%s' or '%s' (was '%s')\",\n\t\t\t\t\t\t\t\t\t\t\tDEFAULT_LIST_SEMANTICS,\n\t\t\t\t\t\t\t\t\t\t\tjava.util.List.class.getName(),\n\t\t\t\t\t\t\t\t\t\t\tjava.util.Collection.class.getName(),\n\t\t\t\t\t\t\t\t\t\t\tclassification.name()\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn classification;\n\t\t\t\t\t},\n\t\t\t\t\tCollectionClassification.BAG\n\t\t\t);\n\t\t}\n\n\t\t@Override\n\t\tpublic String getImplicitSchemaName() {","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java#L510-L546","documentation":"Error \"'%s' should specify either '%s' or '%s' (was '%s')\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A configuration setting accepts only a fixed set of values and got something else.","commonSituations":"Setting a mis-spelled or out-of-range value for a Hibernate configuration property.","solutions":["Set exactly one of the two expected configuration properties to the required value; the current value is not recognized.","Check the Hibernate documentation for the allowed values of the named setting.","Remove the setting to use the documented default behavior."],"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"}