Skip to content

The special character '�' was observed with an error when using the metrics.  #1071

@janithcmw

Description

@janithcmw

Description:
An error is thrown when using metrics because of a NaN value.Following error was observed with the subjected special character when using the metrics.

ERROR {org.wso2.carbon.metrics.jdbc.reporter.JdbcReporter} - Error when reporting timers java.sql.SQLException: '�' is not a valid numeric or approximate numeric value
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:85)
at com.mysql.cj.jdbc.ClientPreparedStatement.setDouble(ClientPreparedStatement.java:1593)
at com.zaxxer.hikari.proxy.HikariPreparedStatementProxy.setDouble(HikariPreparedStatementProxy.java)
at org.wso2.carbon.metrics.jdbc.reporter.JdbcReporter.reportTimer(JdbcReporter.java:415)
at org.wso2.carbon.metrics.jdbc.reporter.JdbcReporter.reportTimers(JdbcReporter.java:389)
at org.wso2.carbon.metrics.jdbc.reporter.JdbcReporter.report(JdbcReporter.java:199)
at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:235)
at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:174)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.mysql.cj.exceptions.WrongArgumentException: '�' is not a valid numeric or approximate numeric value
at sun.reflect.GeneratedConstructorAccessor106.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
at com.mysql.cj.ClientPreparedQueryBindings.setDouble(ClientPreparedQueryBindings.java:427)
at com.mysql.cj.jdbc.ClientPreparedStatement.setDouble(ClientPreparedStatement.java:1591)
... 13 more

Affected Product Version:
WSO2SP-4.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions