0

I've deployed a simple hello world spark maven app to OpenShift using git push. But when I try to call the url, it gives a HTTP 404.

In the localhost, it worked fine, though.

Here's my web.xml, it's based from Spark's doc (http://sparkjava.com/documentation.html#other-webserver):

<web-app version="3.0"
     xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     metadata-complete="false">


 <filter>
    <filter-name>SparkFilter</filter-name>
    <filter-class>spark.servlet.SparkFilter</filter-class>
    <init-param>
        <param-name>applicationClass</param-name>
        <param-value>com.api.lwt.HelloWorld</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>SparkFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

I'm really new to deploying java. So maybe I'm missing something. Any ideas?

  • 1
    Please post the logs: `$ rhc tail` – João Gonçalves Oct 28 '15 at 12:12
  • ummm... so I tried to make a new one to trace back what I've done and ended up having a 503 instead of a 404. I'm using jBoss AS 7. I tried `$ rhc tail -a {app}` but it was taking too long. this is just a guess but i think this has something to do with jboss? i noticed in my eclipse, jBoss AS 7 doesn't start as quickly as jBoss EAP 6.1+. In fact, it's stuck at starting phase. since i'm using using jBoss AS 7, then maybe openshift's server is stuck at the starting phase, too. which could also explain why `$ rhc tail -a {app}` is taking too long to output. but it's just a guess. any thoughts? – Jonacius Villamor Oct 29 '15 at 03:57

1 Answers1

0

How to deploy a spark Java web app? Here it's mentioned that you have to exclude jetty libraries that come with spark as dependencies.Is that helpful?

Community
  • 1
  • 1