Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Service Wrapper on Raspberry PI

I'm trying the use the Tanuki Java Service Wrapper. The hardware I'm using is a Raspberry Pi with the Raspbian wheezy distribution. (see http://www.raspberrypi.org/downloads)

I've tried the Wrapper 32-bit armel release, but get problems with reading the libwrapper.so.

INFO | jvm 1 | 2013/04/24 20:15:34 | WrapperManager: Initializing...
INFO | jvm 1 | 2013/04/24 20:15:42 | WrapperManager Debug: Attempt to load native library with name: libwrapper.so Result: /usr/iHome/lib/libwrapper.so: /usr/iHome/lib/libwrapper.so: cannot open shared object file: No such file or directory

I've also tried the armhf release, since it seems that "apt-get java-7-openjdk", installed the jdk-armhf version, but there I did get "Segmentation fault" when starting the Wrapper.

Some extra info:

pi@raspberrypi /usr/lib/jvm $ java -version
java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2)
(7u7-2.3.2a-1+rpi1)OpenJDK Zero VM (build 22.0-b10, mixed mode)
pi@raspberrypi /usr/lib/jvm $ ls -altr
total 28 -rw-r--r-- 1 root root 2437 Sep 26 2012 .java-1.7.0-openjdk-armhf.jinfo
lrwxrwxrwx 1 root root 20 Sep 26 2012 java-1.7.0-openjdk-armhf -> java-7-> openjdk-armhf drwxr-xr-x 3 root root 4096 Jan 17 20:59 java-7-openjdk-common
drwxr-xr-x 5 root root 4096 Jan 17 21:00 java-7-openjdk-armhf
drwxr-xr-x 4 root root 4096 Jan 17 21:00 .
drwxr-xr-x 74 root root 12288 Apr 24 20:32 ..
pi@raspberrypi /usr/lib/jvm $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

Thanks in advance,

BR, Rob

like image 487
Rob Daems Avatar asked Nov 12 '22 06:11

Rob Daems


1 Answers

This issue has already been discussed on the Java Service Wrapper user mailing list in this thread, but here is the summary of the resolution.

The armhf version of the Wrapper is being built on an armv7 platform and apparently this is not compatible for armv6 hard float architectures. When using the armel version of the Wrapper with an armhf jvm then loading the native library fails due to the target mismatch.

The suggested solutions were to either use an armel jvm with the armel version of the Wrapper (since armv6 boards should support both) or to create the armhf binary for his board himself. For the second suggestion, the pre-release (from the sourceforge project site of the Wrapper) package has to get downloaded, extracted and the following shell script executed:

./build32.sh release

With the created binary the Wrapper was able to launch successfully. (the build process requires a JDK and Apache-Ant installed)

Cheers,

like image 195
Naytzyrhc Avatar answered Nov 21 '22 14:11

Naytzyrhc