{"record":{"id":"ded213dc516dfaa1","repo":"brettwooldridge/HikariCP","slug":"property-s-does-not-exist-on-target-s","errorCode":null,"errorMessage":"Property %s does not exist on target %s","messagePattern":"Property (.+?) does not exist on target (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/main/java/com/zaxxer/hikari/util/PropertyElf.java","lineNumber":145,"sourceCode":"      return null;\n   }\n\n   private static void setProperty(final Object target, final String propName, final Object propValue, final List<Method> methods)\n   {\n      final var logger = LoggerFactory.getLogger(PropertyElf.class);\n\n      // use the english locale to avoid the infamous turkish locale bug\n      var methodName = \"set\" + propName.substring(0, 1).toUpperCase(Locale.ENGLISH) + propName.substring(1);\n      var writeMethod = methods.stream().filter(m -> m.getName().equals(methodName) && m.getParameterCount() == 1).findFirst().orElse(null);\n\n      if (writeMethod == null) {\n         var methodName2 = \"set\" + propName.toUpperCase(Locale.ENGLISH);\n         writeMethod = methods.stream().filter(m -> m.getName().equals(methodName2) && m.getParameterCount() == 1).findFirst().orElse(null);\n      }\n\n      if (writeMethod == null) {\n         logger.error(\"Property {} does not exist on target {}\", propName, target.getClass());\n         throw new RuntimeException(String.format(\"Property %s does not exist on target %s\", propName, target.getClass()));\n      }\n\n      try {\n         var paramClass = writeMethod.getParameterTypes()[0];\n         String value = propValue.toString();\n         if (paramClass == int.class) {\n            writeMethod.invoke(target, Integer.parseInt(propValue.toString()));\n         }\n         else if (paramClass == long.class) {\n            writeMethod.invoke(target, parseDuration(value).map(Duration::toMillis).orElseGet(() -> Long.parseLong(value)));\n         }\n         else if (paramClass == short.class) {\n            writeMethod.invoke(target, Short.parseShort(value));\n         }\n         else if (paramClass == boolean.class || paramClass == Boolean.class) {\n            writeMethod.invoke(target, Boolean.parseBoolean(value));\n         }\n         else if (paramClass.isArray() && char.class.isAssignableFrom(paramClass.getComponentType())) {","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/brettwooldridge/HikariCP/blob/a4d93f4f85517f90e632b795486d7102e933d7ff/src/main/java/com/zaxxer/hikari/util/PropertyElf.java#L127-L163","documentation":"PropertyElf.setProperty (used for HikariConfig property files / setProperties) reflects a setter named set<PropName> on the target; if none exists it throws RuntimeException 'Property %s does not exist on target'. It means the configuration names a property the config class does not have.","triggerScenarios":"Typo in a properties file used with HikariConfig(Properties) (e.g. maximumPoolsize vs maximumPoolSize); a property valid in a newer HikariCP version used against an older jar; passing driver-specific properties at the top level instead of under dataSourceProperties.","commonSituations":"Version downgrades (property removed/renamed across HikariCP releases), copy-pasted properties with case errors, mixing Hikari properties and driver properties in the same file.","solutions":["Check exact spelling/case against HikariConfig setters (maximumPoolSize, connectionTimeout, ...); keys are case-sensitive","Move driver-specific keys (user, serverName, ...) under the dataSourceProperties. prefix or into the dataSource block","Upgrade/downgrade HikariCP to the version whose property set matches your file","Log available properties via PropertyElf.getPropertyNames(HikariConfig.class) when in doubt"],"exampleFix":"# before\nmaximumPoolsize=10\nconnecitonTimeout=30000\n\n# after\nmaximumPoolSize=10\nconnectionTimeout=30000","handlingStrategy":"validation","validationCode":"var known = new java.util.HashSet<>(PropertyElf.getPropertyNames(HikariConfig.class));\nfor (String key : props.stringPropertyNames()) {\n    if (!known.contains(key)) throw new IllegalArgumentException(\"Unknown Hikari property: \" + key);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match property keys exactly to HikariConfig setter names (case-sensitive)","Put driver-specific keys under dataSourceProperties","Pin HikariCP version and validate config files against it"],"tags":["hikaricp","configuration","properties","reflection"],"backgroundTag":null,"analyzedSha":"a4d93f4f85517f90e632b795486d7102e933d7ff","analyzedAt":"2026-08-14T12:11:37.292Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}