mainDataExplorer - Support: sr #109066, cannot run under raspberry pi...

 
 

sr #109066: cannot run under raspberry pi model 1 B. No java/ext directory ?

Submitter:  None
Submitted:  Sat 11 Jun 2016 04:31:47 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 16 Jun 2016 07:29:36 PM UTC, comment #6: 

Thanks
Given that I know nothing about java this will be difficult

Nevertheless I may try.

I will start from this I think
http://www.lucid-control.com/create-raspberry-pi-swt-gui-applications-with-java-and-eclipse/

Also from my other post maybe a quad-core raspi will be better.
The model 1 B is known for USB port to be weak current providers.

Regards

Anonymous
Sun 12 Jun 2016 09:36:13 AM UTC, comment #5: 

Raspberry pi is not part of the supported platforms, even if it it runs a Linux. There are several reasons for this. DataExplorer, needs some libraries for the operating system which are supporting the native functionality. This is for instance this SWT libraries, USB4Java libraries, RxTxComm libraries.

All I know that there are ported libraries for RxTxComm package and some ports for USB4java, but I am not aware of libraries for SWT already exist. At least I have never tried this.

So you need to extend the build/lib path with directory for ARM Linux which is the OS running on your Raspberry and extend the build.xml to enable all requirements for this platform.

I do not own a Raspberry so you are on your own.

Winfried Brügmann <brueg>
Group administrator
Sat 11 Jun 2016 05:03:28 PM UTC, comment #4: 

chown pi -Rv /usr/local/DataExplorer/

chmod 700 /usr/local/DataExplorer/DataExplorer /usr/local/DataExplorer/DataExplorer.jar

/usr/local/DataExplorer $ nano DataExplorer

In usr/local/DataExplorer  intel32 adn arms got mixed up I believe

./DataExplorer
java -Dfile.encoding=UTF-8 -jar -Xms64m -Xmx256m ./DataExplorer.jar
argument
11-Jun-2016 19:01:33 gde.config.Settings load
WARNING: /home/pi/.DataExplorer/DataExplorer.properties (No such file or directory)
11-Jun-2016 19:01:36 gde.config.Settings getInstance
TIME: init time = 03:610
11-Jun-2016 19:01:38 gde.GDE main
SEVERE: Could not load SWT library. Reasons:
        no swt-gtk-4527 in java.library.path
        no swt-gtk in java.library.path
        /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
        Can't load library: /home/pi/.swt/lib/linux/arm/libswt-gtk.so

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        no swt-gtk-4527 in java.library.path
        no swt-gtk in java.library.path
        /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
        Can't load library: /home/pi/.swt/lib/linux/arm/libswt-gtk.so

        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at gde.GDE.main(GDE.java:372)
11-Jun-2016 19:01:38 gde.GDE main
SEVERE: Could not load SWT library. Reasons:
        no swt-gtk-4527 in java.library.path
        no swt-gtk in java.library.path
        /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
        Can't load library: /home/pi/.swt/lib/linux/arm/libswt-gtk.so

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        no swt-gtk-4527 in java.library.path
        no swt-gtk in java.library.path
        /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: /home/pi/.swt/lib/linux/arm/libswt-gtk-4527.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
        Can't load library: /home/pi/.swt/lib/linux/arm/libswt-gtk.so

        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
        at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
        at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
        at gde.GDE.main(GDE.java:372)
11-Jun-2016 19:01:45 gde.config.Settings Settings
TIME: schema factory setup time = 12:039


Anonymous
Sat 11 Jun 2016 04:56:21 PM UTC, comment #3: 

As root again but with
export LD_LIBRARY_PATH=/usr/lib/jni:/usr/share/java:/usr/lib/gcj:/usr/lib/java
export ANT_HOME=


make install

blabla
install:
     [echo] Execution OS = Linux arm 32
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

GNULinux:
     [echo] Linux arm 32
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

GNULinuxDefault:
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

GNULinuxPrefix:
     [echo] installing to /usr/local
     [copy] Copying 30 files to /usr/local
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

Windows:
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

MAC:
     [echo] OS short name = GNULinux

BUILD SUCCESSFUL
Total time: 5 minutes 2 seconds

Anonymous
Sat 11 Jun 2016 04:45:36 PM UTC, comment #2: 

As a Pi user
make install
did not manage well
I guess it created /opt/DataExplorer/java/ext/swt.jar

So I tried as root
# make install
blabla
GNULinuxPrefix:
     [echo] installing to /usr/local
     [copy] Copying 58 files to /usr/local
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

Windows:
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

MAC:
     [echo] OS short name = GNULinux

BUILD SUCCESSFUL
Total time: 5 minutes 12 seconds

One note :
I am doing all this over ssh, so on a headless raspberry.
ssh -X -v  -email is unavailable-
So with -X I should have the window forwarded to my PC.

This is executed from main PC running linux as well
In a Konsole, after ssh to the raspberry
$ pwd ; java -Dfile.encoding=UTF-8 -jar -Xms64m -Xmx128m ./DataExplorer.jar


Anonymous
Sat 11 Jun 2016 04:37:41 PM UTC, comment #1: 

I have /usr/share/java/swt-gtk-3.8.jar
I might have copied it in the build directory wiht name swt.jar

$ locate swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/GNULinux/32/swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/GNULinux/64/swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/MAC/32/swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/MAC/64/swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/Windows/32/swt.jar
/home/pi/dataexplorer-3.2.6/build/lib/Windows/64/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/GNULinux_32/DataExplorer/java/ext/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/GNULinux_64/DataExplorer/java/ext/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/Mac_32/DataExplorer.app/Contents/Resources/java/ext/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/Mac_64/DataExplorer.app/Contents/Resources/java/ext/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/Windows_32/DataExplorer/java/ext/swt.jar
/home/pi/dataexplorer-3.2.6/build/target/Windows_64/DataExplorer/java/ext/swt.jar
/opt/DataExplorer/java/ext/swt.jar
/usr/share/java/swt.jar

$ ls -l /usr/lib/jni/
total 956
-rw-r--r-- 1 root root  42620 Oct 29  2012 libswt-atk-gtk-3833.so
-rw-r--r-- 1 root root   5352 Oct 29  2012 libswt-awt-gtk-3833.so
-rw-r--r-- 1 root root  42876 Oct 29  2012 libswt-cairo-gtk-3833.so
-rw-r--r-- 1 root root   9596 Oct 29  2012 libswt-glx-gtk-3833.so
-rw-r--r-- 1 root root  13688 Oct 29  2012 libswt-gnome-gtk-3833.so
-rw-r--r-- 1 root root 399672 Oct 29  2012 libswt-gtk-3833.so
-rw-r--r-- 1 root root 398832 Oct 29  2012 libswt-pi-gtk-3833.so
-rw-r--r-- 1 root root  46380 Oct 29  2012 libswt-webkit-gtk-3833.so

AT some point I did this as well
ln -s /usr/lib/jni/libswt-* /home/pi/.swt/lib/linux/arm/

Anonymous
Sat 11 Jun 2016 04:31:47 PM UTC, original submission:  

Hello,

I apologize disturbing you with this issue.
Google was no help, nor the thread from candlepower nor
http://www.corecompute.com/raspberrypi/raspberrypi_20160103.html
 
I cannot run DEX under the raspberry.

I went as far as compiling 3.2.6 with ant and trying to run the jar.
My guess is that the build misses at least the directory java/ext

I do not see an ARM directory here for the various targets
home/pi/dataexplorer-3.2.6/build/target/

So i run the jar version here
/home/pi/dataexplorer-3.2.6/DataExplorer/build

$ pwd ; java -Dfile.encoding=UTF-8 -jar -Xms64m -Xmx128m ./DataExplorer.jar
/home/pi/dataexplorer-3.2.6/DataExplorer/build
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/graphics/Device
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.graphics.Device
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
Could not find the main class: gde.GDE. Program will exit.

I tried also with a copy of the shell script with
 export SWT_GTK3=0

