Results 1 to 4 of 4

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

Hybrid View

  1. #1
    Join Date
    May 2009
    Posts
    12

    Default 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. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

  3. #3
    Join Date
    Nov 2011
    Posts
    10

    Default

    Quote 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 at 06:38 PM.

  4. #4
    Join Date
    Nov 2011
    Posts
    10

    Default

    Quote 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)

Posting Permissions

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