Results 1 to 5 of 5

Thread: Need Help

  1. #1
    Join Date
    Oct 2010
    Posts
    2

    Question Need Help

    I am trying to run sample code from Spring In Action Second Edition on SpringSource-tool-suite version 2.3.2. After importing a project, I get "import org.springframework cannot resolve" error for the following import statements:

    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.ClassPathXmlAp plicationContext;

    Do I have to do more setup after using the installer?
    How do I get rid of this error?

  2. #2
    Join Date
    Oct 2010
    Posts
    2

    Default ...

    Good research. lol.

    I am also this kind of noob who got this error. And i thought:
    SpringSource Tool Suite should include the SpringFramework. I can't find it to include it into the Project under the JavaBuildPath.

    I refuse to download the SpringFramework. If i make a Spring Project it should already be included.

    regards
    C00n

  3. #3
    Join Date
    Oct 2010
    Posts
    2

    Default The wtf solution.

    1) Download the spring-framework.
    2) Go to Project Properties.
    3) Build-Path.
    4) Add external jar.
    3) Include the jar-files that you downloaded in to the build-path.

    It worx now.

  4. #4

    Default

    STS comes with Maven plugin so if the project has a pom file (.pom) you can do right click on the project >> maven >> enable dependency management.

    If you have an internet connection and the pom is correct then it should automatically download and bring in all the dependencies that are declared in the pom file which should be the ones that the project needs....

    That is of course if the project is a maven project >> has a pom file

    If not, you can do as C00n stated. The book should tell you which dependencies you need then you can download them and add them manually to your classpath.

  5. #5
    Join Date
    Dec 2011
    Posts
    1

    Default This is the only way?

    Is this the only solution (with a non-maven project), even if the jars are in the sts plugin directory? I'm encountering the same problem and figured sts would have all that configured for spring projects. I'm using sts 2.8.1.RELEASE.

Posting Permissions

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