Opencv java web service

asked 2016-05-26 11:31:22 -0500

Max3 gravatar image

updated 2016-05-27 04:53:54 -0500

berak gravatar image

Hello, I need to process an image on server side using a restful web service. I'm trying to use Jersey framework but when I use some OpenCV operation i get an error. Something like this:

javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: org/opencv/core/Mat

So i believe that I'm not importing in the right way my OpenCV library. Is there a particular code to write in web.xml file?

Thanks in advance

edit retag flag offensive close merge delete



do you have a

  static{ System.loadLibrary(Core.NATIVE_LIBRARY_NAME); }

line in your main class ?

berak gravatar imageberak ( 2016-05-27 04:55:33 -0500 )edit

Yes. Do you know any tutorial to process an OpenCV mat on server side? It would be useful.

Max3 gravatar imageMax3 ( 2016-05-27 07:28:31 -0500 )edit

not really, unfortunately.

on desktop, using ant to build or run code worked nicely for me.

berak gravatar imageberak ( 2016-05-27 07:40:36 -0500 )edit