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 GAUTHIER.ROEBROECK · Jan 15, 2017 at 10:21 PM · emaconfiguration

prevent trying to load EmaConfig.xml

Is it possible to prevent totally EMA to try reading the configuration file EmaConfig.xml completely ?

I am specifying the configuration from code using EmaFactory.createOmmConsumerConfig() and adding my own parameters.

However, the following are still showing in the logs, and they could be misinterpreted:

2017-01-16 11:11:48.422 INFO 33216 --- [ restartedMain] c.t.ema.access.OmmConsumerImpl : loggerMsg ClientName: EmaConfig Severity: Info Text: reading configuration file [EmaConfig.xml] from [D:\src\makoco] loggerMsgEnd

2017-01-16 11:11:48.422 ERROR 33216 --- [ restartedMain] c.t.ema.access.OmmConsumerImpl : loggerMsg ClientName: EmaConfig Severity: Error Text: Cannot locate configuration source EmaConfig.xml loggerMsgEnd

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.

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by wasin.waeosri · Jan 16, 2017 at 04:51 AM

Hi @GAUTHIER.ROEBROECK

Basically, the EMA Java is hard coded to look for the EMAConfig.xml file by default in the EmaConfigImpl.readConfiguration() function. This function is called every time the application calls the EmaFactory.createOmmConsumerConfig(); statement.

The source code is EmaConfigImpl.readConfiguration() in the <Elektron SDK java package>\Ema\Src\main\java\impl\com\thomsonreuters\ema\access\ folder as shown below:

You can modify the source code above to change the behavior, but I strongly suggest you test the application after code changed to verify if there are any unexpected errors.


emaconfigsourcecode.png (11.3 KiB)
Comment

People who like this

0 Show 1 · 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
GAUTHIER.ROEBROECK · Jan 16, 2017 at 09:10 PM 0
Share

That's a shame that this configuration loading is hard coded.

avatar image
REFINITIV
Answer by nick.zincone.1 · Jan 16, 2017 at 11:22 AM

Hi @GAUTHIER.ROEBROECK

As indicated by Wasin, the current implementation of the libraries will always search for the EmaConfig.xml and log details if not found. If there is a concern regarding the misinterpretation of this log message, you do have the option to suppress the log details. Ema Java utilizes the Logger class so you can create your own log handler and intercept this message.

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 iain.scott · Jan 17, 2017 at 05:10 AM

Hi,

A change to config file loading in EMA Java would be a useful addition to EMA. If this change was made as a pull request via GitHub we would certainly considering incorporating that into the EMA trunk for future releases.

Thanks

Iain

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 brian.sandri · Jan 18, 2017 at 06:02 PM

Both EMAJ and EMA C++ will always attempt to load the config file, however a config file is not required for either of them. The issue you are encountering with EMAJ is that the logging level for the config file messages is set to INFO, which ends up being displayed when running with default settings. In EMA C++, these are set to a lower log level so they are not output at the default logging level. We plan to change the log level in EMAJ to match how EMA C++ was set. This should result in the config related log messages you see going away unless you switch the log level from the default (INFO) to something less granular that would again include them.

For a quick workaround, and you don’t want to see the message, you can set logger level to higher level, see the below (assume you are using java.util.logging)

-Djava.util.logging.config.file=pathToLoggingConfig/logging.properties

Inside this logger configuration file, you can set logging level to Warning to override the default.

java.util.logging.ConsoleHandler.level=WARNING

Hope this helps!

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

Related Questions

EMA NIP Dictionary request

Offstream post returns Error Text channel out of buffers errorId=-4 errorText=channel out of buffers

EMA C++ - Buffer overflow on debugging with strace

EMA Java API dead lock

createOmmConsumer is throwing java exception

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • 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
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges