Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Work around for adding CNH as a valid currency in java.util.currency

Sameer Vittala-OracleMay 29 2018 — edited May 29 2018

Hi,

One of our customer is using Oracle Retail Store Inventory Management built on Java Platform. While subscribing to a JMS message from other Oracle Retail Application, the message fails with the following exception

Caused by: oracle.retail.sim.closed.common.SimServerException: error handling message!

at oracle.retail.sim.closed.integration.handler.SimMessageHandler.handleMessage(Unknown Source)

... 37 more

Caused by: java.lang.IllegalArgumentException

at java.util.Currency.getInstance(Currency.java:320)

at java.util.Currency.getInstance(Currency.java:284)

at oracle.retail.sim.shared.integration.consumer.items.ItemSupCtyCreateConsumer.process(Unknown Source)

at oracle.retail.sim.shared.integration.consumer.items.ItemSupCtyCreateConsumer.consume(Unknown Source)

at oracle.retail.sim.closed.integration.consumer.SimMessageConsumer.consume(Unknown Source)

at oracle.retail.sim.closed.integration.consumer.SimMessageConsumerFactory.consume(Unknown Source)

at oracle.retail.sim.closed.integration.handler.ConsumeHandler.doHandleMessage(Unknown Source)

... 38 more

The exception is coming from Java Util. Going a step further java.util.currency supports ISO 4217 currency codes. ( https://www.iso.org/iso-4217-currency-codes.html to get the valid currencies as per ISO 4217). Now CNH is not a valid currency as per ISO 4217 standards.

PRC released CNH for trading Chinese currency outside China. This a valid requirement

Can the Java team provide for any workaround for this issue

Regards,

Sameer

Comments
Post Details
Added on May 29 2018
0 comments
1,318 views