Results 1 to 6 of 6

Thread: Trying to import grails sample ACL/Spring Security project

  1. #1

    Default Trying to import grails sample ACL/Spring Security project

    I am using STS 2.6.1, with all the latest grails updates applied.

    I am trying to follow the ACL plugin tutorial (http://burtbeckwith.github.com/grail...ual/index.html), which involves installing and running the sample application (http://burtbeckwith.github.com/grail...ual/index.html). I created a new workspace, downloaded the ZIP file for the sample application, and tried to import it as an existing project. I was prompted to upgrade the project to Grails 1.3.7, and said yes. Unfortunately, the code failed to compile, and I am at a loss as to how to correct the build path.

    The errors I am seeing seem to be related to not being able to resolve the classes that are part of the Spring Security and ACL plugins. For example, I get an error at the following import statement:

    Code:
    import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils
    that says "Groovy:unable to resolve class org.codehaus.groovy.grails.plugins.springsecurity. SpringSecurityUtils"

    The same happens for the import grails.plugins.springsecurity.Secured class, etc.

    When I looked at the build path, there was no obvious place there that mentioned plugin code. Is that the problem? If so, what is the correct location/jar/library to add?

    Thanks for your help,

    Gene

  2. #2
    Join Date
    May 2010
    Posts
    398

    Default

    Perhaps the project isn't compatible with Grails 1.3.7. You could try downloading an older version of Grails and configure that in your workspace instead.

    When it asks you to upgrade to Grails 1.3.7.. you can say no and another dialog should prompt you if you want to configure the version of Grails that
    project declares it was originally using. Unless this is a really old version of Grails (pre 1.2) it should work fine in STS using an older version of Grails.

    The "upgrade" runs the Grails upgrade command, but it really isn't a 100% guarantee that the code of your project will work in the new version of Grails.
    Kris De Volder -- SpringSource

  3. #3
    Join Date
    May 2010
    Posts
    398

    Default

    Forgot to ask...

    The "compile errors" you mention. Are these errors you see in the STS 'problems' view? Or are they errors shown when grails commands are executed? (Depending on where you see them it points at a different kind of issue).

    Also... to determine it is or is not an STS bug, you can try to verify whether you get the same errors on the commandline (i.e. outside of STS). If you see the
    behavior on the commandline is different from the behavior in STS it is a bug and should be reported here:
    https://issuetracker.springsource.com/browse/STS
    Kris De Volder -- SpringSource

  4. #4

    Default

    I was able to upgrade the app correctly from the command line, which caused the Spring ACL plugin to be installed. For some reason, STS didn't do that. After upgrading, I was able to import the project into STS & run it correctly.

    Thanks,

    Gene

  5. #5
    Join Date
    May 2010
    Posts
    398

    Default

    Hi Gene,

    That's interesting. Doing the upgrade from inside STS should be equivalent to running the "grails upgrade" command on the commandline. If that's not the case that is a bug.
    So, I've raised a bug tracker issue here:

    https://issuetracker.springsource.com/browse/STS-1792

    Kris
    Kris De Volder -- SpringSource

  6. #6
    Join Date
    Mar 2011
    Location
    Mountain View
    Posts
    8

    Default

    I have been contributing to a opensource grails project – Agile Tracking Tool (Scrum). This is a medium complex web application. It clearly demonstrates aspects like,
    • Spring Security
    • Graphs and Charts
    • Ajax using prototype framework
    For more details go http://ramya.bhaavana.net/krishna/?p=67
    Krishna

Tags for this Thread

Posting Permissions

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