I'm trying to develop a Java webapplication with Glassfish using JSF and OpenCV. I wrote some code which works fine on Java desktop application. However, when I try to implement it on Glassfish app it shows me an error UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(IIIDDDD)J, when I use System.loadLibrary(Core.NATIVE_LIBRARY_NAME) before I get java.lang.UnsatisfiedLinkError: Native Library already loaded in another classloader.
I tried putting loading code into singleton - still this same situation. Tried to load singleton in different application and call it by Class.forName() - dll loaded but the application still doesn't work and the first error appears UnsatisfiedLinkError: org.opencv.core.Mat.n_Mat(IIIDDDD)J.
I tested OpenCV 2.4.10, 2.4.11 and 3.0 versions under Glassfish 4 and Glassfish 4.1 servers. I'm working on Windows and using Netbeans.
Please help me because I got stuck and have no idea what else I can do with it.
Thank you in advance.
Related
I am using external .so library files for my application. Upon trying to use them in my app, it started crashing for a function that is called in the code.Error pulled from crash log:
java.lang.UnsatisfiedLinkError No Implementation Found
Any assistance would be appreciated. I am running out of things to test with the code. My assumption of the issue is that it is not actually loading the library which to me would explain why no implementation could be found. I do call the function to load the library here. Code that is loading the library
I’m trying to get a Java web app running on a large Tomcat 7 (JBossEWS 2.0) gear on OpenShift. The app makes use of the OpenCV computer vision library, accessed via wrappers provided by the JavaCV project.
I’ve managed to build OpenCV on our gear (following this tutorial) but am now running into a couple of problems:
When trying to load the OpenCV library, I get the following error:
libopencv_core.so.2.4.10: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
After some googling, it looks like I’ve built a 64-bit version of the OpenCV library, but that OpenShift gears run 32-bit Java.
I then tried building a 32-bit version of OpenCV, but ran into another issue when compiling:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
After some more googling, it looks like OpenShift gears might be missing a file that the compiler needs to run in 32-bit mode.
So, a couple of questions:
Am I interpreting these error messages correctly?
Assuming I’m understanding the underlying issue correctly, is there a way build the OpenCV library in 32-bit mode on our gear, or does this mean it won’t be possible to launch our app on OpenShift?
I’m pretty new to Java web development and OpenShift, so apologies if I’m missing something straightforward here.
Thanks in advance.
I'm getting
Error: Unable to access jarfile C:\Users\stepa\workspace\sse-chat-java\\activator-launch-1.1.0.jar
when running Markus Jura's Play Framework simple chat application on windows 10 system.
On a Ubuntu machine Markus Jura's Play Framework simple chat application works without any problems.
This is what I tried so far:
reinstalling Typesafe Activator to the currently newest version (2.4.3 - same as on Ubuntu machine)
searching for activator-launch-1.1.0.jar (not present on any of the machines)
searching for someone with same problem
I'm running out of ideas. I appreciate any suggestions.
There are 2 places where you may try to change version. See image below (but please also check another file).
I'm not sure it will fully fix your issue, but it worth a try.
I am developing a java web application. It was running well but today I opened Eclipse and all imported libraries are throwing errors. As if I didn't have those libs.
I didn't modify my project. The only thing different that I've done was to try to generate the JavaDoc. Now I can't even run my server, it gets a CONNECTION REFUSED error.. I need some help, if I try to restore Windows will it work?
I have done another Project, copying the classes from this Project. Add it to my Debug on my server and it`s working. Thank you all for the help
I'm working in Netbeans, developing a Java Applet, as well as a few simple HTML pages that take the form of a Netbeans Web Application. I make a MySQL database connection within the code of my applet. This has been working fine for about a day now (I added the necessary .jar) and I have seen changes in the database as a result of testing, both when I attempt to run the applet straight from Netbeans, and when I run the web application from Netbeans and use the applet embedded in my HTML. However, I recently have been getting a ClassNotFoundException after calling the line:
Class.forName("com.mysql.jdbc.Driver");
in my applet code via the Web Application. Note that this line still executes successfully when I run the applet and not the web application. Only accessing the applet in Firefox is giving me these troubles. I tried restarting Netbeans and Firefox, and still no luck.
I apologize for the vagueness of the question, I was just hoping someone else might have experienced this and would know what to do. I'm pretty sure I haven't changed any code that is related to this Exception (given that the Applet still runs smoothly when not HTML-embedded), so that's all the relevant information I can think to give.
You need to let applet know about library with jdbc driver. Here is how to do it:
Adding a Third Party Library to Java Applet