Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9149529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:29:22+00:00 2026-06-17T11:29:22+00:00

I’ve tried running the Spring 3 Hello World tutorial on my Ubuntu machine and

  • 0

I’ve tried running the Spring 3 Hello World tutorial on my Ubuntu machine and have run into a few issues.

First, I’m working on the Springsource ToolSuite 3.1.0 release, and have Maven installed on my machine. I already went thru a Java App with Maven tutorial on the same site.

First, isn’t Maven supposed to resolve dependency issues? When I wrote

import org.springframework.*;

I got an error stating that the library was not able to be found, so I had to add the JAR itself manually to the build path to solve that issue. This was despite many .m2/REPO library paths existing on the build path wizard.

mvn --version returns

jason@asus:~/IDE/springsource/sts-3.1.0.RELEASE/plugins$ mvn --version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-i386/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.5.7-03050702-generic", arch: "i386", family: "unix"

Secondly, when executing from the command line, I get this printout:

jason@asus:~/Documents/workspace-sts-/SpringExample$ java -cp target/SpringExample-1.0-SNAPSHOT.jar com.jasonjohns.App
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/BeanFactory
  at java.lang.Class.getDeclaredMethods0(Native Method)
  at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
  at java.lang.Class.getMethod0(Class.java:2685)
  at java.lang.Class.getMethod(Class.java:1620)
  at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:492)
  at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:484)


Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanFactory
  at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Just to be sure, I checked the STS/plugins folder and there is an org.springframework.beans_3.1.1.RELEASE.jar there.

My pom.xml is

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
    <groupId>com.jasonjohns</groupId>
    <artifactId>SpringExample</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>SpringExample</name>
    <url>http://maven.apache.org</url>
<dependencies>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
  </dependency>

  <!--  Spring 3 Dependencies  -->
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>3.1.1.RELEASE</version>
  </dependency>

  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context</artifactId>
    <version>3.1.1.RELEASE</version>
  </dependency>
</dependencies>
</project>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T11:29:22+00:00Added an answer on June 17, 2026 at 11:29 am

    I’d try navigating to your project’s location in a terminal and then do mvn eclipse:eclipse. This will (re)generate Eclipse/Spring Tool Suite-specific files – essentially creating .classpath and .project files (see http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).

    The .classpath is essentially your build path and by running eclipse:eclipse maven will generate it for you based on the contents of your pom.xml.

    Once done, refresh the project in Eclipse/STS. Making sure build automatically is ticked (Project->Build Automatically).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a small JavaScript validation script that validates inputs based on Regex. I
Specifically, suppose I start with the string string =hello \'i am \' me And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.