3

i'm very new with spring framework and i was following this tutorial : http://www.vaannila.com/spring/spring-ide-1.html

According to tutorial, when i added a Spring Bean Configuration File, i should be able to select some XSD namespaces to use with new Spring Bean Definition like this : image_1

But when i add it, it doesn't show anything like this : image_2

How can i figure this out?

Thanks in advance.

*ps: i don't know does it help you but i'm using sts 2.9.1. release on windows 7 os

edit: according to @gkamal, some packages are missing. This is the content of my project's package explorer: Package Explorer Screen Shot

5 Answers5

8

You don't have the spring jar files in your project. The namespaces & XSDs are scanned from the jars in your projects class path.

Either that or you project is not a spring project - try adding the spring nature to your project.

gkamal
  • 19,552
  • 4
  • 55
  • 57
  • that's the problem. as it's displayed in 2nd. pic, there is nothing in the list. –  May 05 '12 at 07:26
  • click on the text - not just the check box – gkamal May 05 '12 at 07:29
  • there is no text or checkbox. that's my problem. just take a look at 2nd pic on my post –  May 05 '12 at 07:31
  • Sorry I didn't read it carefully - some people face an issue where the top list is populated but the bottom list is not. I thought yours is similar. I have updated my answer. – gkamal May 05 '12 at 07:34
  • well.. i followed this tutorial step by step : http://www.vaannila.com/spring/spring-ide-1.html only difference is i directly used sts ide, not added plugins to eclipse. and my project type is "Spring Project" :s –  May 05 '12 at 07:45
  • hi, i added my package explorer's screenshot, can you tell me what's missing? –  May 05 '12 at 15:42
  • 1
    You don't have the spring jars - if you notice the tutorial there is referenced libraries that is missing form yours. You need to download the spring jars - http://www.springsource.org/download and add it to your project. – gkamal May 05 '12 at 16:26
  • 1
    Scroll down to the bottom of the tutorial page - you will see a download link for the lib folder - you can use that as well. – gkamal May 05 '12 at 16:27
3

See below, the list of namespaces by JARs library. So you have to add the corresponding JAR in your project class path to get the namespaces you need.

org.springframework.aop_3.1.1.RELEASE.jar
•   aop – "http://www.springframework.org/schema/aop"
org.springframework.transaction_3.1.1.RELEASE.jar
•   tx - "http://www/springframework.org/schema/tx"
org.springframework.beans_3.1.1.RELEASE.jar
•   beans – "http://www/springframework.org/schema/beans"
•   c – "http://www/springframework.org/schema/c"
•   p - "http://www/springframework.org/schema/p"
•   util - "http://www/springframework.org/schema/util"
org.springframework.jms_3.1.1.RELEASE.jar
•   jms - "http://www/springframework.org/schema/jms"
org.springframework.context_3.1.1.RELEASE.jar
•   cache - "http://www/springframework.org/schema/cache"
•   context - "http://www/springframework.org/schema/context"
•   jee - "http://www/springframework.org/schema/jee"
•   lang - "http://www/springframework.org/schema/lang"
•   task - "http://www/springframework.org/schema/task"
org.springframework.jdbc_3.1.1.RELEASE.jar
•   jdbc - "http://www/springframework.org/schema/jdbc"
org.springframework.osgi.core_2.0.0.M2-SNAPSHOT.jar
•   bp - "http://www/osgi.org/xmlns/blueprint/v1.0.0"
•   osgi - "http://www/springframework.org/schema/osgi"
•   osgix - "http://www/springframework.org/schema/osgi-compendium"
org.springframework.oxm_3.1.1.RELEASE.jar
•   oxm - "http://www/springframework.org/schema/oxm"
0

If you are sure all jars are there , then close and open the project

Feras
  • 1,551
  • 22
  • 18
0

The answer is going to properties and setting options as shown here: The answer

0

STS 4 ->Prefrence ->Spring ->Namespaces

Just uncheck the Load Namespace handlers and XSDs form projects's classpath that will come. Beacuse everytime ide is looking for the namespaces in classpath.

Community
  • 1
  • 1