Results 1 to 6 of 6

Thread: SpringFramework cannot be resolved error

  1. #1
    Join Date
    Nov 2010
    Location
    San Diego
    Posts
    18

    Default SpringFramework cannot be resolved error

    I took a break from developing for a while. Lately I cranked the SpringSource Tool Suite back up and nothing is working. I am getting errors with:
    The import "org.springframework" cannot be resolved.

    I don't know if a library import get deleted or is just not linked properly or what. Where does this information come from?

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hi!

    You should take a look at the build path of your project to check whether the referenced libraries are still there. So right-click on your project, then "Properties -> Java Build Path -> Libraries" and check whether you still have the spring library JARs in the place that is mentioned there. If not, just re-add them to your classpath within this dialog.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    Nov 2010
    Location
    San Diego
    Posts
    18

    Default

    Thanks Martin,

    Can you give me an idea of what a couple of these jar files are named?

    It's strange because I have created new Spring Roo projects from within SpringSource ToolSuite and I still get these messages. Maybe something from my lib directory got deleted.

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    The JAR files you need are the ones that come with the Spring core framework itself, they are named org.springframework.core..., org.springframework.beans..., org.springframework.context..., and so on...

    But your comment from creating a project from Roo sounds like there is something really broken. Are you using Maven for both projects? Maybe you need to update your maven dependencies...

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  5. #5
    Join Date
    Nov 2010
    Location
    San Diego
    Posts
    18

    Default

    Thanks Martin (whazzup!?)

    I reinstalled SpringSource Tool Suite and the new projects are working. Ineed- the problem is that the Maven Dependencies library folders are missing. Not sure what happened. Is there a fast way to add this to my existing projects (fingers crossed) or do I have to to add Maven dependency jars 1 by 1?

  6. #6
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    I am not an expert for m2eclipse, but I would try to maybe disable/enable the Maven support for those projects to see if that helps... Just an idea...
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

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