Announcement Announcement Module
Collapse
No announcement yet.
No 'New Spring Roo Project' on fresh system Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • No 'New Spring Roo Project' on fresh system

    Hello,

    this is my first post here and I'm sorry, to ask for such a basic problem, but it seems to be bigger than I thought.

    I have a clean Windows 7 x64 system, all Updates installes. I have installed the latest JDK 6 for x64. And I downloaded the new Spring Roo Toolsuite 3.0 x64 and installed it to "C:\Program Files\springsource\" in this folder are 4 subfolders, on for maven, one for roo, one for sts and one for vfabric tc server.

    When I press File -> New -> Spring Roo Project, and insert Project Name and Top level package name, then click Next and Finish, I get the new Project. But there are two problems.

    First the Roo Shell is telling "Please stand by until the Roo Shell is completely loaded." but nothing appears.

    Second the project i just created has an exclamation mark and I can find some Java Build Path Problems in the Markers Section. They are "Project 'poc' is missing required source folder: 'src/main/java'" and a few others for src/main/resources, src/test/java, ...

    What am I doing wrong? Is this a bug? Did I forget to configure STS the right way???

    Thank you very much

  • #2
    Hey!

    Please don't install the Spring Tool Suite into "Program Files" under Windows 7. The operating system treats this folder with very specific permissions and Spring Roo will not be able to deal with this when running from within STS. Please use a different location on your hard drive.

    HTH,
    Martin

    Comment


    • #3
      Thank you very much

      Now I use C:\springsource as the parent folder. A few workarounds were still needed. I had to restart Eclipse after the creation of the new project. Then right-click on the project -> Spring Tools -> Open Roo Shell.
      There were still a few errors, cause the project expected the folders 'src/main/java', 'src/main/resources', 'src/test/java' and 'src/test/resources'. A few of them didn't already exist. So I simply had to ignore these errors and go on using Roo. After all there was only one thing that has not been created by Roo, the 'src/test/resources'. So I just remove it manually from the build path and everything worked fine.

      Thanks again

      Comment


      • #4
        Hey!

        Glad to hear you got it working. Can you explain in more detail (maybe with a few steps on how to reproduce) what problems you observed? We would be very happy to hear more details there in order to solve those issues in future releases.

        Thanks a lot!
        -Martin

        Comment


        • #5
          Hi,

          It would be very helpful if you can provide a more descriptive list of steps to follow in order to fix this

          Thanks,

          Originally posted by chring View Post
          Thank you very much

          Now I use C:\springsource as the parent folder. A few workarounds were still needed. I had to restart Eclipse after the creation of the new project. Then right-click on the project -> Spring Tools -> Open Roo Shell.
          There were still a few errors, cause the project expected the folders 'src/main/java', 'src/main/resources', 'src/test/java' and 'src/test/resources'. A few of them didn't already exist. So I simply had to ignore these errors and go on using Roo. After all there was only one thing that has not been created by Roo, the 'src/test/resources'. So I just remove it manually from the build path and everything worked fine.

          Thanks again

          Comment


          • #6
            I'm sorry I didn't answer yet. I'm working on all the things and figured out a few problems, and the simple solution, that could be included to solve the problems.
            Please let me try a few more things, so that I can give you a clear answer.
            University, ... is stealing me a little time, too :/

            Comment


            • #7
              Overview: I will first explain you what my system looks like, then I will explain what I expect the system (STS) to do, then I will explain what I did, then I will explain the occuring problems, then I will explain my workarounds.

              My system: A fresh Windows 7 x64 Professional installation, SP1 and all the latest updates installed. jdk-6u35-windows-x64.exe installed. spring-tool-suite-3.0.0.RELEASE-e4.2-win32-x86_64-installer.exe installed. I've chosen the x64-Versions of everything, cause my Windows is also a 64-bit system.

              My expectations: It should be possible to follow the 10 minutes tutorial (http://static.springsource.org/sprin...ro-first-steps) out of the STS like it should be possible in the plain console without the STS.

              What I did: 1) open STS
              2) File -> New -> Spring Roo Project
              3) Project name: roopoc, Top level package name: com.tenminutes -> Next -> Finish
              4) Waiting for all tasks (listed under 'Progress') to finish...... File -> Restart
              5) Right-Click on project 'roopoc' -> Spring Tools -> Open Roo Shell
              6) in the Roo shell perform the following commands
              6a) jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
              6b) entity jpa --class ~.Timer --testAutomatically
              6c) field string --fieldName message --notNull
              6d) web mvc setup
              6e) web mvc all --package ~.web
              6f) selenium test --controller ~.web.TimerController
              6g) perform tests -> Error message in Roo Shell: CreateProcess error=2, Das System kann die angegebene Datei nicht finden

              What problems occured: 1) At step 4 I realised, that the Roo Shell didn't open, I had to restart STS and perform step 5 to get the Roo shell.
              2) I realised at point 5 that there is a red exclamation mark above the project, because there were some problems with the Build Path. At that point you can see where they come from, when you Right-Click the projet 'roopoc' -> Build Path -> Configure Build Path -> Source
              3) At point 6g there occured an error. It took me a little time to find out, what went wrong.

              My workarounds/fixes:
              1) I already mentioned, that restarting eclipse and manually open the roo shell, got me the shell. It would be nice, if the Roo Shell could really open automatically after creating a new Roo Project.
              2) The red exclamation mark is seen in the new Spring Tool Suite 3.0.0 it isn't seen in SpringSource Tool Suite 2.9.2 after all the fixes I will explain in the following. You could solve this by manually cleaning up the build path. But there are too many other errors in the system, so please again keep on reading.
              3) This is the real problem. To find out what went wrong I tried the same steps in the plain Roo Shell. And then I realised, that maven was not found correctly. To make it short, add the Bin-Folders of Roo, Maven and JDK to you Windows-Path-Environment-Variable. On my system I clicked on Windows-Start -> Right-Click on Computer -> Eigenschaften (Properties) -> Erweiterte Systemeinstellungen (Extended system settings in English Systems?) -> Umgebungsvariablen (Environment variables in English Systems?) -> Double-Click on path and extend the existing value by ";C:\Users\christian\Downloads\springsource\ap ache-maven-3.0.3\bin;C:\Users\christian\Downloads\springsourc e\spring-roo-1.2.2.RELEASE\bin;C:\Program Files\Java\jdk1.7.0_07\bin" (will vary on your system). Also add the new systemvariable 'JAVA_HOME' as a new systemvariable with the value "C:\Program Files\Java\jdk1.7.0_07" (may vary on your system).
              Then close everything by OK->OK->OK and restart your STS.
              Delete the old project 'roopoc' by Right-Click on it -> Delete -> Check 'Delete project on disk (cannot be undone)' -> OK
              Lets try again. (attention about the few changes)

              What I did - Take 2: 1) -
              2) File -> New -> Spring Roo Project -> No windows appears...!?! -> Close STS -> Start it again -> Create a new workspace
              2b) File -> New -> Spring Roo Project
              3) Project name: roopoc2, Top level package name: com.tenminutes -> Next -> Finish -> now it takes longer...

              What problems occured - Take 2: 1) System hangs.

              My workarounds/fixes - Take 2: 1) Force to restart your whole windows.
              2) Open STS and retry.

              What I did - Take 3: 1) -
              2) File -> New -> Spring Roo Project
              3) Project name: roopoc3, Top level package name: com.tenminutes -> Next -> Finish
              4) ... File -> Restart
              5) Right-Click on project 'roopoc3' -> Spring Tools -> Open Roo Shell
              6) in the Roo shell perform the following commands
              6a) jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
              6b) entity jpa --class ~.Timer --testAutomatically
              6c) field string --fieldName message --notNull
              6d) web mvc setup
              6e) web mvc all --package ~.web
              6f) selenium test --controller ~.web.TimerController
              6g) perform tests -> a new different Error message in Roo Shell appears: "[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project roopoc3: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Failure to find org.aspectj:aspectjtools:jar:1.7.0.RC1 in http://maven.springframework.org/release was cached in the local repository, resolution will not be reattempted until the update interval of spring-maven-release has elapsed or updates are forced"

              My workarounds/fixes - Take 3: 1) I decided that the new STS 3.0.0 is not ready yet.
              2) I remove manually everything that has to do with the new STS.
              3) I downloaded the 'old' springsource-tool-suite-2.9.2.RELEASE-e3.7.2-win32-x86_64-installer.exe
              4) Install it.
              5) Go to windows environment variables again and check your Path-Variable. Because of the older version we just installed, the versions should have changed. In my case I had to change "C:\Users\christian\Downloads\springsource\spr ing-roo-1.2.2.RELEASE\bin" to "C:\Users\christian\Downloads\springsource\spr ing-roo-1.2.1.RELEASE\bin".
              6) Clean-up the already downloaded maven-artifacts by manually deleting the folder ".m2". I find that folder in "C:\Users\christian\.m2" (it will vary on your system).
              7) And again let's try it.

              What I did - Take 4:1) Start STS (now we are using the version 2.9.2)
              2) File -> New -> Spring Roo Project
              3) Project name: roopoc4, Top level package name: com.tenminutes -> Next -> Finish
              4) 'Progress' is showing us what's going on. Just wait until all the tasks finished. This will take a bit longer but will finish by itself... Then again File -> Restart because the Roo Shell doesn't automatically detect, that all the tasks finished.
              5) Right-Click on project 'roopoc4' -> Spring Tools -> Open Roo Shell
              5b) Realise that there is no exclamation mark above the project 'roopoc4' like it was in the new STS.
              6) in the Roo shell perform the following commands
              6a) jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
              6a2) wait with the command 6b until STS finish the 'Building workspace'
              6b) entity jpa --class ~.Timer --testAutomatically
              6c) field string --fieldName message --notNull
              6d) web mvc setup
              6d2) wait with the command 6e until STS finish the 'Building workspace', Validating, ...
              6e) web mvc all --package ~.web
              5e2) wait ...
              6f) selenium test --controller ~.web.TimerController
              6f2) wait ...
              6g) perform tests
              6g2) this again takes a moment, but now we get a successful result.
              7) Right-Click 'roopoc4' -> Run As -> Run on Server -> Finish
              8) I answered the question about the perspective with 'No' then I was asked by the Windows Firewall weather I want to accept the Server and answered that question, that it's ok. Then when the server tried to start I got an error again, but this seems just to be, because the Firewall blocked the server to long.
              9) So stop the server again by finding the red square on the left bottom under the server section and click it.
              10) Close the browser window.
              11) Right-Click 'roopoc4' -> Refresh (this has to be done cause the project was out of sync)
              12) Right-Click 'roopoc4' -> Run As -> Run on Server -> Finish
              13) Tadaaaa, we see the expected auto-generated page (But: An exeption, too. I will open a new Thread in the Roo-Forum for this issue, cause it has nothing to do with the STS. Just wanted to mention this.)

              CONCLUSION: When you kept reading my Reply until here, thank you. Getting the STS to Build a new Roo Project was not an easy thing. The new Spring Tool Suite 3.0.0 was unable to produce this output. Using the SpringSource Tool Suite 2.9.2 was able to to this. But a few things had to be done, too. After getting the first Roo-Project to run, it is really easy to build many more other projects.
              When you start your first experiments with Spring (http://www.springsource.org/get-started) you will see the "Everything You Need!" and think "perfect, I was searching for that". Also when you carefully read the documentation of Spring Roo you will have the expectations that everything works like "magic". The ugly truth is, that it is not that easy. I hope, that in future releases at least the installer-variant of the STS will set the Environment-Variables automatically, because the install-assistant 'knows' where roo and maven are located. Whether the JAVA_HOME is required I don't really know, but I think it is, at least if you work with the plain Roo-Console, which sometimes might seem more easy. Also the new version of the STS is in my opinion not ready to be released. I hope that this will help you, because it took me a lot of work to write it down

              Thanks
              Chris

              Comment


              • #8
                Hi Chris thanks for the post!

                Is STS 2.9.2 working better for you? There haven't been many changes to the Roo integration between 2.9.2 and 3.0.0, so I'm curious as to what might be different about your 2 setups, but as long as you're up and running now that's good.

                I've been looking into why the Roo shell hangs upon project creation. It looks to be a deadlock generated within one of our dependent frameworks, so it hasn't been easy to fix, though I'm hoping we can fix it by upgrading our dependency. This problem usually occurs when recreating a deleted project, but we seem to have more problems in this area on Windows than on other platforms, so there may be another underlying cause. Also, the Roo shell will just not update itself until STS has completed its build cycle, which could give it the appearance that it is stalled. I think this has become a more serious issue in 3.0.0 over 2.9.2 because 3.0.0 appears to be a bit slower and startup takes longer.

                STS-2607: Roo shell does not start after project creation
                https://issuetracker.springsource.com/browse/STS-2607

                The red exclamation mark is another thing we've been looking into (bug posted below). The classpath settings get dynamically generated & updated, but the Maven project configuration isn't updated to compensate for the changes. We need a way to recognize the first change and then automate the second. You can workaround this by right-clicking your project and selecting Maven -> Update Project Configuration, and this will usually solve any red exclamation errors without you having to manually update your classpath settings.

                STS-2539: Roo: src/main/java not configured as source folder when created
                https://issuetracker.springsource.com/browse/STS-2539

                Thanks for the feedback!

                Comment

                Working...
                X