0

I renamed different things throughout a Java Maven project by appending text in front of "Remarks" text. I did this by searching for remarks and appending the text. I attempted to use refactoring but it didn't give me the option in VSCode.

Now I am getting an error message "cannot find symbol" across the renamed variables/methods. Below is part of the error message redacted.

194.5 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project redacted-api: Compilation failure: Compilation failure:
194.5 [ERROR] /app/src/main/java/redacted/redacted/redacted/report/service/factory/ReportQueries.java:[258,31] cannot find symbol
194.5 [ERROR]   symbol:   method setTableredactedRemarks(java.util.List<redacted.redacted.redacted.report.model.redactedRepredactedRmk>,redacted.redacted.redacted.report.service.factory.attributes.ReportTable)
194.5 [ERROR]   location: variable reportTableService of type redacted.redacted.redacted.report.service.ReportTableService
194.5 [ERROR] /app/src/main/java/redacted/redacted/redacted/report/service/factory/ReportQueries.java:[288,31] cannot find symbol
194.5 [ERROR]   symbol:   method setTableredactedRemarks(java.util.List<redacted.redacted.redacted.report.model.redactedRepredactedRmk>,redacted.redacted.redacted.report.service.factory.attributes.ReportTable)
194.5 [ERROR]   location: variable reportTableService of type redacted.redacted.redacted.report.service.ReportTableService
194.5 [ERROR] /app/src/main/java/redacted/redacted/redacted/report/service/factory/ReportQueries.java:[319,31] cannot find symbol

Any idea on how to get the program to work with the bootstrap startup script that builds the Docker container? Thanks

3
  • 2
    There are two likely possibilities for the source of this issue: (i) you have some stale classes hanging around in the compilation classpath or otherwise cached somehow; or (ii) your updates broke your code. The first probably could be addressed by performing a clean rebuild. The second would need to be addressed by studying the code where each error is reported to determine the nature of the error, and fixing it. Commented yesterday
  • 2
    1) What do you mean by "Remarks"? There is no such term in Java. 2) In case if you are renaming a public class or interface - you must also rename its containing file. Commented yesterday
  • 1
    Without a concrete example the community can not help more. Add a minimal reproducible example to the question including a class source code, the error for that class and the path and name of the source file. Commented yesterday

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.