{"record":{"id":"6cafbc428723dcbc","repo":"JetBrains/intellij-community","slug":"0-does-not-exist","errorCode":null,"errorMessage":"''{0}'' does not exist","messagePattern":"''(.+?)'' does not exist","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/java-impl-refactorings/src/com/intellij/refactoring/introduceparameterobject/IntroduceParameterObjectDialog.java","lineNumber":507,"sourceCode":"      if (className.isEmpty() || !nameHelper.isIdentifier(className)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.parameter.class.name\", className));\n      }\n      final String packageName = getPackageName();\n\n      if (packageName.isEmpty() || !nameHelper.isQualifiedName(packageName)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.parameter.class.package.name\", packageName));\n      }\n    }\n    else {\n      final String className = getExistingClassName();\n      if (className.isEmpty() || !nameHelper.isQualifiedName(className)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.qualified.parameter.class.name\", className));\n      }\n      if (JavaPsiFacade.getInstance(getProject()).findClass(className, GlobalSearchScope.allScope(getProject())) == null) {\n        throw new ConfigurationException(JavaRefactoringBundle.message(\"introduce.parameter.object.error.class.does.not.exist\", className));\n      }\n    }\n  }\n\n  private @NotNull String getInnerClassName() {\n    return myInnerClassNameTextField.getText().trim();\n  }\n\n  public @NotNull String getPackageName() {\n    return packageTextField.getText().trim();\n  }\n\n  public @NotNull String getExistingClassName() {\n    return existingClassField.getText().trim();\n  }\n\n  public @NotNull String getClassName() {\n    return classNameField.getText().trim();","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/java-impl-refactorings/src/com/intellij/refactoring/introduceparameterobject/IntroduceParameterObjectDialog.java#L489-L525","documentation":"Thrown by IntroduceParameterObjectDialog.canRun() (IntroduceParameterObjectDialog.java:507) in the 'Use existing class' branch when the qualified name is syntactically valid but JavaPsiFacade.findClass(name, GlobalSearchScope.allScope(project)) returns null — no such class resolvable on the project classpath (production + library sources). The refactoring needs a real class to add fields/setters to, so an unresolvable target aborts.","triggerScenarios":"Typing a qualified name of a class that is not on the module dependency graph: wrong package prefix, class lives in a module not a dependency of the current one, a library without sources resolved only in a narrower scope, or a simple typo.","commonSituations":"Splitting a multi-module project and the parameter-object class sits in another module; class exists only in test sources while searched scope resolves production; third-party class whose artifact was removed after a dependency cleanup; stale index after big VCS updates.","solutions":["Fix the name/package typo — use the class browser (...) to pick the class instead of typing.","Add the module/library containing the class to the current module's dependencies (File | Project Structure | Modules | Dependencies).","If the class was just created or pulled, wait for indexing to finish or File | Invalidate Caches and restart to refresh the index.","Verify with JavaPsiFacade.getInstance(project).findClass(fqn, GlobalSearchScope.allScope(project)) != null before confirming."],"exampleFix":"// before\nJavaPsiFacade.getInstance(project)\n  .findClass(\"com.acme.paramz.RequestParams\", GlobalSearchScope.allScope(project)); // null -> error\n\n// after\nPsiClass cls = JavaPsiFacade.getInstance(project)\n  .findClass(\"com.acme.params.RequestParams\", GlobalSearchScope.allScope(project));\nif (cls == null) { /* fix dependency or name before running refactoring */ }","handlingStrategy":"validation","validationCode":"String fqn = getExistingClassName().trim();\nPsiClass existing = JavaPsiFacade.getInstance(project)\n    .findClass(fqn, GlobalSearchScope.allScope(project));\nif (existing == null) {\n  // resolve failure: fix dependencies/index before running Introduce Parameter Object\n}","typeGuard":"boolean resolves(String fqn, Project project) {\n  if (fqn == null || fqn.isEmpty()) return false;\n  if (!PsiNameHelper.getInstance(project).isQualifiedName(fqn)) return false;\n  return JavaPsiFacade.getInstance(project)\n      .findClass(fqn, GlobalSearchScope.allScope(project)) != null;\n}","tryCatchPattern":null,"preventionTips":["Add the target class's module as a dependency before pointing the refactoring at it.","After large VCS updates, let the index settle before cross-module refactorings."],"tags":["intellij","refactoring","java","resolution","classpath","index"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}