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

The BluetoothLE example fails when the cloudPublisher is undefined #2296

Closed
7 tasks
pierantoniomerlino opened this issue Oct 23, 2018 · 0 comments
Closed
7 tasks
Assignees

Comments

@pierantoniomerlino
Copy link
Contributor

Please describe the issue you are encountering in Kura.

Fill the following form and provide a textual description if you are reporting a bug.
Provide only a textual description otherwise.

  • Component affected:

    • Distribution

      • Installer name (e.g. kura_3.1.0_raspberry-pi-2-3_installer.deb): kura_4.0.0_raspberry-pi-2-3.deb
      • Platform (e.g. Raspberry pi 2): Raspberry Pi 3 B+
      • Kura version affected (e.g. Kura 3.1.0): 4.0.0
      • Java version (paste the result of java -version: 1.8.0_65
      • Host OS (e.g. Debian): Raspian
      • Host OS version
    • Development environment

      • Version:
      • Operating system (Mac OS, Windows, Linux):
      • OS Version:
      • IDE Version:
      • Host System Java Version:
    • Oomph installer

    • Add-ons

      • Name:
      • Version:
      • URL:
    • Eclipse Kura Marketplace

    • Kura Website

    • Kura Documentation

    • If needed to replicate the issue, please provide references for the browser used:

      • Name:
      • Version:
  • Textual description of the issue:

The org.eclipse.kura.example.ble.sensortag.tinyb bundle fails when the cloudPublisher is undefined.
The result is that after the sensor reading, the bundle tries to publish a message. Since the cloudPublisher is undefined, the thread is killed. Moreover, if the buttons are enabled, the following log message is shown when the button is pressed:

2018-10-23T09:24:30,780 [Thread-23] INFO  o.e.k.e.b.t.t.BluetoothLe - Received key 0
2018-10-23T09:24:30,781 [Thread-23] ERROR o.e.k.e.b.t.t.BluetoothLe - Can't publish message for buttons
java.lang.NullPointerException: null
	at org.eclipse.kura.example.ble.tisensortag.tinyb.BluetoothLe.doPublishKeys(BluetoothLe.java:201) ~[?:?]
	at org.eclipse.kura.example.ble.tisensortag.tinyb.BluetoothLe.lambda$0(BluetoothLe.java:301) ~[?:?]
	at org.eclipse.kura.example.ble.tisensortag.tinyb.TiSensorTag.lambda$7(TiSensorTag.java:1213) ~[?:?]
	at org.eclipse.kura.internal.ble.BluetoothLeNotification.run(BluetoothLeNotification.java:26) [org.eclipse.kura.ble.provider_1.0.200.jar:?]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant