Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-749

New Template Project -> Could not read initialization data for template error

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.3.0.RELEASE
    • Fix Version/s: Sprint 8, 2.3.1.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 9.10 x64, java version "1.6.0_16"

      Description

      I upgraded from STS 2.2.1 to 2.3.0. Under 2.2.1, I had used the "New -> Spring Template Project" feature. Now in STS 2.3.0, when I try to create a new Spring Template Project for one of the templates I had previously used under STS 2.2.1, I get the following error message...

      Could not read initialization data for template "org.springframework.templates.mvc-3.0.0"

      When I look a bit deeper I see that STS 2.2.1, has downloaded a folder to ".metadata/.sts/content" called "org.springframework.templates.mvc-2.2.0". Based on the error message, it appears that STS 2.3.0 is looking for a folder called "org.springframework.templates.mvc-3.0.0" in the same directory. I'm guessing that since this does not exist, that is why I'm seeing the error message.

      It appears that STS 2.3.0 is confused by the previous version of the template and does not attempt to download the latest version of the template.

      As a potential workaround, if you manually delete the old template, then STS 2.3.0 will download the new template and everything will work fine. For me this was as simple as "rm -rf /home/daniel/Eclipse\ Projects/.metadata/.sts/content/*".

      Please let me know if you need any additional information.

      Thanks!

        Activity

        Hide
        cdupuis Christian Dupuis added a comment -

        Hmm, that is not a nice user experience.

        Did you press the "Refresh" button in the Template project wizard?

        Actually that shouldn't be required if you upgrade the binary plugins. I'll investigate.

        Christian

        Show
        cdupuis Christian Dupuis added a comment - Hmm, that is not a nice user experience. Did you press the "Refresh" button in the Template project wizard? Actually that shouldn't be required if you upgrade the binary plugins. I'll investigate. Christian
        Hide
        dmikusa Daniel Mikusa added a comment - - edited

        Yes, I did try refreshing, but that didn't seem to help.

        When I upgraded from STS 2.2.1 to 2.3.0, I just grabbed the latest installer from springsource.com and ran it. Everything installed into a new directory, but when STS started, I selected the same Workspace that I was using with 2.2.1.

        Show
        dmikusa Daniel Mikusa added a comment - - edited Yes, I did try refreshing, but that didn't seem to help. When I upgraded from STS 2.2.1 to 2.3.0, I just grabbed the latest installer from springsource.com and ran it. Everything installed into a new directory, but when STS started, I selected the same Workspace that I was using with 2.2.1.
        Hide
        cdupuis Christian Dupuis added a comment -

        i was able to reproduce and fix this.

        Thanks for spotting this.

        Christian

        Show
        cdupuis Christian Dupuis added a comment - i was able to reproduce and fix this. Thanks for spotting this. Christian
        Hide
        chrismarx chris marx added a comment - - edited

        what version is the fix in?
        i just upgraded to Version: 2.3.0.RELEASE
        Build Id: 200912171331

        and had the same problem (and the same fix worked)-

        (also, is there a way to fresh the sample applications that sts uses? i want to load up the petclinic sample app for spring 3.0, but it still gets the 2.5.6 version)

        Show
        chrismarx chris marx added a comment - - edited what version is the fix in? i just upgraded to Version: 2.3.0.RELEASE Build Id: 200912171331 and had the same problem (and the same fix worked)- (also, is there a way to fresh the sample applications that sts uses? i want to load up the petclinic sample app for spring 3.0, but it still gets the 2.5.6 version)

          People

          • Assignee:
            Unassigned
            Reporter:
            dmikusa Daniel Mikusa
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: