1

I am trying to run a Java Application on OpenShift Online by deploying a war file to my gear. Below are the steps that I followed to try to deploy it.

  1. I created the WAR file for my application with the changed connection url as jdbc:mysql://${OPENSHIFT_MYSQL_DB_HOST}:${OPENSHIFT_MYSQL_DB_PORT}/affablebean and updated the username and password as per open shift MySQL credentials.
  2. Renamed the war file as ROOT.war.
  3. I am using FileZilla to deploy the WAR file. I placed the ROOT.war file in the ~/app-root/dependencies/jbossews/webapps/ folder.
  4. Then I restarted the application server using the command ctl_all restart

But when I try to access my web application via the url I am getting the same "Welcome to your JBossEWS (Apache/Tomcat) application on OpenShift".

Why this is happening? Is there any way to track whether the WAR file is deployed or not?. Or tomcat server file?

Please help me.Had i followed the above mentioned step correctly or not?

Rahul Sah
  • 23
  • 7
  • may be helpful this link.http://stackoverflow.com/questions/30954158/how-to-deploy-spring-mvc-project-on-openshift-com/30954237#30954237 –  Aug 06 '15 at 10:21

2 Answers2

2

Are you by chance running a scaled application? If so, you can't deploy your war file using SCP/SFTP, as the WAR file will not be deployed on all of the applications gears. You will have to use "git push" to deploy it. You can refer to this section of the developer portal (https://developers.openshift.com/en/tomcat-deployment-options.html) for more information on deploying WAR files on OpenShift Online.

Also, it would be helpful if you checked your log files on your gear to make sure that the WAR was actually deployed.

0

I faced the same issue while I am deploying my Java Spring web app using my git repo. The Actual problem is with the pom.xml file, do not merge your own pom.xml with the generated one. Resolution: I created an empty application then I tried to modify the generated pom.xml file accordingly to my project & added the source code files in the directory. It resolved the issue and I did not see the default page of open shift application. Check this it this helps you. However in your case you are using WAR file to deploy.

Koushik Ravulapelli
  • 1,140
  • 11
  • 30