1
votes

I used spring 2.2. and I have recently upgraded to spring 4.1.4.

My project uses the the following application context:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:int="http://www.springframework.org/schema/integration"
       xmlns:int-file="http://www.springframework.org/schema/integration/file"
       xmlns:task="http://www.springframework.org/schema/task"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/task 
        http://www.springframework.org/schema/task/spring-task.xsd
        http://www.springframework.org/schema/context              
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/integration
        classpath:com/alu/motive/smdm/mediation/process/orchestration/activity/spring-integration.xsd">

Note that I am using classpath to refer to the spring integration xsd file as I did not see the spring.shemas in the spring jar file. When I run the application, I receive the following exception: Exception in thread "Thread-8" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/integration]

Likely, the root cause comes from the absence of the spring.handlers file. Could you tell me what is the best way to solve my issues?

2

2 Answers

0
votes

Unfortunately your namespace config isn't full. You declare int and int-file nls, bu don't declare their schemaLocation. If you really are interested in the Spring Integration and have appropriate jars in the classpath, please, add their schemaLocation:

http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file.xsd
http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
0
votes

I have just found my issue. I had forgotten to add spring-integration-core-4.1.2.RELEASE.jar in my classpath.

FI, i have no more need to use classpath in the application context xml file. The spring.shemas & spring.handlers files are included spring-integration-core-4.1.2.RELEASE.jar.