Re: [OpenPnP] Ubuntu 18.04 on ARM new installation failed

259 views
Skip to first unread message

jdlv

unread,
Apr 11, 2020, 1:05:04 PM4/11/20
to ope...@googlegroups.com
Hi,

I think you should not use "sudo ./OpenPnP" but OpenPnP only.
/opt should be in the user path and openpnp doesn't need superuser rights.


Looks like rights issue :

2020-04-08 17:25:51.240 SystemLogger ERROR: at
java.security.AccessController.doPrivileged(Native Method)
2020-04-08 17:25:51.240 SystemLogger ERROR: at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

But I'm no expert at all...

Joël




Le 11/04/2020 à 13:45, Leyzer Weissbein a écrit :
> Hey guys,
>
> I am trying to do a new installation of OpenPNP v1 on ARM machine under
> Ubuntu18.04.
> Unfortunately without success since a couple of days, I am new to Linux. I
> also couldn't find any help in already existing topics here or any
> installation guides on GitHub.
> I would be very thankful if someone could support with an advice.
>
> So after Ubuntu installation I have deleted the embedded OpenJDK 11 and
> installed Oracle Java JDK 1.8, seems to be succesfull, java -version and
> javac -version show 1.8 as active.
> Next step was installing .deb package of v1 OpenPNP, went well. Going to
> /opt/openpnp I can see OpenPnP.desktop and OpenPnP files. I am starting the
> one without ending, which is presumably .sh file.
> The command is sudo ./OpenPnP.
> After this step absolutely nothing happens, after a second or so I am back
> in terminal. I only see a new error log created. Here is what it contains.
> I have read that someone had a problem with headless java, but what I have
> installed and what is activated is not a headless version...I hope.
> Anyway I am desperate, please help :) Many thanks in advance!
>
> 2020-04-08 17:25:51.230 SystemLogger ERROR: java.awt.HeadlessException
> 2020-04-08 17:25:51.235 SystemLogger ERROR: at
> java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)
> 2020-04-08 17:25:51.236 SystemLogger ERROR: at
> java.awt.Window.<init>(Window.java:536)
> 2020-04-08 17:25:51.237 SystemLogger ERROR: at
> java.awt.Frame.<init>(Frame.java:420)
> 2020-04-08 17:25:51.237 SystemLogger ERROR: at
> java.awt.Frame.<init>(Frame.java:385)
> 2020-04-08 17:25:51.237 SystemLogger ERROR: at
> javax.swing.JFrame.<init>(JFrame.java:189)
> 2020-04-08 17:25:51.238 SystemLogger ERROR: at
> org.openpnp.gui.MainFrame.<init>(MainFrame.java:210)
> 2020-04-08 17:25:51.238 SystemLogger ERROR: at
> org.openpnp.Main$1.run(Main.java:152)
> 2020-04-08 17:25:51.238 SystemLogger ERROR: at
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
> 2020-04-08 17:25:51.238 SystemLogger ERROR: at
> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
> 2020-04-08 17:25:51.239 SystemLogger ERROR: at
> java.awt.EventQueue.access$500(EventQueue.java:97)
> 2020-04-08 17:25:51.239 SystemLogger ERROR: at
> java.awt.EventQueue$3.run(EventQueue.java:709)
> 2020-04-08 17:25:51.239 SystemLogger ERROR: at
> java.awt.EventQueue$3.run(EventQueue.java:703)
> 2020-04-08 17:25:51.240 SystemLogger ERROR: at
> java.security.AccessController.doPrivileged(Native Method)
> 2020-04-08 17:25:51.240 SystemLogger ERROR: at
> java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
> 2020-04-08 17:25:51.240 SystemLogger ERROR: at
> java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
> 2020-04-08 17:25:51.241 SystemLogger ERROR: at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
> 2020-04-08 17:25:51.241 SystemLogger ERROR: at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
> 2020-04-08 17:25:51.241 SystemLogger ERROR: at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
> 2020-04-08 17:25:51.242 SystemLogger ERROR: at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
> 2020-04-08 17:25:51.242 SystemLogger ERROR: at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
> 2020-04-08 17:25:51.242 SystemLogger ERROR: at
> java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
>

Leyzer Weissbein

unread,
Apr 11, 2020, 2:19:55 PM4/11/20
to OpenPnP
Hey Joël,

thanks for your reply. I have tried different options starting OpenPnP, also tried starting OpenPnP.desktop file. Unfortunately nothing happens. It is like running the script for a second and comes back to terminal standby.
The only thing which appears is the error.log....

