10 Comments

  1. I started off with a default spring boot application with hello world example and added your modifications. It builds and the war file is produced and deployed on WildFly 9.x but the application spits out a “Not Found” error when accessing it (http://localhost:8080/demo/greeting/?name=george)

    I’m using STS 3.7.1 RELEASE with WildFly 9.x

    Any idea what could be causing this? I’m not supposed to have a web.xml correct?

  2. So I don’t know why, I did a re-fresh on the project and re-published the war on wildfly and now everything works! I guess there was something old cached somewhere.

    Thanks for the good tutorial. Took me a while to find something up to date and simple like this to get me going.

    1. Author

      Thanks for your comment George, I´m glad you found the solution!

  3. Hello

    I followed your tutorial to deploy the Spring Boot App of mine to Jboss but it doesn’t work. My Spring Boot App works fine with embedded tomcat but when I try to deploy it to external Tomcat or Jboss as a .war it always give me HTTP Status 404 .

    With embedded tomcat this URL works: localhost:8080/employees but when I deploy to external Tomcat or Jboss none of the below URL works for me:
    localhost:8080/employees
    localhost:8080/my-app-name/employees

    Looking for your reply. Thanks in advance.

    1. Author

      Hi Ankit,
      Do you have your source code in GitHub so I can have a look? Actually that could be caused by many reasons…

  4. Hii,

    I followed ur post to deploy springBootApp to Jboss, but it giving error. My application is working fine with tomacat. but it giving error when trying to deploy JBOSS.
    The error as follows::Caused by: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    Looking for your reply.
    Thanks.

    1. Author

      Hi,
      Could you share your Application class? But it could be a JBoss configuration problem of the classpath, since it’s working fine with Tomcat (I guess not the embedded one).
      Cheers,
      Moisés

    2. My application class is as below:
      import org.springframework.boot.SpringApplication;
      import org.springframework.boot.autoconfigure.SpringBootApplication;
      import org.springframework.boot.builder.SpringApplicationBuilder;
      import org.springframework.boot.context.web.SpringBootServletInitializer;

      @SpringBootApplication
      public class Application extends SpringBootServletInitializer
      {
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
      return application.sources(Application.class);
      }

      public static void main(String[] args)
      {
      SpringApplication.run(Application.class, args);
      }
      }

      When i deployed the application on Jboss 6.4, i am not getting above mentioned problem. but, my application is still not running. when i am trying to run “http://localhost:8080/greeting” not getting any output …

      Looking for ur reply
      Thanks

  5. Thanks for the “extends SpringBootServletInitializer” part. This helped me further.

    1. Author

      Thanks for your feedback!

Leave a Reply