Announcement Announcement Module
Collapse
No announcement yet.
When adding toString method, Roo is not updateing AspectJ file Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Is the randb.controllers.Lokacija type available in your project (as in src/main/java/randb/controllers/Lokacija)?

    Comment


    • #3
      yes,


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

      Comment


      • #4
        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?

        Comment


        • #5
          Same thing is happening with 1.1.3,

          I'm sending you project zip file on private message

          Comment


          • #6
            I have resolved issue.

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

            Comment


            • #7
              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

              Comment


              • #8
                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) {

                Comment


                • #9
                  unfortunately, it's happening again

                  anybody got any ideas what is causing the problem?

                  Comment

                  Working...
                  X