Ошибка компиляции Maven: не удалось выполнить цель org.apache.maven.plugins:maven-compiler-plugin:3. 0

Я получаю следующую ошибку во время работы mvn compile

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project fitnessAdmin: Compilation  failure: Compilation failure:
[ERROR] /D:/appfuse/fitnessAdmin/fitnessAdmin/src/main/java/com/igate/webapp/controller/NameFormController.java:[24,34] cannot find symbol
[ERROR] symbol:   class NameId
[ERROR] location: class com.igate.webapp.controller.NameFormController
[ERROR] /D:/appfuse/fitnessAdmin/fitnessAdmin/src/main/java/com/igate/webapp/controller/NameFormController.java:[27,79] cannot find symbol
[ERROR] symbol:   class NameId
[ERROR] location: class com.igate.webapp.controller.NameFormController
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, 

Могу ли я узнать, как решить эту проблему?

NameFormController класс, приведенный ниже

@Controller @RequestMapping("/nameform*") 
public class NameFormController extends BaseFormController { 
    private GenericManager nameManager = null;

    @Autowired
    public void setNameManager(@Qualifier("nameManager") GenericManager<Name, NameId> nameManager) {
        this.nameManager = nameManager;
    }

    public NameFormController() {
        setCancelView("redirect:names");
        setSuccessView("redirect:names"); 
    }

    @ModelAttribute @RequestMapping(method = RequestMethod.GET) 
    protected Name showForm(HttpServletRequest request) throws Exception {
        String id = request.getParameter("id");

        if (!StringUtils.isBlank(id)) {
            return nameManager.get(new NameId(id));
        }

        return new Name(); 
    }

    @RequestMapping(method = RequestMethod.POST) 
    public String onSubmit(Name name, BindingResult errors, HttpServletRequest request, HttpServletResponse response) throws Exception {
        if (request.getParameter("cancel") != null) {
            return getCancelView();
        }

        if (validator != null) { // validator is null during testing
            validator.validate(name, errors);

            if (errors.hasErrors() && request.getParameter("delete") == null) { // don't validate when deleting
                return "nameform";
            }
        }

        log.debug("entering 'onSubmit' method...");

        boolean isNew = (name.getId() == null);
        String success = getSuccessView();
        Locale locale = request.getLocale();

        if (request.getParameter("delete") != null) {
            nameManager.remove(name.getId());
            saveMessage(request, getText("name.deleted", locale));
        } else {
            nameManager.save(name);
            String key = (isNew) ? "name.added" : "name.updated";
            saveMessage(request, getText(key, locale));

            if (!isNew) {
                success = "redirect:nameform?id=" + name.getId();
            }
        }

        return success; 
    }
}

0 ответов

Другие вопросы по тегам