Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-94

Fat JAX-RS Jar in Alpha3 running in Docker fails on execution


    • Type: Story
    • Status: Closed (View Workflow)
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.0.0.Alpha6
    • Component/s: None
    • Labels:



      I have another issue related to running in a Docker container. It seems that undertow actually binds to an IP6 address at startup.

      Unable to find source-code formatter for language: `. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      2015-07-07 15:04:17,390 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-16) WFLYUT0012: Started server default-server.
      2015-07-07 15:04:17,431 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-16) WFLYUT0006: Undertow HTTP listener default listening on /0:0:0:0:0:0:0:0:8080

      I found a closed Issue that @arun-gupta reported, it said to give the java -jar command a -Djboss.bind.address= I have also checked the Maven Swarm plugin and RunMojo which default binds to This should be sufficient to make the application it available outside of Docker. Meaning RUN mvn wildfly-swarm:run also should work in the Dockerfile.

      Running the java -jar command, it seems like my resources (any of my classes really) never get packaged in the jar-file.

      hota@local.husbanken.no@hota-devpc ~/projects/research/swarm-docker (master)$ cd target/
      hota@local.husbanken.no@hota-devpc ~/projects/research/swarm-docker/target (master)$ ls
      classes  generated-sources  maven-archiver  maven-status  surefire  SwarmDocker  SwarmDocker-swarm.jar  SwarmDocker.war  wildfly-swarm-archive
      hota@local.husbanken.no@hota-devpc ~/projects/research/swarm-docker/target (master)$ java -jar SwarmDocker-swarm.jar 
      Exception in thread "main" java.lang.ClassNotFoundException: swarm.SwarmMain from [Module "org.wildfly.swarm.bootstrap:main" from BootModuleLoader@504bae78 for finders [org.wildfly.swarm.bootstrap.modules.BootstrapClasspathModuleFinder@3b764bce, org.wildfly.swarm.bootstrap.modules.BootstrapModuleFinder@759ebb3d, org.wildfly.swarm.bootstrap.modules.ClasspathModuleFinder@484b61fc, org.wildfly.swarm.bootstrap.modules.AppDependenciesModuleFinder@45fe3ee3]]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
      	at org.wildfly.swarm.bootstrap.Main.main(Main.java:51)

      I created a minimal project on Github. https://github.com/thomasandersen77/swarm-docker

      I have verified this behavior in both and (latest from master branch).

      I run Maven 3.3.3 and Java 8. The only way to make it run is from IntelliJ and the main class.

      Thank you again for your time!

        Gliffy Diagrams




              • Assignee:
                andtho Thomas Andersen
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created: