Menu

#30 NullPointerException in SamplingMetric.getCnt(SamplingMetric.java:270)

v1.0_(example)
closed
nobody
None
1
2013-02-11
2013-02-11
No

In version 2.7.7, I have next message in log of logger.

2013/02/11 13:17:21.278 BTH_AseDbSpce - Error in loop. java.lang.NullPointerException
java.lang.NullPointerException
at asemon_logger.SamplingMetric.getCnt(SamplingMetric.java:270)
at asemon_logger.CollectorGeneric.getMetrics(CollectorGeneric.java:158)
at asemon_logger.Collector.run(Collector.java:482)

The error occurs on several collectors.

The solution is to change line 270 from
if (w.getErrorCode()==10351)
to
if ( (w != null) && (w.getErrorCode()==10351) )

It checks that rs.getWarnings() returns something.

Discussion

  • Laurent CHASTEL

    Laurent CHASTEL - 2013-02-11

    In src/asemon_logger/SamplingMetric.java

     
  • Jean-Paul Martin

    Ok Thanks,
    it's fixed in 2.7.8 available soon
    JP

     
  • Jean-Paul Martin

    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB