Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TREP APIs /
  • UPA /
avatar image
Question by mreina · Mar 17, 2021 at 02:00 PM · elektronelektron-sdkrrteta-apielektron-transport-api

JAVA UPA API StringIndexOutOfBoundsException when doing message encodeInit

I'm receiving StringIndexOutOfBoundsException when I do msg.encodeInit, I can debug/see the code because UPA API is obfuscated.

// init message
int ret = msg.encodeInit(encodeIter, 0);


java.lang.StringIndexOutOfBoundsException: String index out of range: 4
    at java.lang.StringLatin1.charAt(StringLatin1.java:44) ~[?:?]
    at java.lang.String.charAt(String.java:704) ~[?:?]
    at com.thomsonreuters.upa.codec.R.A(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.B(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.A(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.A(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.A(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.B(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.K.A(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]
    at com.thomsonreuters.upa.codec.u.encodeInit(Unknown Source) ~[upa-7.4.0.jar:upaj7.4.F9]


Does channel.getBuffer(size, packedBuffer, error) returns a new instance of TransportBuffer or if it recycles an existing instance?

if it recycles, - and we have the exception above in msg.encodeInit, where the TransportBuffer has been assigned to the EncodeIterator >> is the TransportBuffer impacted? Should we "clean" it?



People who like this

0 Show 0
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.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.w · Apr 09, 2021 at 09:43 AM
Hello @mreina


It seems you are using the UPA Java version 7.4.0 which is quite old, end of life, and no longer supported. If you can replicate the issue in other environments such as Dev or QA, I strongly suggest you test with the latest version of ETA Java (rebrand of UPA Java). You can download the ETA Java from the RTSDK package via the RTSDK Java download page or GitHub.



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 Lars-at-Addicticks · Mar 18, 2021 at 03:42 PM

UPA has later been open-sourced. It has been rebranded at Elektron Transport API (ETA).

It now lives here: https://github.com/Refinitiv/Real-Time-SDK/tree/master/Java


Despite package name changes (to reflect company name change) I would think you can still follow the source code. I doubt the part you are interested in has changed. Here's a starting point : Source code for Msg class


Going forward you can of course simply switch to the (newer) open source version, i.e. ETA. You'll then get the transparency you are used to when working with open source libraries: The jar, the javadoc and the source are all in Maven Central so your IDE can easily access it and stepping through code will be a breeze.


Link to artifact in Maven Central: https://search.maven.org/artifact/com.refinitiv.eta/eta







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 mreina · Mar 18, 2021 at 04:52 PM

thank you.

This happened during production and we cannot just switch jars like that.
It would be helpfull if you provide the obfuscation logs of your api.

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 >
7 People are following this question.

Related Questions

Crash in rsslFlush function in debugger

How can I use FieldList’s set definitions for payload in the MarketPrice response?

Multiple Stream Ids

rsslDecodeFilterEntry returns RSSL_RET_INCOMPLETE_DATA (-26)

Predicting Required Buffer Size

  • 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