I created the directory with copy of jar from 32 bits
(did not think it would work, but just in case)
ls -l java/ext/
total 8336
-rw-r--r-- 1 pi pi  385091 May  6 15:09 commons-lang3-3.2.1.jar
-rw-r--r-- 1 pi pi 4749125 May  6 15:09 HoTTMdlViewer.jar
-rw-r--r-- 1 pi pi   42620 Jun 11 17:50 libswt-atk-gtk-3833.so
-rw-r--r-- 1 pi pi    5352 Jun 11 17:50 libswt-awt-gtk-3833.so
-rw-r--r-- 1 pi pi   42876 Jun 11 17:50 libswt-cairo-gtk-3833.so
-rw-r--r-- 1 pi pi    9596 Jun 11 17:50 libswt-glx-gtk-3833.so
-rw-r--r-- 1 pi pi   13688 Jun 11 17:50 libswt-gnome-gtk-3833.so
-rw-r--r-- 1 pi pi  399672 Jun 11 17:50 libswt-gtk-3833.so
-rw-r--r-- 1 pi pi  398832 Jun 11 17:50 libswt-pi-gtk-3833.so
-rw-r--r-- 1 pi pi   46380 Jun 11 17:50 libswt-webkit-gtk-3833.so
-rw-r--r-- 1 pi pi  110326 May  6 15:09 libusb4java-1.2.0.jar
-rw-r--r-- 1 pi pi  449632 Jun 11 13:19 RXTXcomm.jar
-rw-r--r-- 1 pi pi    5153 May  6 15:09 RXTXcomm.LICENSE
-rwx------ 1 pi pi 1707841 Jun 11 17:07 swt.jar
-rw-r--r-- 1 pi pi   46086 May  6 15:09 usb4java-1.2.0.jar
-rw-r--r-- 1 pi pi   61087 May  6 15:09 usb4java-javax-1.2.0.jar
-rw-r--r-- 1 pi pi   27526 May  6 15:09 usb-api-1.0.2.jar

The error message is then
java -Dfile.encoding=UTF-8 -jar -Xms64m -Xmx128m ./DataExplorer.jar
/home/pi/dataexplorer-3.2.6/DataExplorer/build
11-Jun-2016 18:14:14 gde.config.Settings load
WARNING: /home/pi/.DataExplorer/DataExplorer.properties (No such file or directory)
11-Jun-2016 18:14:14 gde.config.Settings getInstance
SEVERE:
java.lang.NullPointerException:
        at gde.config.Settings.updateDeviceProperties(Settings.java:405)
        at gde.config.Settings.<init>(Settings.java:311)
        at gde.config.Settings.getInstance(Settings.java:241)
        at gde.GDE.<clinit>(GDE.java:235)
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
        at gde.GDE.<clinit>(GDE.java:235)
Could not find the main class: gde.GDE. Program will exit.

I am lost now
Can you please help or advise where to go from here

Here what I perform so far

uname -a
Linux 3.12.26-rpi-aufs #1 PREEMPT Thu Aug 14 10:48:01 CEST 2014 armv6l GNU/Linux
cat /etc/issue
Raspbian GNU/Linux 7 \n \l

sudo apt-get install ant ant-contrib oracle-java7-jdk

export ANT_HOME=
Otherwise
Buildfile: /home/pi/dataexplorer-3.2.6/build/build.xml
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
  [taskdef] Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. It could not be found.

sudo apt-get install libgtk-3-bin libswt-gtk* libswt-cairo-gtk*
sudo apt-get install openjdk-7-jre

java -version
java version "1.6.0_38"
OpenJDK Runtime Environment (IcedTea6 1.13.10) (6b38-1.13.10-1~deb7u1+rpi1)
OpenJDK Zero VM (build 23.25-b01, mixed mode)

./configure
make

init_OS:
     [echo] Execution OS = Linux arm 32
     [echo] OS short name = GNULinux
init:

echo:build.properties:
     [echo] Building using /home/pi/dataexplorer-3.2.6/build/build.properties

package:
     [echo] Building using /home/pi/dataexplorer-3.2.6/build/build.properties
     [echo] Execution OS = Linux arm 32, OS short name = GNULinux

compile:
     [copy] Copying 1 file to /home/pi/dataexplorer-3.2.6/DataExplorer/classes

package:
     [echo] Building using Linux arm
      [jar] Building jar: /home/pi/dataexplorer-3.2.6/DataExplorer/build/DataExplorer.jar

blabla

dist:
     [echo] Building on system Linux arm 32

The very first time
     [echo] Building using Java 1.7.0_40
Now since I installed another java version at some point
[echo] Building using Java 1.6.0_38

BUILD SUCCESSFUL
Total time: 5 minutes 20 seconds

I tried all sorts of things
sudo cp -v /usr/lib/java/swt-gtk-3.8.0.jar /usr/share/java/
I also tried to copy it inside build and rename it
swt.jar

export LD_LIBRARY_PATH=/usr/lib/jni:/usr/share/java:/usr/lib/gcj:/usr/lib/java

I am not confused between arm and 32 or 64 bits versions.
So I do run the  jar under build.

Thanks for your advice
Regards

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by brueg (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-06-12 brueg Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code