cancel
Showing results for 
Search instead for 
Did you mean: 

Deployment to Cloud Foundry Fails: java.lang.UnsatisfiedLinkError: no sapjco3 in java.library.path

kimkeunho
Explorer
0 Kudos

Hi. I'm trying to deploy a war file on btp cloud foundry.

However, because of sapjco3, my project keeps faile to deploy properly.

UnsatisfiedLinkError: no sapjco3 in java.library.path

This seems to be the main cause of the problem. So I've been thinking of accessing cloud foundry ubuntu environment via ssh in order to setup libsapjco3.so file in the right path.

However, this is impossible. According to cloud foundry documention, in order to access an application via ssh, the application should be running correctly. But, my deployment is not working, hence, accessing the cloud foundry container is not allowed in the first place.

What can I do to solve this issue?

I don't think cloud connector or other connectivity service have something to do with this issue...

Any ideas or suggestions will be greatful.

gregorw
Active Contributor
0 Kudos

Please provide more details about what buildpack you're using.

kimkeunho
Explorer
0 Kudos

Currently, I'm using sap_java_buildpack.

According to the document, if I don't mention specific version of sap_java_buildpack,

it will automatically build my project using the latest version.

buildpacks:

- sap_java_buildpack

I included that attribute in manifest.yml file...

Accepted Solutions (0)

Answers (2)

Answers (2)

gregorw
Active Contributor
0 Kudos

Please check the documentation at SAP Java Connector. It mentions that you have to explicitly enable JCo.

gregorw
Active Contributor
0 Kudos

Maybe you try my sample project HTML5UserAPIforCF which also has a Java Service that is using the Java Connector (JCo). It builds and deploys without issues.

kimkeunho
Explorer
0 Kudos

Thanks for the reply.

I will definitely have a look at it

kimkeunho
Explorer
0 Kudos

I just have a look at your project and find out that sapjco dependency is not included in the pom.xml file.

In my project, the dependency in pom.xml file is like the following.

However, in the pom file of your project, sapjco dependency cannot be found and instead I found out

something like cloud-sdk. Can you be more specific about how you configured sapjco dependency? 🙂

<dependency>
<groupId>com.sap</groupId>
<artifactId>sapjco3</artifactId>
<version>3.0.9</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/sapjco3.jar</systemPath>
</dependency>