Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-8048

Agent throws exceptions on missing or empty descriptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9.0.0
    • None
    • Mission Control Core
    • None

    Description

      When the description of an event or value is empty or missing, the agent fails with exceptions like this:

       

      SEVERE: Failed to generate event class for JFRTransformDescriptor method:toString()Ljava/lang/String;, eventName:StringBuilder.toString(), #params:0
      java.lang.IllegalArgumentException: value null
              at org.openjdk.jmc.internal.org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:501)
              at org.openjdk.jmc.internal.org.objectweb.asm.AnnotationWriter.visit(AnnotationWriter.java:259)
              at org.openjdk.jmc.agent.jfr.impl.JFREventClassGenerator.generateClassAnnotations(JFREventClassGenerator.java:231)
              at org.openjdk.jmc.agent.jfr.impl.JFREventClassGenerator.generateEventClass(JFREventClassGenerator.java:70)
              at org.openjdk.jmc.agent.jfr.impl.JFRClassVisitor.generateEventClass(JFRClassVisitor.java:109)
              at org.openjdk.jmc.agent.jfr.impl.JFRClassVisitor.visitEnd(JFRClassVisitor.java:89)
              at org.openjdk.jmc.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:722)
              at org.openjdk.jmc.internal.org.objectweb.asm.ClassReader.accept(ClassReader.java:401)
              at org.openjdk.jmc.agent.Transformer.doJFRLogging(Transformer.java:104)
              at org.openjdk.jmc.agent.Transformer.doTransform(Transformer.java:85)
              at org.openjdk.jmc.agent.Transformer.doTransforms(Transformer.java:75)
              at org.openjdk.jmc.agent.Transformer.transform(Transformer.java:63)
              at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
              at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
              at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
              at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
              at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:167)
              at org.openjdk.jmc.agent.jmx.AgentController.defineEventProbes(AgentController.java:80)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
              at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193)
              at java.management/com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175)
              at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)
              at java.management/com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)
              at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
              at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
              at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
              at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
              at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
              at example.jfr/examples.UniversalConverter.defineProbes(UniversalConverter.java:359)
              at example.jfr/examples.EmptyDescriptionTest.main(EmptyDescriptionTest.java:6)
       
      

      Since the description annotations are not required and the exception is hard to relate to the missing description, the agent should just omit the description annotation in that case.

      Attachments

        Issue Links

          Activity

            People

              rschmelter Ralf Schmelter
              rschmelter Ralf Schmelter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: