Questions tagged [java-money]

Java Money and Currency API for the Java

JSR 354 JavaMoney Provides a portable and extensible framework for handling of Money & Currency for Java™. The API models monetary amounts and currencies in a platform independent and portable way, including well defined extension points. It's API defines a simple yet flexible contract that enables users to choose the implementation matching their target requirements best and having full control about the numeric state at all stages during monetary processing.

54 questions
0
votes
1 answer

Amort Table using javamoney 1.3 library

I want to use javamoney for making an amort table for loans. I thought of using PresentValueOfAnnuityPayment but was unable to find it in javamoney 1.3. Any suggestions? EDIT: I added this dependency in project but still am unable to find…
newUser
  • 1
  • 1
  • 3
0
votes
1 answer

Moneta 1.3 ExchangeRateProvider.getExchangeRate(base, term) returns null

I'm using Moneta JavaMoney 1.3 to obtain an exchange rate: CurrencyUnit base = Monetary.getCurrency(...); CurrencyUnit term = Monetary.getCurrency(...); ExchangeRateProvider xrates = MonetaryConversions.getExchangeRateProvider(); ExchangeRate xrate…
wouterio
  • 137
  • 1
  • 10
0
votes
1 answer

Why the JavaMoney dependency is packages as POM?

I am not very much experienced with build systems, but this got me curious. Most libraries use jar (the default) for their dependencies, but the JavaMoney library uses pom instead, what's the reason?
Michel Feinstein
  • 13,416
  • 16
  • 91
  • 173
0
votes
1 answer

javax.money throws javax.money.MonetaryException: No MonetaryAmountFormat for AmountFormatQuery

I've got an existing servlet application using tomcat 8 and java 8. I've been using org.javamoney.moneta.Money for some time. Today I wanted to add a new pattern and I started getting the following exception: javax.money.MonetaryException: No…
Brett Sutton
  • 3,900
  • 2
  • 28
  • 53
0
votes
2 answers

Springboot Convert String to JavaMoney

I have one client that post into my service currency just like this: { "id": 1, "amount": "12.323,44" } how can configure my springboot to convert this in a java money field? this is my object public class MyObject { private Long id; private…
Fabio Ebner
  • 2,613
  • 16
  • 50
  • 77
0
votes
1 answer

javax.money.RoundingContextBuilder NoClassDefFoundError

I want to create javax.money.CurrencyUnit by using: public static CurrencyUnit getCurrency() { return Monetary.getCurrency("IDR"); } But, I got error: java.lang.NoClassDefFoundError: at javax.money.RoundingContextBuilder.
Rudi Wijaya
  • 872
  • 1
  • 10
  • 25
0
votes
1 answer

Java 9 javax.money.MonetaryAmount (JSR 354): Unable to convert Pojo to XML and vice versa

I'm using Rest Api call to convert Pojo to XML. Below is my code snippet: TestAccount.java import javax.money.MonetaryAmount; public class TestAccount { private MonetaryAmount paymentAmount; private String accountNumber; …
Aftab
  • 2,863
  • 32
  • 41
0
votes
2 answers

Ebean can't serialize Money

I try to switch my Java pet-project from hand-written SQL to Ebean. When I run the project now I get the message Was unable to use reflection to find a constructor and appropriate getters forimmutable type interface…
Anonymous Coward
  • 856
  • 1
  • 11
  • 27
-2
votes
1 answer

JSR 354 Money in Java 8

I need to do Money calculations in my application that is java 8. Since the operations i need to do are basic operations, i am considering creating my own money class. But looking at the long term i see Java9 has its own Money implementation which…
Nithin
  • 415
  • 4
  • 14
1 2 3
4