Results 1 to 9 of 9

Thread: When adding toString method, Roo is not updateing AspectJ file

  1. #1
    Join Date
    Apr 2011
    Posts
    28

    Default When adding toString method, Roo is not updateing AspectJ file

    Hi,

    When I add toString() method to my domain object,
    Spring Roo is not detecting/deleting toString() method from generated AspectJ file.
    Result is compile time error. I have to edit generated AspectJ file manually so I can compile the project.


    I'm using STS, Spring Roo 1.1.2

    same behaviour is happening with Spring Roo 1.1.3.BUILD-SNAPSHOT [rev b9c94ad]

    Also, last message from Spring Roo shell is
    Unable to obtain physical type metdata for type randb.controllers.Lokacija

    Maybie that's causing the problem? How can I resolve it?
    With version 1.1.1 everything worked fine.

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Is the randb.controllers.Lokacija type available in your project (as in src/main/java/randb/controllers/Lokacija)?
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  3. #3
    Join Date
    Apr 2011
    Posts
    28

    Default

    yes,


    Code:
    package randb.domain;
    
    import org.springframework.roo.addon.entity.RooEntity;
    ...
    ...
    
    
    @RooJavaBean
    @RooToString
    @RooEntity
    public class Lokacija {
    ...
    }

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    It seems Roo was unable to find it though which indicates that something is wrong. Can you share the project and steps to reproduce the issue?
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  5. #5
    Join Date
    Apr 2011
    Posts
    28

    Default

    Same thing is happening with 1.1.3,

    I'm sending you project zip file on private message

  6. #6
    Join Date
    Apr 2011
    Posts
    28

    Default

    I have resolved issue.

    I have deleted and created Lokacija controller,
    now, it's working just fine (detecting file changes)

  7. #7
    Join Date
    Apr 2011
    Posts
    28

    Default

    or not,

    i've isolated the problem

    adding this method to controller

    Code:
        @RequestMapping(value = "/{id}", method = RequestMethod.GET)
        public String show(@PathVariable("id") Long id, Model model) {
    		Lokacija lokacija = Lokacija.findLokacija(id);
    		model.addAttribute("lokacija", lokacija);
            model.addAttribute("itemId", id);
               
            // pripremi sve instalirane antene
            ArrayList<InstalacijaAntene> instaliraneAntene = new ArrayList();
            for(RBS rbs : lokacija.getRBSovi()){
            	for(Celija celija : rbs.getCelije()){
            		instaliraneAntene.addAll(celija.getInstaliraneAntene());
            	}
            }
            
            FazaIzgradnjeStatus.findAllFazaIzgradnjePoLokaciji(lokacija);
            
            model.addAttribute("antene", instaliraneAntene);
            model.addAttribute("fazeIzgradnje", FazaIzgradnjeStatus.findAllFazaIzgradnjePoLokaciji(lokacija));
        	
            return "lokacijas/prikazilokaciju";
        }
    causes Roo to crash

    Code:
    Unable to obtain physical type metdata for type randb.controllers.Lokacija

  8. #8
    Join Date
    Apr 2011
    Posts
    28

    Default

    i've managed to resolve the issue by renaming show method to show2

    I've changed

    Code:
        public String show(@PathVariable("id") Long id, Model model) {
    to

    Code:
        public String show2(@PathVariable("id") Long id, Model model) {

  9. #9
    Join Date
    Apr 2011
    Posts
    28

    Default

    unfortunately, it's happening again

    anybody got any ideas what is causing the problem?

Posting Permissions

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