I am running into the following strange issue. I have created two adapters:
  • public class DataAdapter implements SmartDataProvider
  • public class MetadataAdapter extends LiteralBasedProvider

In MetadataAdapter's constructor a static instance variable gets set (the only write access to the instance variable in the whole project):

public MetadataAdapter() {
metadataAdapterInstance = this;

Read access is provided by:

public static MetadataAdapter instance() {
return metadataAdapterInstance;

But when this instance variable is accessed it is sometimes set and sometimes null. E.g. it is always null when accessing it within DataAdapters's constructor:

public DataAdapter() {
logger.debug("[constructor] instance = {}", MetadataAdapter.instance());

The adapters.xml looks like this (shortened):
<adapters_conf id="online-consulting">


Interestingly enough, in my debugging environment everything works fine (Intellij). The setings are:
Main class: com.lightstreamer.LS
VM options: -Dcom.lightstreamer.kernel_lib_path=lib/lightstreamer.jar -Dcom.lightstreamer.logging_lib_path=lib/ls-logging-utilities.jar -Dcom.lightstreamer.internal_lib_path=lib/ls-monitor.jar:lib/core/*:lib/mpn/*:lib/mpn/apns/*:lib/mpn/gcm/*:shared/lib/*
Program arguments: conf/lightstreamer_conf.xml

Any idea what might cause this strange (and show stopping) behaviour?

Best regards,