Home Ask Login Register

Developers Planet

Your answer is one click away!

Mishtiff February 2016

Bluemix not able to find included JAR in project

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.


Ram Vennam February 2016

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

Mishtiff February 2016

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!

Post Status

Asked in February 2016
Viewed 3,358 times
Voted 11
Answered 2 times


Leave an answer

Quote of the day: live life