eclipse-hono / hono

Eclipse Hono™ Project
https://eclipse.dev/hono
Eclipse Public License 2.0
453 stars 137 forks source link

CLI: NullPointerException in amqp-device or command mode #3576

Closed calohmn closed 1 year ago

calohmn commented 1 year ago

When starting the Hono CLI based on current Hono master, there is an NPE when using the amqp-device mode or the mode to send commands. E.g.

java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:209)
    at org.jline.console.impl.Builtins.<init>(Builtins.java:83)
    at org.jline.console.impl.Builtins.<init>(Builtins.java:74)
    at org.eclipse.hono.cli.adapter.amqp.AmqpAdapter.readAndExecuteCommands(AmqpAdapter.java:269)
    at org.eclipse.hono.cli.adapter.amqp.AmqpAdapter.call(AmqpAdapter.java:403)
    at org.eclipse.hono.cli.adapter.amqp.AmqpAdapter.call(AmqpAdapter.java:78)

(line number in AmqpAdapter.java refers to my locally changed file)

The issue is that the org.jline.console.impl.Builtins class now requires a non-null configpath parameter value. This has been introduced in JLine 3.22 (see here). In current Hono master, JLine 3.23 is used.

In Hono 2.4, JLine 3.21 is used, so there's probably no issue there.

sophokles73 commented 1 year ago

Thanks for spotting :+1: