Issues running a Java web app with OpenCV on OpenShift - java

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.

Related

Coding with tools only downloadable in Microsoft Store

My laptop is broken and is at the service right now so I got a borrowed laptop from school. Unfortunately we have no administrator rights on these laptops and a lot of stuff is limited by the administrator. The only way to download tools/applications is through the Microsoft Store. (It is not in s-mode or something, really restricted.) So I want to program and write projects in Java. Normally I use IntelliJ, but that was not in the MS store. I downloaded Visual Studio but am unable to download the JDK.
My question to you: Is it at all possible to create and run java projects with Microsoft Store as the only download store? (Windows 10 Enterprise 21H1)
Thanks in advance!
Tried visual studio but can not run because JDK is missing
Tried a browser IDE, but they work terrible and not really suitable for writing projects
Visual Studio Code might be an option if it works https://apps.microsoft.com/store/detail/visual-studio-code/XP9KHM4BK9FZ7Q, but your best bet would be the following:
You can use an online tool called GitHub Codespaces: https://github.com/features/codespaces
Codespaces runs a VSCode environment in your browser. You will run a java project just as you would if you where using VSCode. How to use GitHub Dev https://github.com/github/dev
Check out this link if you want to know more about advanced use of Java in a Codespace: https://docs.github.com/en/codespaces/setting-up-your-project-for-codespaces/adding-a-dev-container-configuration/setting-up-your-java-project-for-codespaces

Unable to run existing java Play Framework project on windows machine

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.

OpenCV with Glassfish webapplication

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.

eclipse with flex plugin for red5

I've just started to mess around with red5 , I can't say it was easy to get it run at the first place, but after a day on google I finally succeed.
The first thing I had to face is the poor documentation of this server. I couldn't find any good tutorials about making apps (I would pay for a good one, but still nothing) for it, but it doesn't matter since it's free.
I found this : Adobe TV . It's the best starting point I could find so far. The only thing is that I can't set up the same working enviroment as the guy has in the video. I understand it is eclipse (i have that) , and i know he is using flex plugin, but how do I get eclipse to debug mxml files as he does? (around 3.20 in the video) . I downloaded the flex plugin, but after I install it, eclipse stays exactly the same as before.
PLease note I am new to eclipse (and JAVA and flash -huhh... :D - ).
I am running Windows 7 Ultimate 32bit.
Any help would be greatly appreciated.
There is one more IDE called FDT for flex app development. They are using eclipse. Worthy to try this IDE http://fdt.powerflasher.com/ this is available linux too. This is does not support red5 by native. But you can just simply create as java project.
I prefere the Flex Development to do with flashdevelop: http://www.flashdevelop.org/
it is a very nice openen source code editor. Configuration is really easy and takes just 1 Minute. The only thing to do is to configure the path of the flex sdk. Debugging is nice and i love the code completition feature.

Please suggest a platform to port C# app to Mac?

Greetings,
I need to port this Windows utility: http://solinker.com to Mac.
The app was written in C#, .NET 2.0.
The main requirement is:
The app should be able to talk with AppleScript to interact with Photoshop. The program is small and UI is simple so I could consider to fully rewritte the app.
Possible candidates are:
MonoMac
Unity 3D (seems it doesn't required to install the Mono)
XULRunner (Flickr Uploader written by XULR)
QT
Java (convert all the app to Java + 2 different connector to photoshop:
for Mac and for Win)
I would be appreciate for any advice!
I'm not experienced with others but can definitely suggest MonoMac. It looks and feels like any other Mac app while running on Mac. On the other hand, if the application was written with Visual Studio on Windows, it never properly works on MonoMac. So prefer MonoDevelop, if you go this route.
If you check the documentation for MonoMac, you will see they have a packager which bundles all dependencies with the final app. So, no need for a seperate Mono install:
http://www.mono-project.com/MonoMacPackager
As for AppleScript, MonoDevelop does some wrapping of AppleScript. You should take a look at their source:
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacInterop/AppleScript.cs
I would say MonoMac is your best approach.

Categories