Bad value for type BigDecimal : Infinity

From: Ivan Petrov <capacytron(at)gmail(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Bad value for type BigDecimal : Infinity
Date: 2021-07-08 18:37:44
Message-ID: CAEARqsEv43ug8LMqhFjYS9ke9YphvfchtUC=fJp=k5KxGksnDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

Hi, I'm using postgres JDBC driver version 42.2.23
https://mvnrepository.com/artifact/org.postgresql/postgresql/42.2.23

Here is my exception

Bad value for type BigDecimal : Infinity; nested exception is
org.postgresql.util.PSQLException: Bad value for type BigDecimal : Infinity
at
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:104)
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
at
org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1541)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:465)
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:475)
...
Caused by: org.postgresql.util.PSQLException: Bad value for type BigDecimal
: Infinity
at org.postgresql.jdbc.PgResultSet.toBigDecimal(PgResultSet.java:3064)
at org.postgresql.jdbc.PgResultSet.toBigDecimal(PgResultSet.java:3073)
at org.postgresql.jdbc.PgResultSet.getNumeric(PgResultSet.java:2491)
at org.postgresql.jdbc.PgResultSet.getBigDecimal(PgResultSet.java:2443)
at org.postgresql.jdbc.PgResultSet.getBigDecimal(PgResultSet.java:406)

What is the right way to debug it? Column name would help...

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2021-07-08 19:45:34 Re: Bad value for type BigDecimal : Infinity
Previous Message Raj kumar 2021-07-08 15:08:48 Re: PG13 Autovacuum for Insert

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2021-07-08 19:45:34 Re: Bad value for type BigDecimal : Infinity
Previous Message Dave Cramer 2021-07-08 18:31:35 Re: ResultSet updates are not retained - 42.2.23