Error when running EMA Java 3.8.0.0 with JDK1.8.x

I'm trying to upgrade EMA 3.5.1.0 to EMA 3.8.0.0. Our current JDK version is 1.8.x. While starting the server with the new version, there is an error below:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2024-07-02 17:37:02.154 ERROR 21070 --- [main] com.om.dpf.pserv.PservErrorListener : java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
at com.refinitiv.eta.codec.BufferImpl.copy(BufferImpl.java:130)
at com.refinitiv.eta.valueadd.reactor.ReactorOptions.copy(ReactorOptions.java:499)
at com.refinitiv.eta.valueadd.reactor.Reactor.<init>(Reactor.java:287)
at com.refinitiv.eta.valueadd.reactor.ReactorFactory.createReactor(ReactorFactory.java:117)
at com.refinitiv.ema.access.OmmBaseImpl.initialize(OmmBaseImpl.java:323)
at com.refinitiv.ema.access.OmmConsumerImpl.<init>(OmmConsumerImpl.java:47)
at com.refinitiv.ema.access.EmaFactory.createOmmConsumer(EmaFactory.java:237)
at com.om.dpf.pserv.server.provider.reuters.ema.EMASessionFactory.start(EMASessionFactory.java:27)
Do we have to upgrade JDK to 1.11 or 1.17 to be compatible with EMA 3.8.0.0?
If not, how to resolve that issue above?
Best Answer
-
Hi @fanghua.liu,
This version of EMA 3.8 is the latest.
You can raise this issue at the RTSDK GitHub, where the developers of the SDK will be able to verify, and add it to the roadmap for the fix in the subsequent releases of the SDK.
0
Answers
-
Hello @fanghua.liu,
EMA Java is supported on JDK 1.8.x as shown in the API compatibility matrix and on the readme page of the SDK github page.
It seems like Java has changed the signature of the nio Bytebuffer and its internal implementation of the flip() method. There are few suggestions on the internet regarding how to force the compiler to generate for a specific Java version. You can try these suggestions, namely -
javac --source 1.8 --target 1.8
https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/
If you are still having issues, can you provide a reproducable example, which I can try to compile to see this error, and suggest fixes.
0 -
Hi @Gurpreet
Thanks for the reply!
I found that in JDK8, position(int) in Buffer class in rt.jar is public final method which ByteBuffer is not able to inherit. But in JDK9 or plus versions, the method in Buffer class is changed to public type. So when I built a ran EMA3.8 on JDK8, I have had this error.
Also, which EMA version is the stablest and do you recommend us upgrade to?
0 -
Hello @fanghua.liu
Alternatively, if you are the RDC named user you can submit a support ticket to the Real-Time APIs Support team (RDC) to verify this issue in detail.
You can submit a ticket by clicking the "contact premium support" botton on the https://developers.lseg.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-java page.0 -
Hello @fanghua.liu
I re-checked the RTSDK 2.2.0.L1 (EMA 3.8.0.0). I found that the README file mentions the supported Java version as follows:
#### Supported Java Version
The Refinitiv Real-Time-SDK supports Oracle JDK 1.11 & 1.17, OpenJDK 1.11 & 1.17, Amazon Corretto 11.
#### Tested Versions
This release has been tested with the following:
Oracle Java SE 11 (JDK1.11)
Oracle Open JDK (1.11)
Oracle Open JDK (1.17)
Amazon Corretto 11It seems the EMA 3.8.0.0 does not support Java 8 anymore.
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 629 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