LCN Scripts don't work after Upgrade to JAVA 17 and OH $

After a upgrade today I’ll get a lot of errormessages involfiong the LCN Binding.
The Logfile ist filled with Errors like this:

2023-07-27 20:51:45.480 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NoSuchMethodError: 'void org.openhab.core.library.types.DecimalType.<init>(long)'
        at org.openhab.binding.lcn.internal.common.VariableValue.getState(VariableValue.java:93) ~[?:?]
        at org.openhab.binding.lcn.internal.subhandler.AbstractLcnModuleSubHandler.fireUpdateAndReset(AbstractLcnModuleSubHandler.java:173) ~[?:?]
        at org.openhab.binding.lcn.internal.subhandler.LcnModuleVariableSubHandler.handleStatusMessage(LcnModuleVariableSubHandler.java:84) ~[?:?]
        at org.openhab.binding.lcn.internal.subhandler.AbstractLcnModuleSubHandler.lambda$3(AbstractLcnModuleSubHandler.java:129) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at org.openhab.binding.lcn.internal.subhandler.AbstractLcnModuleSubHandler.tryParse(AbstractLcnModuleSubHandler.java:127) ~[?:?]
        at org.openhab.binding.lcn.internal.LcnModuleHandler.lambda$3(LcnModuleHandler.java:259) ~[?:?]
        at java.util.HashMap$Values.forEach(HashMap.java:1065) ~[?:?]
        at org.openhab.binding.lcn.internal.LcnModuleHandler.handleStatusMessage(LcnModuleHandler.java:259) ~[?:?]
        at org.openhab.binding.lcn.internal.PckGatewayHandler$1.lambda$4(PckGatewayHandler.java:105) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
        at java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720) ~[?:?]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
        at org.openhab.binding.lcn.internal.PckGatewayHandler$1.onPckMessageReceived(PckGatewayHandler.java:105) ~[?:?]
        at org.openhab.binding.lcn.internal.connection.Connection$1.lambda$0(Connection.java:189) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

How can I solve this or is this a bug?

File an issue with the LCN binding and tell them they need to change the type of what ever gets passed to the DecimalType constructor to a Number. DecimalType’s constructor doesn’t (any more?) accept primitives.

how do I do this? I thought here in the forum is the way to do so?

The forum is the first stop to help determine if this is a configuration problem or a bug and if it is a bug where the bug is. I’m able to tell all of that just by looking at the exception. This one is a no brainer.

It’s best to have the person with the problem file the issue as you are best able to answer questions and provide technical details. I don’t even know what this add-on does. I can’t file the issue.

thnx, I’ll try my Luck on GITHub

It seems you are using a custom built JAR file in the addons folder, which was compiled for OH 3.x. In OH 4, there were some constructors for primitive types (long in this case) removed. These are now handled by autoboxing by the DecimalType(Number) constructor. The byte code of the OH 3.x JAR still tries to access the constructor for primitive type, which aren’t present anymore. Try to remove the JAR from the addons folder and install the binding of the official distribution or compile the JAR for OH 4.

Reference: [LCN] throws NoSuchMethodError exception · Issue #15312 · openhab/openhab-addons · GitHub

Thank you for looking into it.
I used the JAR file you providet me after a bug I discovered. I missed your Information that the adressed problem is now in the official distribution.