我有一个带有金额字段的 SQl,例如,
to_char(ERR_VW.GROSS_AMT,'$999,999,999.99') GROSS_AMT,
但是当我通过hibenrate执行这个时,我得到了foll异常
Wrapped exception:
java.sql.SQLException: Fail to convert to internal representation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:240)
at oracle.jdbc.driver.CharCommonAccessor.getBigDecimal(CharCommonAccessor.java:325)
at oracle.jdbc.driver.OracleResultSetImpl.getBigDecimal(OracleResultSetImpl.java:1513)
at oracle.jdbc.driver.OracleResultSet.getBigDecimal(OracleResultSet.java:2099)
at org.hibernate.type.BigDecimalType.get(BigDecimalType.java:46)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:184)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:210)
at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.extract(CustomLoader.java:501)
at org.hibernate.loader.custom.CustomLoader$ResultRowProcessor.buildResultRow(CustomLoader.java:447)
at org.hibernate.loader.custom.CustomLoader.getResultColumnOrRow(CustomLoader.java:344)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:647)
at org.hibernate.loader.Loader.doQuery(Loader.java:745)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:270)
at org.hibernate.loader.Loader.doList(Loader.java:2294)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2172)
at org.hibernate.loader.Loader.list(Loader.java:2167)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:316)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1832)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:179)
我该如何处理它们?