1 0 1 0

Getting NoClassDefFoundError when trying to create OmmConsumer object


I am trying to create the OmmConsumer object by providing the EmaConfig parameters, username and Consumer Name.

OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig(configPath);
consumer = EmaFactory.createOmmConsumer(config.consumerName(consumerName).username(userName));

I am getting the below Exception and connection is not getting established.

Exception in thread "pool-15-thread-1" java.lang.NoClassDefFoundError: Could not initialize class com.refinitiv.eta.transport.WebSocketRequestHeader

at com.refinitiv.eta.transport.WebSocketHandlerImpl.createRequestHandshake(

at com.refinitiv.eta.transport.RsslSocketChannel.initChnlSendWebSocketHandshakeRequest(

at com.refinitiv.eta.transport.RsslSocketChannel.init(

at com.refinitiv.eta.valueadd.reactor.Worker.initializeChannel(


at java.util.concurrent.ThreadPoolExecutor.runWorker(

at java.util.concurrent.ThreadPoolExecutor$


I am using EMA and ETA version library and all the libraries are part of the class path.

export CLASSPATH="<path>/ema-$CLASSPATH"

export CLASSPATH="<path>/eta-$CLASSPATH"

export CLASSPATH="<path>/etaValueAdd-$CLASSPATH"

export CLASSPATH="<path>/etaValueAddCache-$CLASSPATH"

export CLASSPATH="<path>/ansipage-$CLASSPATH"

export CLASSPATH="<path>/etajConverter-$CLASSPATH"

export CLASSPATH="<path>/commons-configuration2-2.9.0.jar:$CLASSPATH"

export CLASSPATH="<path>/commons-lang3-3.13.0.jar:$CLASSPATH"

export CLASSPATH="<path>/commons-text-1.11.0.jar:$CLASSPATH"

export CLASSPATH="<path>/httpcore-nio-4.4.16.jar:$CLASSPATH"

export CLASSPATH="<path>/jose4j-0.9.3.jar:$CLASSPATH"

export CLASSPATH="<path>/lz4-java-1.8.0.jar:$CLASSPATH"

export CLASSPATH="<path>/xpp3-1.1.4c.jar:$CLASSPATH"

Below the channel configuration defined in EmaConfig.xml


<Name value="Channel_3"/>

<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>

<EncryptedProtocolType value="EncryptedProtocolType::RSSL_WEBSOCKET"/>

<GuaranteedOutputBuffers value="5000"/>

<Host value="host"/>

<Port value="port"/>

<WsMaxMsgSize value="61440"/>

<WsProtocols value="tr_json2"/>


Did anyone faced similar issue and able to resolve it?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
23.2k 60 15 21

Hi @sarthak.banerjee,

I haven't investigated in detail, but it looks like you have not included all the jar files required for resolution. Please include all the jars in the classpath from the following location in the SDK package:


Alternatively, you can use the provided Gradle build, since it will automatically resolve all the dependencies for your project.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.