Jim

unread,
Apr 11, 2020, 2:42:02 PM4/11/20
to OpenPnP
Hi, i always thought the ready made download binaries are for x32 / x64 architectures only.

Jim

Leyzer Weissbein

unread,
Apr 11, 2020, 2:48:26 PM4/11/20
to OpenPnP
Hey Jim,

what I am trying to do is running it on quad core ARM Cortex A57 with 4GB RAM.

Wladimir Nickel

unread,
Apr 12, 2020, 4:12:07 AM4/12/20
to OpenPnP
Hi Leyzer,

I don't know much about the HEADLESS errors. I think it means, that no graphical libraries were installed along with your Oracle JDK. Or there is no X11 on your Ubuntu.

I ran OpenPnP on a Raspberry Pi 4 (quad core ARM A72) with 4GB RAM with restrictions (OpenPnPCameraCapture doesn't work, just OpenCVCapture). I also replaced the OpenJDK with Oracle JDK 1.8.0_202. The OS is raspbian, not Ubuntu.

Leyzer Weissbein

unread,
Apr 12, 2020, 7:47:10 AM4/12/20
to OpenPnP
Hi Wladimir,

thanks for your input.

I have just checked if x11 is installed. It is installed and running. 
Also tried running ./OpenPnP without sudo, now I see the same error.log in terminal. 

Wladimir, could you please share some more details on your setup with Raspi4? Did you intsalled OpenPnP as usual or did you have some problems as well?
Are there any other restrictions in usage except those with OpenPnPCameraCapture? And what exactly is restricted? Do you mean you cannot use the USB cameras with the built in driver?
Can you use CSI camera inputs? 
Thanks!

Wladimir Nickel

unread,
Apr 12, 2020, 10:35:15 AM4/12/20
to OpenPnP
Hi,

I installed OpenPnP2 using downloaded .deb package.
sudo dpkg -i OpenPnP-linux-develop.deb

Installing Oracle Java was not easy because most tutorials on installing Java were written before the Oracle sign up necessity. I found a tarball somewhere in the net.
sudo tar xvzf jdk-8u202-linux-arm32-vfp-hflt.tar.gz -C /opt
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_202/bin/javac 1
sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_202/bin/java 1
sudo update-alternatives --config javac
sudo update-alternatives --config java

I can't remember whether I installed OpenCV separately.

The OpenCVCamera driver supports the original Raspbery Pi cam (mine is camera V2.1) at CSI bus as well as USB webcams. The OpenPnPCaptureCamera and the Webcams drivers don't work. Unable to load library 'openpnp-capture': Native library (linux-arm/libopenpnp-capture.so) not found in resource path ....
I can't test IP cams, because I don't have any.
The GCode driver works perfectly (USB to serial /dev/ttyUSB0).


Leyzer Weissbein

unread,
Apr 13, 2020, 2:04:52 PM4/13/20
to OpenPnP
Thanks Wladimir,
this is basically the same what I have done. 

I have tried adding -Djava.awt.headless=false to the configuration.
Now I have new errors. It seems that OpenPnP can't find some graphics indeed. Something like awt.Toolkit and others are missing.
Does anyone have a clue?
Also tried installing different Java versions like 1.8 for 32bit(does not work at all), and embedded Java for ARMv7. Still no success.
Please help if anyone knows where the problem is. Thanks :)

java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/jdk1.8.0_241/jre/lib/aarch64/libawt_xawt.so
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1820)
    at java.lang.Runtime.load0(Runtime.java:809)
    at java.lang.System.load(System.java:1086)
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at java.awt.Toolkit$3.run(Toolkit.java:1636)
    at java.awt.Toolkit$3.run(Toolkit.java:1634)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.loadLibraries(Toolkit.java:1633)
    at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
    at javax.swing.UIManager.getSystemLookAndFeelClassName(UIManager.java:611)
    at org.openpnp.Main.main(Main.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:62)
    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
    at java.awt.EventQueue.invokeLater(EventQueue.java:1294)
    at com.exe4j.runtime.LauncherEngine.handleFailure(LauncherEngine.java:109)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
    at java.awt.EventQueue.invokeLater(EventQueue.java:1294)
    at com.exe4j.runtime.LauncherEngine.handleFailure(LauncherEngine.java:109)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:71)
    at com.install4j.runtime.launcher.UnixLauncher.main(UnixLauncher.java:57)
Reply all
Reply to author
Forward
0 new messages