Reputation: 650
I am a newbee in OpenShift,
I have created a Spring Web Application and deployed it on OpenShift in an non-scalable environment.
The application is built and deployed successfully with no error in the tomcat application logs or in jenkins.
My application is deployed on OpenShift as ROOT.war and I can see the war file in webapps of tomcat, but when I am trying to open the url ("http://myapp-mydomain.rhcloud.com") its giving me 404 not found, however, I am able to fetch the data using my REST API calls.
Please help I am not sure what is going on.
The same application is working well on my local tomcat.
Upvotes: 4
Views: 2753
Reputation: 16
I had the same problem. I checked logs of my application on openshift usin the command : rhc ssh -a appname --ssh C:\PROGRA~1\Git\usr\bin\ssh.exe
. replace your app name in above command.
I had an error of "Unable to process Jar entry javassist". My hibernate dependency was using this javassist jar. so I excluded it using.
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.0.Final</version>
<exclusions>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
You might have the same kind of problem. Check the logs it will help you.
Upvotes: 0
Reputation: 356
In my case, it happened to change root directory itself. While pushing, check if the Application directory is changed. Something like this, "remote: Application directory "php/" selected as DocumentRoot" I've changed the directory name to phpScripts and pushed again. it works fine
Upvotes: 0
Reputation: 44
I had the same problem.
In my case .openshift directory was missing in my project that I pushed to openshift.
Create .openshift/markers/java7
.openshift/markers/ - directory
java7 - empty file
In project - it's empty file, that says openshift to use java 1.7.
In other case it will use java 1.6, but project with servlet 3.0 need java 1.7 to work. Without it you'll get 404 page and no errors on tomcat-7 deploy.
Upvotes: 0