Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle com.sun.jna not active on RPI: is it normal ? #1557

Open
lolodomo opened this issue Jul 22, 2023 · 10 comments
Open

Bundle com.sun.jna not active on RPI: is it normal ? #1557

lolodomo opened this issue Jul 22, 2023 · 10 comments

Comments

@lolodomo
Copy link
Contributor

After starting OH snapshot 3556, all bundles are active except one:

 40 x Starting x  80 x 5.12.1                 x com.sun.jna

Is there a problem somewhere ?

@J-N-K
Copy link
Member

J-N-K commented Jul 22, 2023

What does diag 40 say?

@lolodomo
Copy link
Contributor Author

Nothing:

openhab> diag 40
openhab>

@lolodomo
Copy link
Contributor Author

I probably did not check since a long time on my RPI but I have in mind that all the bundles were "Active" after a OH start.

@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 22, 2023

I just tried to install the snapshot 3556 on my PC but with no config except the modules Basic UI and RRD4j and in that case, the bundle com.sun.jna is active.
So maybe something specific to RPI or to my OH setup ?

@lolodomo lolodomo changed the title Bundle com.sun.jna not active: is it normal ? Bundle com.sun.jna not active on RPI: is it normal ? Jul 22, 2023
@lolodomo
Copy link
Contributor Author

@kaikreuzer : should we care of that or not for OH4 release ?

@kaikreuzer
Copy link
Member

As we do not even know if there is a general problem and if so, how to fix it, I would clearly answer with "no".

@wborn
Copy link
Member

wborn commented Jul 30, 2023

Works fine on my Pi.

openhab> bundle:list -s | grep jna                                                                                      
 40 │ Active │  80 │ 5.12.1                 │ com.sun.jna
 41 │ Active │  80 │ 5.12.1                 │ com.sun.jna.platform
openhab> info
Karaf
  Karaf version               4.4.3
  Karaf home                  /openhab/runtime
  Karaf base                  /openhab/userdata
  OSGi Framework              org.eclipse.osgi-3.18.0.v20220516-2155

JVM
  Java Virtual Machine        OpenJDK 64-Bit Server VM version 17.0.7+7-Debian-1deb11u1
  Version                     17.0.7
  Vendor                      Debian
$ cat /proc/cpuinfo

...

Hardware	: BCM2835
Revision	: c03114
Model		: Raspberry Pi 4 Model B Rev 1.4
$ docker info

...

Server:
 Server Version: 24.0.5
 Kernel Version: 5.15.0-1032-raspi
 Operating System: Ubuntu 22.04.2 LTS
 OSType: linux
 Architecture: aarch64

@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 30, 2023

Do you know what bundles are using this bundle ?
Maybe my server setup doesn't need it ?

 40 x Starting x  80 x 5.12.1                 x com.sun.jna
 41 x Active   x  80 x 5.12.1                 x com.sun.jna.platform
Karaf
  Karaf version               4.4.3
  Karaf home                  /home/xxx/openhab/runtime
  Karaf base                  /home/xxx/openhab/userdata
  OSGi Framework              org.eclipse.osgi-3.18.0.v20220516-2155

JVM
  Java Virtual Machine        OpenJDK Server VM version 17.0.6+10
  Version                     17.0.6
  Vendor                      Azul Systems, Inc.

...

Operating system
  Name                        Linux version 5.10.103-v7+
  Architecture                arm
  Processors                  4
  Total physical memory       945,364 kbytes
  Free physical memory        88,288 kbytes
Model           : Raspberry Pi 3 Model B Plus Rev 1.3

@wborn
Copy link
Member

wborn commented Jul 30, 2023

openhab> bundle:capabilities 40
com.sun.jna_5.12.1 [40] provides:
---------------------------------
osgi.wiring.bundle; com.sun.jna 5.12.1 required by:
   com.sun.jna.platform_5.12.1 [41]
osgi.wiring.host; com.sun.jna 5.12.1 [UNUSED]
osgi.identity; com.sun.jna 5.12.1 [UNUSED]
osgi.wiring.package; com.sun.jna 5.12.1 required by:
   io.methvin.directory-watcher_0.17.1 [44]
   org.jline_3.21.0 [26]
osgi.wiring.package; com.sun.jna.ptr 5.12.1 required by:
   io.methvin.directory-watcher_0.17.1 [44]
   org.jline_3.21.0 [26]
osgi.wiring.package; com.sun.jna.win32 5.12.1 required by:
   org.jline_3.21.0 [26]

JNA is used for using native libraries which can improve performance. It could be there are no native libs for your architecture so it's not used.

See also: https://github.com/java-native-access/jna

I also have a Pi 3 with a 32-bit OS in storage which I can fire up to do some testing if I find some time.

org.jline

It's a Karaf dependency that deals with handling console input, see: https://github.com/jline/jline3

io.methvin.directory-watcher

This is used for the WatchService, see openhab/openhab-core#3004.

@wborn
Copy link
Member

wborn commented Aug 4, 2023

Works fine on my old Pi too:

openhab> bundle:list -s | grep jna
 40 │ Active │  80 │ 5.12.1                 │ com.sun.jna
 41 │ Active │  80 │ 5.12.1                 │ com.sun.jna.platform
$ cat /proc/cpuinfo

...

Hardware	: BCM2835
Revision	: a02082
Model		: Raspberry Pi 3 Model B Rev 1.2
$ docker info

...

Server:
 Server Version: 24.0.5
 Kernel Version: 6.1.21-v7+
 Operating System: Raspbian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: armv7l

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants