0
votes

I now this have been raised here before, but I really tried to use the discussions but none worked for me.

Basically I'm getting the "The prefix "context" for element "context:annotation-config" is not bound" error which I use @Autowired to exclude the use of property element in the beans xml.

Here is the tag of my xml file

xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://www.springframework.org/schema/context
 http://www.springframework.org/schema/context/spring-context-3.0.xsd">

I also have the

<context:annotation-config/>  

which automatically registers the AutowiredAnnotationBeanProcessor

could the problem might be from a missing jar in the classpath, that a maping between namespaces and spring jars can't be made? here are the external jars

org.springframework.aop-3.1.0.M2

org.springframework.asm-3.1.0.M2

org.springframework.beans-3.1.0.M2

org.springframework.context.support-3.1.0.M2

org.springframework.context-3.1.0.M2

org.springframework.core-3.1.0.M2

org.springframework.expression-3.1.0.M2

spring-context-3.0.6

spring-beans-3.0.6

commons-logging-1.1.1

1
Why are you using an old milestone version of spring (I would use 3.1.4.RELEASE) and you should never mix spring versions, you are mixing 3.0.6 and 3.1.0.M2. - M. Deinum
That's what I foud in my repositories! you may be right though. - ssayyed

1 Answers

1
votes

What you are missing is the namespace prefix declaration:

<beans xmlns:context="http://www.springframework.org/schema/context">