Using jsvc on aix 64-Bit - 64-bit

After modifying the configure script to add support for AIX6 and changing CFLGAS to add CPU type as PPC64 & adding -maix64 flags I am able to compile apache-commons on AIX6 machine in 64-Bit mode using gcc and IBM JDK 7.
But, i am unable to run jsvc to start any service or tomcat as service. I tried to set LIBPATH to include all JVM library locations and did not see any progress.
Below is the error i observed when running jsvc in debug mode.
Attempting to locate VM configuration file
/usr/java71_64/jre/lib/ppc64/jvm.cfg
Found VM configuration file at /usr/java71_64/jre/lib/ppc64/jvm.cfg
Found VM j9vm definition in configuration
Cannot locate library for VM j9vm (skipping)
Found VM hotspot definition in configuration
Cannot locate library for VM hotspot (skipping)
Found VM classic definition in configuration
Cannot locate library for VM classic (skipping)
Found VM native definition in configuration
Cannot locate library for VM native (skipping)
Found VM green definition in configuration
Cannot locate library for VM green (skipping)
Java Home located in /usr/java71_64
+-- DUMPING JAVA HOME STRUCTURE ------------------------
| Java Home: "/usr/java71_64"
| Java VM Config.: "/usr/java71_64/jre/lib/ppc64/jvm.cfg"
| Found JVMs: 0
+-------------------------------------------------------
Any help will be appreciated.
Thanks,
Shiva

This problem is solved by changing the commons-daemon source code. File "location.c" holds search path of JVM library for all operating systems. I added case for AIX in code with JVM library paths and recompiled code. This solved my problem.

Related

How to automate building a VM from an ISO file

I have a Jenkins pipeline, its output is an ISO file (linux). After getting the file I have to prepare a new VM guest in Virtualbox then attaching the ISO file to that VM and wait till the installation is done to ensure the ISO file does not have any problem which is a quite long process and a time consuming as well, so I am trying to automate this process if possible.
I found virtualBox plugin for Jenkins but it is very old and it is just managing a server (not spinning up a VM from ISO).
As a proof of concept I tried to start VM from the VirtualBox's command line (VirtualBoxManage) but I am getting below error message :
VBoxManage: error: Unattended installation is not supported for guest type 'Linux_64'
I tried Qemu as well but Unfortunately, I am not able to install KVM as all the servers/PCs do not support virtualization !
Any suggestion would be highly appreciated .. Thanks in advance.
Notes:
Jenkin is running in kubernetes but I have no issue to make it runs as a standalone directly in the host.
I am using Jenkins to generate a Linux ISO because I am customizing the basic ISO by adding some RPMs and modifying kickstart file.
Packer by HashiCorp can be used for this job.
I am also create a customize Linux distribution ISO. To achieve this, I have a Jenkins Pipeline with this steps:
Build a linux distribution ISO.
Build and export as OVF a virtual machine on VMware Vsphere using Packer.

Configure Eclipse for kernel module development

I am trying to configure Eclipse for building a custom kernel module. For that, I am using my own custom makefile, which is not managed by Eclipse. I have got everything working (the code compiles), apart of the IDE "seeing" all of the sources and not yielding errors:
I tried following this guide: Configuring Eclipse for Linux Kernel module development but it did not help me.

java.lang.UnsatisfiedLinkError: /usr/local/jdk5/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory

when I am trying deployed application on beta server (It is based on linux).
I have found below error in apache-tomcat log file(localhost.log).
java.lang.UnsatisfiedLinkError: /usr/local/jdk5/jre/lib/i386/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:769)
at java.lang.System.load(System.java:967)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1668)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1509)
at java.awt.Toolkit.<clinit>(Toolkit.java:1530)
at java.awt.Color.<clinit>(Color.java:250)
----
please help me.Thanks in advance.
I have faced similar error and below is the solution that work for me.
Please set Java path for your tomcat server in file catalina.sh.
Set JAVA_HOME path to your jdk version which is same as your compile version.
For Example :
JAVA_HOME=/usr/java5/jdk1.5.0_21
If required please also set CATALINA_HOME to your tomcat installation directory.
May this will help you.
The most probable thing is that you have included the awt libraries (or the complete java runtime) in your served .jar deployed file. Don't do that, as it will make your code to run only on environments like the development system you have used to test the application. Probably you are trying to deploy your application to Windows and linux platforms and it's asking for Xt.so linux libraries (to use awt over X11, on windows it uses a different library). Check your packaging configuration (the modules included in the .jar file) and don't include platform libraries (like the java runtime) that are architecture dependant. A common error is to include everything and you get this problem. Think twice before including some package in your deployment.

Cannot boot installed RHEL 7.1 with extlinux (syslinux)

I am trying to instal RHEL 7.1 with option
bootloader --location=mbr --append="console=ttyS0" --extlinux
in kickstart config file. The installation is made on virtual machine QEMU KVM.
No DEFAULT or UI configuration Directive found!
boot:
that error tells you that the syslinux configuration file does not define a DEFAULT action neither the UI (i.e. vesamenu) used for displaying a menu.

How to make self-contained or java-bundled JavaFX application package for ARM

Where could I acquire a working copy of compiled JavaFX app bundled with JRE so I could execute this app on ARM linux?
or
How can I create my JavaFX app + JRE bundle that would work on ARM Linux
Best case scenario for me would be to be ableto create copy-paste enabled folder tree or single executable file..
I do understand that this question might be too vague, but I desperately need some help on this. I have spent more than 6 evenings + 2 nights searching how to get a compiled JavaFX application ( .jar file) to run on ARM linux on UDOO (RPi2-like) board.
I have been more of an .NET guy a long time, and now I had to make WPF-like rich UX app that would run on this specific hardware, and I chose JavaFX due to its likeliness to WPF. It does run fine on my desktop PCs but I absolutely can not get it to run on ARM linux.
I am trying to do this too. Did you get it working? My solution is to package the JAR using tools provided by IntelliJ or any other IDE, include the JRE in a folder within the app, then write a script that invokes the JAR from the included JRE like:
lib/jre/bin/java -jar runthis.jar
I also tried it for two days now but didn't get it to work.
I use maven in combination with the javafx-maven-plugin to build native installers of an application.
At first I got the error, that the javafx-ant.jar tools are missing:
[ERROR] Failed to execute goal build-jar(create-jfxjar) on project foo:
Execution create-jfxjar of goal build-jar failed: Plugin javafx-maven-plugin or
one of its dependencies could not be resolved: Could not find artifact
javafx-packager:javafx-packager:jar:1.8.0 at specified path
/opt/jdk1.8.0/jre/../lib/ant-javafx.jar
Then I found the ant-javafx.jar in a windows JDK but then another error was reported that linux is not supported with this one. Ok so I downloaded a linux JDK and used that ant-javafx.jar. Now it could build and create a *.deb file successfully!
However when I started the installer it failed with a message and when checking the log (/var/log/apt/term.log)
Log started: 2021-04-29 00:40:01
dpkg: Error creating archive
/home/pi/Foo/target/jfx/native/foo.deb (--unpack):
package architecture (amd64) does not match system (armhf)
Then I did research and found the following mailing list entry:
[...] the Java Packager isn’t shipped with any ARM builds that I’m aware of. Currently it is only for X86 Windows, Linux and Mac. [...]
This basically explains it: The packager doesn't work on ARM for now. Maybe we should write the guy to encurage him to add it...
=> So for now I work with the jar directly.

Resources