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?
Best Answer
-
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.
0
Answers
-
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
classGoing 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
0 -
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.0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