Atenica Atenica - 1 year ago 168
Java Question

Why jboss service failed to start and why I have 404 error with my rest?

I am new at restful web services. I wanted to write some code where I want when i write this url

to get my Employee that i inserted manually.
This is my Employee class:

@XmlRootElement(name = "employee")
public class Employee {
public String empID;
public String name;
public String email;
@XmlElement(required = true)
public String getEmpID() {
return empID;
public void setEmpID(String empID) {
this.empID = empID;
@XmlElement(required = true)
public String gettname() {
return name;
public void setname(String firstname) { = firstname;
@XmlElement(required = true)
public String getEmail() {
return email;
public void setEmail(String email) { = email;
public Employee(String empID, String firstname, String email) {
this.empID = empID; = firstname; = email;
public Employee(){}

This is my rest service:

public class EmployeeService {

public Employee getEmployee(@PathParam("empID") String empID){
Employee employee = new Employee();
return employee;

this is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="" xmlns="" xsi:schemaLocation="" version="2.5">

This is my pom.xml:

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<!-- -->



This is my error in console:

13:03:27,916 ERROR [] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "EmployeeService-0.0.1-SNAPSHOT.war")]) - failure description: {
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined,
"WFLYCTL0288: One or more services were unable to start due to one or more indirect dependencies not being available." => {
"Services that were unable to start:" => ["jboss.deployment.unit.\"EmployeeService-0.0.1-SNAPSHOT.war\".PARSE"],
"Services that may be the cause:" => ["jboss.remoting.remotingConnectorInfoService.http-remoting-connector"]
13:03:27,939 INFO [] (DeploymentScanner-threads - 2) WFLYSRV0010: Deployed "EmployeeService-0.0.1-SNAPSHOT.war" (runtime-name : "EmployeeService-0.0.1-SNAPSHOT.war")
13:03:27,939 INFO [] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.undertow.listener.default: org.jboss.msc.service.StartException in service jboss.undertow.listener.default: Address already in use: bind localhost/
service jboss.undertow.listener.https: org.jboss.msc.service.StartException in service jboss.undertow.listener.https: Address already in use: bind localhost/

EDIT: I have solved problem with jboss. Now my only problem is that I receive 404 when I write url that I wrote above. When I start my index.jsp it works but when i run my rest it giving me 404.

And when i write
i get 404-not found. Could someone plese help me with these mistakes?

Answer Source

Have you configure your rest endpoint? Or where does /rest/ comes from?


public class JaxRsActivator extends Application {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download