Uploaded image for project: 'infrautils'
  1. infrautils
  2. INFRAUTILS-74

JcServiceStatusMXBean does not conform to spec

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 1.9.1
    • jobcoordinator

    Description

      This was detected in downstream tests:

      javax.management.NotCompliantMBeanException: org.opendaylight.infrautils.jobcoordinator.internal.JcServiceStatusMXBean: Method org.opendaylight.infrautils.jobcoordinator.internal.JcServiceStatusMXBean.jcStatus has parameter or return type that cannot be translated into an open type
      	at java.management/com.sun.jmx.mbeanserver.Introspector.throwException(Introspector.java:467)
      	at java.management/com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:120)
      	at java.management/com.sun.jmx.mbeanserver.MBeanAnalyzer.analyzer(MBeanAnalyzer.java:102)
      	at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.getAnalyzer(MXBeanIntrospector.java:74)
      	at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.getPerInterface(MBeanIntrospector.java:192)
      	at java.management/com.sun.jmx.mbeanserver.MBeanSupport.<init>(MBeanSupport.java:138)
      	at java.management/com.sun.jmx.mbeanserver.MXBeanSupport.<init>(MXBeanSupport.java:66)
      	at java.management/com.sun.jmx.mbeanserver.Introspector.makeDynamicMBean(Introspector.java:203)
      	at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:888)
      	at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320)
      	at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
      	at org.opendaylight.infrautils.jobcoordinator.internal.JcServiceStatus.register(JcServiceStatus.java:67)
      	at org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl.initialize(JobCoordinatorImpl.java:119)
      	at org.opendaylight.infrautils.jobcoordinator.internal.JobCoordinatorImpl$$FastClassByGuice$$9194da16.invoke(<generated>)
      	at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:57)
      	at com.mycila.guice.ext.injection.MethodInvoker$1$1.invoke(MethodInvoker.java:46)
      	at com.mycila.guice.ext.jsr250.Jsr250PostConstructHandler.handle(Jsr250PostConstructHandler.java:47)
      	at com.mycila.guice.ext.jsr250.Jsr250PostConstructHandler.handle(Jsr250PostConstructHandler.java:1)
      	at com.mycila.guice.ext.injection.MethodHandlerTypeListener$1.afterInjection(MethodHandlerTypeListener.java:53)
      	at com.google.inject.internal.MembersInjectorImpl.notifyListeners(MembersInjectorImpl.java:131)
      	at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:117)
      	at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:245)
      	at com.google.inject.internal.Initializer.injectAll(Initializer.java:140)
      	at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:176)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
      	at com.google.inject.Guice.createInjector(Guice.java:87)
      	at org.opendaylight.infrautils.inject.guice.testutils.GuiceRule.setUpGuice(GuiceRule.java:94)
      	at org.opendaylight.infrautils.inject.guice.testutils.GuiceRule$1.evaluate(GuiceRule.java:84)
      	at org.opendaylight.infrautils.testutils.LogRule$1.evaluate(LogRule.java:61)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
      	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
      	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
      	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
      Caused by: java.lang.IllegalArgumentException: Method org.opendaylight.infrautils.jobcoordinator.internal.JcServiceStatusMXBean.jcStatus has parameter or return type that cannot be translated into an open type
      	at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:46)
      	at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:84)
      	at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:54)
      	at java.management/com.sun.jmx.mbeanserver.MBeanAnalyzer.initMaps(MBeanAnalyzer.java:137)
      	at java.management/com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:118)
      	... 45 more
      Caused by: javax.management.openmbean.OpenDataException: Cannot convert type: java.util.Map<java.lang.Object, org.opendaylight.infrautils.jobcoordinator.internal.JcState>
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.openDataException(DefaultMXBeanMappingFactory.java:1445)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.mappingForType(DefaultMXBeanMappingFactory.java:261)
      	at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.<init>(ConvertingMethod.java:212)
      	at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:41)
      	... 49 more
      Caused by: javax.management.openmbean.OpenDataException: Cannot convert type: java.lang.Object
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.openDataException(DefaultMXBeanMappingFactory.java:1445)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.mappingForType(DefaultMXBeanMappingFactory.java:261)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.makeTabularMapping(DefaultMXBeanMappingFactory.java:363)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.makeParameterizedTypeMapping(DefaultMXBeanMappingFactory.java:406)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.makeMapping(DefaultMXBeanMappingFactory.java:297)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.mappingForType(DefaultMXBeanMappingFactory.java:259)
      	... 51 more
      Caused by: javax.management.openmbean.OpenDataException: Can't map java.lang.Object to an open data type
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.makeCompositeMapping(DefaultMXBeanMappingFactory.java:460)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.makeMapping(DefaultMXBeanMappingFactory.java:294)
      	at java.management/com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory.mappingForType(DefaultMXBeanMappingFactory.java:259)
      	... 55 more
      

      This seems to be related to the change of key types to Object and these seem to be re-exported.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: