I have an issue about jboss eap 6.4 and Spring Boot application. I have two standalone in jboss. We are running several IVR application as war. When i deployed Spring Boot application as war. It was deployed. But When I send request this error occurs:
`JBWEB000065: HTTP Status 404 - /ivr-adapter-0.0.1/error JBWEB000309: type JBWEB000067: Status report
JBWEB000068: message /ivr-adapter-0.0.1/error
JBWEB000069: description JBWEB000124: The requested resource is not available.
JBoss Web/7.5.7.Final-redhat-1`
My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.22.RELEASE</version>
<relativePath/>
</parent>
<groupId>com.assistt</groupId>
<artifactId>ivr-adapter</artifactId>
<version>0.0.1</version>
<name>ivr-adapter</name>
<description>IVR Adapter</description>
<properties>
<java.version>8</java.version>
</properties>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jvoicexml</groupId>
<artifactId>org.jvoicexml</artifactId>
<version>0.7.9</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
One of the my controller:
package com.assistt.ivradapter.controller;
import com.assistt.ivradapter.dto.WhatNextRequestDTO;
import com.assistt.ivradapter.dto.WhatNextResponseDTO;
import com.assistt.ivradapter.service.WhatNextService;
import com.assistt.ivradapter.util.SessionManager;
import org.jvoicexml.event.error.SemanticError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.*;
@RestController
public class WhatNextController {
@PostMapping("/whatNext")
public WhatNextResponseDTO whatNext(@RequestParam String ___DDSESSIONID, @RequestBody WhatNextRequestDTO whatNextRequestDTO){
WhatNextService whatNextService = new WhatNextService();
Logger logger = LoggerFactory.getLogger(WhatNextController.class);
String final___DDSESSIONID = ___DDSESSIONID.replace(' ','+');
WhatNextResponseDTO response = null;
try {
if(SessionManager.getInstance().getSession(final___DDSESSIONID) != null && SessionManager.getInstance().getSession(final___DDSESSIONID).getCurrentProcessOrder() != null){
MDC.put("session.id", String.format("%s - %s", final___DDSESSIONID, SessionManager.getInstance().getSession(final___DDSESSIONID).getCurrentProcessOrder().getDataModel().readVariable("session___ucid",String.class)));
} else {
MDC.put("session.id", final___DDSESSIONID);
}
logger.info("entering WhatNextService-getResponseFromJboss.");
response = whatNextService.getResponseFromJBoss(final___DDSESSIONID, whatNextRequestDTO.getNamelist());
logger.info("returning /whatNext endpoint response : {}", response);
} catch (Exception | SemanticError e) {
logger.error("WhatNextController ERROR : {}", e.getMessage(), e);
} finally {
MDC.clear();
}
return response;
}
}
However, on a server with one standalone.xml, requests return successfully.
If there is any setting you want to see, I can write it down.
I tried to add jboss-web.xml to WEB-INF/
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<context-root>ivr-adapter-0.0.1</context-root>
</jboss-web>
I still get same error.