0

I am programming a web application right now on bluemix using Java and eclipse. This is a Liberty for java app. I have downloaded the starter code and connected my eclipse to the GIT destination. All seems to be fine when making changes and uploading to GIT, then build/deploying from GIT also works.

My issue seems to be when I am including a .jar file. If I am to run my application on eclipse tomcat server, the application runs fine. However, when I push my code to the GIT destination, and try to build/deploy, it says that the .jar (sendGrid jar for reference) is not able to be found. I can find the jar in the GIT.

Any suggestions as to why I am getting this error? I have also sent this project to a co-worker, and it ran fine on his machine as well (without making any changes to the location of the jar file).

Thanks for all your help.

Mishtiff
  • 51
  • 7

2 Answers2

0

You should place the jar file in the WEB-INF/lib directory.

Confirm that the war file being deployed to Bluemix is the latest by checking the files:

cf files <yourapp> app/wlp/usr/servers/defaultServer/apps/myapp.war/WEB-INF/lib

You can also view the files using the Bluemix UI

Ram Vennam
  • 3,536
  • 1
  • 12
  • 19
  • Ram, It seems that my .jar file is in a .lib folder, however this folder is not the correct folder that the app is reading from. How would I go about moving it from the .lib i created to the one that is correct? – Mishtiff Feb 08 '16 at 17:17
0

To expand upon Rams answer,

I had downloaded the sample code, but I did not tell it the correct style of project for it. It was not creating the WEB-INF folder necessary. All I had to do to fix this was go to import->Web->War File. From there, you select the downloaded war file. Place the jar in the WEB-INF->lib folder and you are good to go. Thanks again!

Mishtiff
  • 51
  • 7