Require assistance in Postgres + Hibernate : Error:java.math.BigInteger cannot be cast to java.math.BigDecimal - Mailing list pgsql-general

From Vinodh NV
Subject Require assistance in Postgres + Hibernate : Error:java.math.BigInteger cannot be cast to java.math.BigDecimal
Date
Msg-id CAMBHpRjM-7o=ga7R0RKNwYtJN-0jHihhq_2gXQvKsb3fUH24hg@mail.gmail.com
Whole thread Raw
Responses Re: Require assistance in Postgres + Hibernate : Error:java.math.BigInteger cannot be cast to java.math.BigDecimal
Re: Require assistance in Postgres + Hibernate : Error:java.math.BigInteger cannot be cast to java.math.BigDecimal
List pgsql-general
Hi,

Require assistance on the below:

Code snippet:
Map<String,Object> ic;
//Populate values for ic
long count = ((BigDecimal)ic.get(“EB”)).longValue();


Getting the below error:
    java.math.BigInteger cannot be cast to java.math.BigDecimal
    ®java.lang.ClassCastException: java.math.BigInteger cannot be cast to java.math.BigDecimal

Since this is not part of a query doing select cast (EB as bigint) will not help in this case:

Can u let me know the solution for this?

Regards,
Vinodh

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: oracle_fdw Question
Next
From: Luis Carril
Date:
Subject: Re: Trying to the behavior of a parallel query with with a change inthe transaction isolation mode