mavenjakarta-eejavacvjavacppsap-cloud-platform

Web Application using JavaCV and deployed on SAP HANA Cloud Platform error


I'm currently working on a face recognition web application using JavaCV. I send snapshots of a live webcam stream on a client's browser over websockets and the face recognition system does all the rest on the server side. However, I receive the following error when deploying my application on HCP.

no jniopencv_core in java.library.path

I have added all the jar files related to javacv/javacpp in my project lib folder and this is my pom.xml

<dependency>
  <groupId>org.bytedeco</groupId>
  <artifactId>javacv</artifactId>
  <version>1.1</version>
</dependency>

<dependency>
    <groupId>org.bytedeco.javacpp-presets</groupId>
    <artifactId>opencv</artifactId>
    <version>3.0.0-1.1</version>
</dependency>

<dependency>
    <groupId>org.bytedeco</groupId>
    <artifactId>javacpp</artifactId>
    <version>1.1</version>
</dependency>

Any ideas? Thanks in advance.


Solution

  • For some reason, Maven isn't picking up the platform dependencies properly. Add something like the following to fix that error:

    <dependency>
        <groupId>org.bytedeco.javacpp-presets</groupId>
        <artifactId>opencv</artifactId>
        <version>3.0.0-1.1</version>
        <classifier>linux-x86_64</version>
    </dependency>