java.util.IllegalFormatConversionException: d != org.opennms.newts.api.Duration

The OpenNMS Issue Tracker | Matt Brozowski | 2 years ago
  1. 0

    The following exception occurs during the build (though it doesn't result in a build failure). It looks like an error in a toString method and might cause problems. {code} Running org.opennms.newts.rest.MeasurementsResourceTest SLF4J: Failed toString() invocation on an object of type [org.opennms.newts.rest.ResultDescriptorDTO] java.util.IllegalFormatConversionException: d != org.opennms.newts.api.Duration at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4045) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2748) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2702) at java.util.Formatter.format(Formatter.java:2488) at java.util.Formatter.format(Formatter.java:2423) at java.lang.String.format(String.java:2790) at org.opennms.newts.rest.ResultDescriptorDTO.toString(ResultDescriptorDTO.java:140) at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304) at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276) at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:113) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:447) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:403) at ch.qos.logback.classic.Logger.debug(Logger.java:522) at org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:94) at org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:124) at org.opennms.newts.rest.MeasurementsResourceTest.testGetMeasurements(MeasurementsResourceTest.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) {code}

    The OpenNMS Issue Tracker | 2 years ago | Matt Brozowski
    java.util.IllegalFormatConversionException: d != org.opennms.newts.api.Duration
  2. 0

    The following exception occurs during the build (though it doesn't result in a build failure). It looks like an error in a toString method and might cause problems. {code} Running org.opennms.newts.rest.MeasurementsResourceTest SLF4J: Failed toString() invocation on an object of type [org.opennms.newts.rest.ResultDescriptorDTO] java.util.IllegalFormatConversionException: d != org.opennms.newts.api.Duration at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4045) at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2748) at java.util.Formatter$FormatSpecifier.print(Formatter.java:2702) at java.util.Formatter.format(Formatter.java:2488) at java.util.Formatter.format(Formatter.java:2423) at java.lang.String.format(String.java:2790) at org.opennms.newts.rest.ResultDescriptorDTO.toString(ResultDescriptorDTO.java:140) at org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304) at org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276) at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:113) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:447) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:403) at ch.qos.logback.classic.Logger.debug(Logger.java:522) at org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:94) at org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:124) at org.opennms.newts.rest.MeasurementsResourceTest.testGetMeasurements(MeasurementsResourceTest.java:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) {code}

    The OpenNMS Issue Tracker | 2 years ago | Matt Brozowski
    java.util.IllegalFormatConversionException: d != org.opennms.newts.api.Duration
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Serialization related failure

    GitHub | 2 years ago | chupanw
    gov.nasa.jpf.JPFNativePeerException: exception in native method java.lang.String.format
  5. 0

    sitemap fails to display - generates exception - build #60 to current

    GitHub | 2 years ago | xsnrg
    javax.servlet.ServletException: javax.servlet.ServletException: java.util.IllegalFormatConversionException: d != java.lang.String
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.IllegalFormatConversionException

    d != org.opennms.newts.api.Duration

    at java.util.Formatter$FormatSpecifier.failConversion()
  2. Java RT
    String.format
    1. java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4045)
    2. java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2748)
    3. java.util.Formatter$FormatSpecifier.print(Formatter.java:2702)
    4. java.util.Formatter.format(Formatter.java:2488)
    5. java.util.Formatter.format(Formatter.java:2423)
    6. java.lang.String.format(String.java:2790)
    6 frames
  3. org.opennms.newts
    ResultDescriptorDTO.toString
    1. org.opennms.newts.rest.ResultDescriptorDTO.toString(ResultDescriptorDTO.java:140)
    1 frame
  4. SLF4J API Module
    MessageFormatter.arrayFormat
    1. org.slf4j.helpers.MessageFormatter.safeObjectAppend(MessageFormatter.java:304)
    2. org.slf4j.helpers.MessageFormatter.deeplyAppendParameter(MessageFormatter.java:276)
    3. org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:230)
    3 frames
  5. Logback Classic Module
    Logger.debug
    1. ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:113)
    2. ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:447)
    3. ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:403)
    4. ch.qos.logback.classic.Logger.debug(Logger.java:522)
    4 frames
  6. org.opennms.newts
    MeasurementsResourceTest.testGetMeasurements
    1. org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:94)
    2. org.opennms.newts.rest.MeasurementsResource.getMeasurements(MeasurementsResource.java:124)
    3. org.opennms.newts.rest.MeasurementsResourceTest.testGetMeasurements(MeasurementsResourceTest.java:75)
    3 frames
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  8. JUnit
    ParentRunner.run
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    6. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    9. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    10. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    11. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    12. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    13. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    14. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    14 frames
  9. JUnit4 Provider
    JUnit4Provider.invoke
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
    2. org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
    3. org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
    3 frames
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  11. SureFire
    ForkedBooter.main
    1. org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    2. org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    3. org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
    4. org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
    5. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
    5 frames