Quest DB failed to run tutorial data insertion using Java with line protocol

OS: Ubuntu 20.04.3 LTS Java: openjdk version “17” 2021-09-14 | OpenJDK Runtime Environment (build 17+35-2724) Library: implementation group: ‘org.questdb’, name: ‘questdb’, version: ‘6.0.9’

Whenever I am trying to run the sample it produces this error:

    > Task :LineTCPSenderMain.main() FAILED
Exception in thread "main" java.lang.ExceptionInInitializerError
    at io.questdb.std.Unsafe.getFieldOffset(Unsafe.java:169)
    at io.questdb.std.Unsafe$1Probe.probe(Unsafe.java:105)
    at io.questdb.std.Unsafe.getOrdinaryObjectPointersCompressionStatus(Unsafe.java:119)
    at io.questdb.std.Unsafe.AccessibleObject_override_fieldOffset(Unsafe.java:86)
    at io.questdb.std.Unsafe.<clinit>(Unsafe.java:60)
    at io.questdb.std.Numbers.<clinit>(Numbers.java:2397)
    at io.questdb.std.AbstractCharSequenceHashSet.<init>(AbstractCharSequenceHashSet.java:45)
    at io.questdb.std.CharSequenceObjHashMap.<init>(CharSequenceObjHashMap.java:45)
    at io.questdb.std.CharSequenceObjHashMap.<init>(CharSequenceObjHashMap.java:40)
    at io.questdb.std.CharSequenceObjHashMap.<init>(CharSequenceObjHashMap.java:36)
    at io.questdb.log.LogFactory.<init>(LogFactory.java:51)
    at io.questdb.log.LogFactory.<init>(LogFactory.java:62)
    at io.questdb.log.LogFactory.<clinit>(LogFactory.java:40)
    at io.questdb.cutlass.line.LineTcpSender.<clinit>(LineTcpSender.java:32)
    at codes.rb.pricesloader.LineTCPSenderMain.main(LineTCPSenderMain.java:15)
Caused by: java.lang.NoSuchFieldException: intField
Caused by: java.lang.NoSuchFieldException: intField

    at java.base/java.lang.Class.getDeclaredField(Class.java:2610)
    at io.questdb.std.Unsafe.getFieldOffset(Unsafe.java:167)
    ... 14 more

Answer

QuestDB v6.0.9 (and previous) does not run on Java 17. Only Java 11 or 8 supported