Announcement Announcement Module
Collapse
No announcement yet.
Command 'security setup' was found but is not currently available (type 'help' then E Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command 'security setup' was found but is not currently available (type 'help' then E

    Newly created spring roo project.. has a single controller.. (so web.xml exists).. ran security setup which failed due to a issue with web.xml. I did not save it and tried a few other things so I can't paste the error.. Needless to say I never touched the web.xml.. Only Roo has so not sure why it had an issue with it.. Now when I run security setup it tells me it's not available. but not why! I assume it's because of the previous failure or a missing dependency. Though not sure how I ran it before if I am missing a dependency.. So it must be the previous failure.. how does one get around this? I really don't feel like starting over yet again today due to a Roo stability issue.. The was supposed to be a "see how quick you can create a prototype with Roo" experiment. So far it's a total failure.. :-(

    thanks!
    Gary

  • #2
    Hi Gary,

    Sorry to hear you had a bad start with Roo.

    It will be hard to find out what went wrong without seeing the actual error. Maybe you create a new sample project and just run this command:

    roo> script vote.roo

    This will install a complete sample project with security installed and configured. This way you may be able to see what went wrong.

    HTH, Stefan

    Comment


    • #3
      Originally posted by gpinkham View Post
      ... supposed to be a "see how quick you can create a prototype with Roo" experiment. So far it's a total failure.. :-(
      Glad to see I'm not the only one...

      I am step 2.10 in http://static.springsource.org/sprin...beginning.html and using STS 2.8.0

      Note, the Roo shell will hide the security setup command until you have created a Web layer. As shown above, the security setup command manages the project pom.xml file. This means additional dependencies have been added to the project. To add these dependencies to the STS workspace you should run the perform eclipse command again followed by a project refresh (if you're using STS or m2eclipse, the "perform eclipse" command should be skipped as it will automatically detect and handle the addition of Spring Security to your project).


      However, I am pretty certain that I have created the web layer because I have deployed to tomcat successfully.

      Is there any reason why the command is not currently available?

      Code:
      ~.domain.Base roo> web mvc all --package ~.web
      Your application already contains a mapping to 'toppings'. Please provide a different path.
      Your application already contains a mapping to 'pizzaorders'. Please provide a different path.
      Your application already contains a mapping to 'pizzas'. Please provide a different path.
      Your application already contains a mapping to 'bases'. Please provide a different path.
      ~.web roo> security setup
      Command 'security setup' was found but is not currently available (type 'help' then ENTER to learn about this command)

      Comment


      • #4
        Originally posted by Stefan Schmidt View Post
        roo> script vote.roo
        Stefan, this was very useful.

        I ran the vote.roo script as suggested and it did run security setup.

        The main difference was the script used separate web mvc scaffold commands and a web mvc controller command whereas the tutorial had web mvc all --package ~.web

        For the tutorial, http://static.springsource.org/sprin...beginning.html, don't use web mvc all --package ~.web

        Thanks

        FYI - here is what a script for Roo 1.1.5

        Code:
        project --topLevelPackage com.springsource.pizza
        
        persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
        
        entity --class ~.domain.Topping --testAutomatically
        field string --fieldName name --notNull --sizeMin 2
        
        web mvc setup
        web mvc scaffold ~.web.ToppingController
        
        entity --class ~.domain.Base --testAutomatically
        field string --fieldName name --notNull --sizeMin 2
        web mvc scaffold ~.web.BaseController
        
        entity --class ~.domain.Pizza --testAutomatically
        field string --fieldName name --notNull --sizeMin 2
        field number --fieldName price --type java.lang.Float
        field set --fieldName toppings --type ~.domain.Topping
        field reference --fieldName base --type ~.domain.Base
        web mvc scaffold ~.web.PizzaController
        
        
        entity --class ~.domain.PizzaOrder --testAutomatically 
        field string --fieldName name --notNull --sizeMin 2
        field string --fieldName address --sizeMax 30
        field number --fieldName total --type java.lang.Float 
        field date --fieldName deliveryDate --type java.util.Date
        field set --fieldName pizzas --type ~.domain.Pizza
        web mvc scaffold ~.web.PizzaOrderController
        
        web mvc language --code de
        web mvc language --code es
        
        logging setup --level WARN --package WEB
        
        security setup
        
        finder list --class com.springsource.pizza.domain.Pizza --depth 2 --filter reg,betw,IpEq
        
        logging setup --level INF
        Last edited by dc3; Nov 3rd, 2011, 07:38 PM.

        Comment


        • #5
          The main difference was the script used separate web mvc scaffold commands and a web mvc controller command whereas the tutorial had web mvc all --package ~.web
          Hi All,
          I have the same issue. My question though is regarding the post above which was from 2010. I'm half way through with 2013 and I still have this issue. I'm running Roo 1.2.4.RELEASE [rev 75337cf] the original post was Roo 1.1.5

          To fix the issue I need to rebuild my project and instead of running web mvc all --package I need to run web mvc <myContoller>


          3 yrs 1.1.5 -> 1.2.4 How long does it take for defects/fixes to make it into new Roo versions?

          I suppose that was a rant more than a question.

          Thanks for the support that we do have

          Andrew

          Comment

          Working...
          X