Results 1 to 7 of 7

Thread: Possible Issue w/Spring 1.1.3 - Overriding throws exception

  1. #1
    Join Date
    Oct 2010
    Posts
    11

    Default Possible Issue w/Spring 1.1.3 - Overriding throws exception

    Good day,

    I had a working project running 1.1.2. I upgraded to 1.1.3 and the following issues began. I have not found a work-around but wonder if there is a technique for overriding methods that I should be using and am not.

    In my AthleteController I have the following:

    Code:
    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
        public String show(@PathVariable("id") Long id, Model uiModel) {
    	AthleteController.addBirthdayDateTimeFormatPatterns(uiModel);
    	uiModel.addAttribute("athlete", Athlete.findAthlete(id));
    	uiModel.addAttribute("itemId", id);
    	return "athletes/show";
        }
    and in my roo shell it instantly complains:

    Code:
    Method 'show' already defined in target type 'com.blah.controllers.AthleteController' (ITD target 'com.blah.controllers.AthleteController_Roo_Controller')
    For basically every method that I have overridden in my controllers it complains. (As I fix one, the next one comes up complaining in the shell.) Renaming the method name does stop the complaining,but Roo then also re-gen's the method in the _Roo_ class.

    Is there a proper way to override methods in 1.1.3 now that I am not following? Is there any more information that I can provide to help?

    Thanks in advance.

  2. #2
    Join Date
    Dec 2010
    Posts
    29

    Default

    I have the same problem. That and my finders that don't work anymore in 1.1.3 (Roo generates the findSomethingBySomethingForm method but not the actual findSomethingBySomething method that calls the finder on the entity)

  3. #3
    Join Date
    Dec 2005
    Posts
    929

    Default

    Please raise a Jira request for this issue and attach a Roo script and/or zipped up project ( use the Roo backup command to create the zip)
    Last edited by Alan Stewart; Apr 19th, 2011 at 06:16 AM.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  4. #4
    Join Date
    Oct 2010
    Posts
    11

  5. #5
    Join Date
    Dec 2005
    Posts
    929

    Default

    Please attach a zipped up project and/or a Roo script to the ticket
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  6. #6
    Join Date
    Dec 2005
    Posts
    929

    Default

    https://jira.springsource.org/browse/ROO-2368 has been resolved. The issue was to do with some untested refactored code in the web mvc controller add-on. My sincere apologies for this. We plan to do a 1.1.4 maintenance release not long after Easter.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

  7. #7
    Join Date
    Dec 2005
    Posts
    929

    Default

    The same issue that has plagued each of the pushed-in controller methods (ROO-2368), finder methods (ROO-2362) and Json methods (which I created myself in ROO-2373) has been resolved in each case.
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •