question

Upvotes
Accepted
1 0 0 2

"Decoding of just encoded object in the same application is not supported"/Exception Type='OmmInvalidUsageException', Text='Attempt to fieldList() while actual data type is NoData' while reading the RefreshMsg object?

While create RefreshMsg object in BDD Cucumber Integration test suite, why do I keep getting the error "Decoding of just encoded object in the same application is not supported"/Exception Type='OmmInvalidUsageException', Text='Attempt to fieldList() while actual data type is NoData' while reading the RefreshMsg object? What is the solution to create and RefreshMsg object in Java integration tests?

#technology#productema-apijavarefinitiv-realtime-sdktestingjunit
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.

Upvotes
Accepted
24.7k 64 15 21

Hello @dimple.shah,

For unit testing the application, please start by looking Unit test examples in the SDK directory.

There are other conversations on this topic which can help you -

Creating FieldEntry for unit tests

Decode of just encoded object in EMA C++

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.

Upvotes
1 0 0 2

Hi,

The Unit test examples in the SDK directory are not getting compiled on my machine.
Also, please provide a Java equivalent of C++ encoder as the Java code through which we tried to decode the RefreshMsg object does not work.


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.

Upvotes
24.7k 64 15 21

Hello @dimple.shah,

Are you using a supported build environment. The RTSDK provides gradle build files, and the build file has a target to compile the unit tests as well.

To see an example of how to encode and decode Refresh message in Java, please see the RefreshMsg Tests file..

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.