Hello,

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() {
super();
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">
<metadata_adapter_initialised_first>Y</metadata_adapter_initialised_first>
<metadata_provider>
<adapter_class>xyz.MetadataAdapter</adapter_class>
<classloader>log-enabled</classloader>


...
</metadata_provider>
<data_provider>
<adapter_class>xyz.DataAdapter</adapter_class>
</data_provider>
</adapters_conf>

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,
Oliver