chrismikall
chrismikall

Reputation: 31

How to resolve http-method is not allowed for outbound-gateway

Hi I'm deploying a spring-integration web app to apache-tomcat-8.0.36: the maven dependency is:

 <dependency>
          <groupId>org.springframework.integration</groupId>
          <artifactId>spring-integration-core</artifactId>
          <version>4.3.5.RELEASE</version>
</dependency>

but I'm getting the following exception at the time I'm deploying the application:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 89 in XML document from ServletContext resource [/WEB-INF/spring/application-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 89; columnNumber: 100; cvc-complex-type.3.2.2: Attribute 'http-method' is not allowed to appear in element 'int-http:outbound-gateway'.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE]

I can also see spring-integration-core-4.3.5.RELEASE.jar in the WEB-INF/lib folder of the war.

Upvotes: 2

Views: 385

Answers (2)

chrismikall
chrismikall

Reputation: 31

you need to add an additional dependency to pom.xml:

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-http</artifactId>
    <version>4.3.5.RELEASE</version>
</dependency>

Upvotes: 0

ooozguuur
ooozguuur

Reputation: 3476

Make sure you add spring-integration-http and spring-integration-core to your dependencies.

<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-http</artifactId>
    <version>4.3.5.RELEASE</version>
</dependency>

Upvotes: 1

Related Questions