Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Elektron /
  • EMA /
avatar image
Question by samer.masaad · Mar 05, 2019 at 09:59 AM · elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apiOMM

Exception occurred: com.sun.jdi.InvocationException occurred invoking method..

While debugging, the value of any OmmArray is:

ErrorException occurred: com.sun.jdi.InvocationException occurred invoking method..

Usually, not defining toString() method causes this error in the debug mode. However, the toString() method is defined in OmmArrayImpl that implements OmmArray, and is used by EmaFactory to return a new OmmArray. A bug is blocking me and I can't find it due to this reason.

Any help? Thanks

Edit: additional info:

EMA 3.2.2.0, Java 1.8 with Maven, Windows 10

The problem occurs while creating dynamic OmmConsumers, here is a small piece of code that briefs the code I have:

fields_array.add(EmaFactory.createOmmArrayEntry().intValue(13));
fields_array.add(EmaFactory.createOmmArrayEntry().intValue(14));
batch_array.add(EmaFactory.createOmmArrayEntry().ascii("EUR="));
batch_array.add(EmaFactory.createOmmArrayEntry().ascii("GBP="));

ElementList customView = EmaFactory.createElementList();
customView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_BATCH_ITEM_LIST, batch_array));
customView.add(EmaFactory.createElementEntry().uintValue(EmaRdm.ENAME_VIEW_TYPE, 1));
customView.add(EmaFactory.createElementEntry().array(EmaRdm.ENAME_VIEW_DATA, field_array));

consumer.registerClient(EmaFactory.createReqMsg().serviceName(serviceName).payload(customView), new AppClient());
}

The code above might work, however, my actual code is more complex but avoided posting it because it's long and might be not important for the question. Please don't hesitate to ask for it if necessary.

Since running the code I have results in an error, I'm using debug mode to investigate and find the bug. It is something related to the fields_array and the only way to solve it is to check it's value during debug mode. And that is not possible due the above error.

People who like this

0 Show 2
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
zoya faberov ♦♦ · Mar 05, 2019 at 11:03 AM 0
Share

Hello @samer.masaad,

In order for us to be able to help, try to provide as much information as possible:

  • Version of EMA, Java, OS
  • What was the application doing when this exception has occurred
  • Does it occur repeatedly, or what is the way to reproduce
  • Did the app ever function as expected, is this something that has first appeared after changes, if so, what were the changes to the app?
  • Attach the code, the complete trace, any other pertaining info that is relevant to the question

We will try to help.

avatar image
samer.masaad zoya faberov ♦♦ · Mar 05, 2019 at 11:51 AM 0
Share

Thank you for your answer. I have updated the question with the additional info.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by zoya faberov · Mar 12, 2019 at 04:08 PM

Hello @samer.masaad,

If you feel this is an issue with Elektron SDK, please post the complete description, as an issue with Elektron SDK on GitHub.

If you feel this is an issue with a debugger, you may get a better result by reporting it to the provider of the debugger tool?

If you feel the issue has been resolved, please let us know.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by nick.zincone · Mar 05, 2019 at 12:25 PM

Hi @samer.masaad,

It is obviously difficult to debug your application with code that might work if we were to try it. That being said, if you are able to narrow down the issue with a small snippet that you know fails consistently, that could help.

I don't know the level of debugging you have tried, but the EMA Java source code is included along with the download package and you can step through code segments such as OmmArrayImpl to better understand - you may already be doing this. However, you do say you are unable to debug your fields_array, which I don't fully understand why not.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by zoya faberov · Mar 05, 2019 at 01:23 PM

Hello @samer.masaad,

I have taken an example BatchView MarketPrice consumer, and replaced the main part, the guts of it, with your code. It works. (I can attach the code, if on interest)

Therefore, you should assume that the issue you are seeing originates in another part of the code. I am totally in agreement with @nick.zincone.1 , will need to narrow down the possible location, in order to pinpoint and fix.

Hope this info is of help, by excluding some possibilities.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by samer.masaad · Mar 07, 2019 at 04:33 AM

Hello @zoya.farberov and @nick.zincone.1,

Thank you for your kind replies. The main reason of my question was never to fix the actual bug I have in my code, but to fix the problem I faced with the debugger, that's why I avoided posting my code. However, I was able to solve the bug using some turnarounds, but the debugger still shows the same error anytime I try to access any OmmArray in anywhere in my program, even when the code works. The debugger problem is not specific to this chunk of code.

Even though my bug is solved, I'm still open to discuss the solution of this problem hoping to help anyone that might encounter the problem later.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

[EMA CPP] Trade Safety of a class that inherits from OmmConsumerClient

OmmConsumer and DACS onbehalf

Exception Type='OmmInvalidUsageException', Text='Failed to rsslElementEntry.encode() while encoding rssl elementlist. Reason='INVALID_DATA''

ERROR: 'Attempt to submit initial RefreshMsg with service name of XYZ that was not included in the SourceDirectory

getting OmmInvalidUsageException when I am running example

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges