{"record":{"id":"63db0fb8cb2f3905","repo":"hibernate/hibernate-orm","slug":"function-s-has-no-parameters-but-d-arguments-gi","errorCode":null,"errorMessage":"Function %s has no parameters, but %d arguments given","messagePattern":"Function (.+?) has no parameters, but (.+?) arguments given","errorType":"exception","errorClass":"FunctionArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardArgumentsValidators.java","lineNumber":52,"sourceCode":"\t\t\t// nothing to do\n\t\t}\n\t\t@Override\n\t\tpublic String getSignature() {\n\t\t\treturn \"([arg0[, ...]])\";\n\t\t}\n\t};\n\n\t/**\n\t * Static validator for verifying that we have no arguments\n\t */\n\tpublic static final ArgumentsValidator NO_ARGS = new ArgumentsValidator() {\n\t\t@Override\n\t\tpublic void validate(\n\t\t\t\tList<? extends SqmTypedNode<?>> arguments,\n\t\t\t\tString functionName,\n\t\t\t\tBindingContext bindingContext) {\n\t\t\tif ( !arguments.isEmpty() ) {\n\t\t\t\tthrow new FunctionArgumentException(\n\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\tLocale.ROOT,\n\t\t\t\t\t\t\t\t\"Function %s has no parameters, but %d arguments given\",\n\t\t\t\t\t\t\t\tfunctionName,\n\t\t\t\t\t\t\t\targuments.size()\n\t\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t@Override\n\t\tpublic String getSignature() {\n\t\t\treturn \"()\";\n\t\t}\n\t};\n\n\tpublic static ArgumentsValidator min(int minNumOfArgs) {\n\t\tif (minNumOfArgs<1) {","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/StandardArgumentsValidators.java#L34-L70","documentation":"Error \"Function %s has no parameters, but %d arguments given\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A function call in a query supplies arguments that violate the function's signature.","commonSituations":"Passing the wrong number or types of arguments (e.g. untyped nulls, tuples) to HQL/SQL functions.","solutions":["The function takes no parameters, but arguments were supplied.","Call the function with no arguments, e.g. current_date() with no args."],"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"}