javax.management.RuntimeOperationsException

Apache's JIRA Issue Tracker | Guillaume Mary | 4 years ago
  1. 0

    I want to monitor my CXF REST service call, then i use the Performance MBean provided by CXF. One of my operation use query params : {code:java} @GET @Path("/documents/{idDocument}") @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response loadDocument( @Context Request request, @HeaderParam("If-Modified-Since") Date date, @PathParam("idDocument") String idDocument, @QueryParam("loadingType") String loadingType)... {code} When i call the service's operation like this : {code:java} WebClient.create("http://host/DocumentService").path("/documents/{idDocument}","10").query("loadingType","C").accept("*/*").get(Response.class); {code} The operation works but in the log we have this stacktrace : {code:java} WARN - Create Counter''s ObjectName failed. {0} javax.management.RuntimeOperationsException at javax.management.ObjectInstance.<init>(ObjectInstance.java:97) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:985) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.registerMBeanWithServer(InstrumentationManagerImpl.java:331) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:229) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:246) at org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:239) at org.apache.cxf.management.counters.CounterRepository.createCounter(CounterRepository.java:117) at org.apache.cxf.management.counters.CounterRepository.increaseCounter(CounterRepository.java:93) at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.increaseCounter(AbstractMessageResponseTimeInterceptor.java:142) at org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.endHandlingMessage(AbstractMessageResponseTimeInterceptor.java:74) at org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor.handleMessage(ResponseTimeMessageInInterceptor.java:39) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.jaxrs.client.ClientMessageObserver.onMessage(ClientMessageObserver.java:56) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1494) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1402) at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:727) at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:678) at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:325) at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:422) ... Caused by: java.lang.IllegalArgumentException: Invalid name->org.apache.cxf:bus.id=cxf2071824233,type=Performance.Counter.Client,service="{http://host/DocumentService}WebClient",port="WebClient",operation="GET:http://host/DocumentService/documents/10?loadingType=C" at javax.management.ObjectInstance.<init>(ObjectInstance.java:94)... {code} I understand that the problem is when you use the WebClient to call your REST service. CXF use the URI to register the MBean to monitor the service call. In our case, the URI contains a question mark which is detected as a pattern style for an MBean and the Mbean server avoid creating an MBean with a pattern name. Maybe we could replace the question mark by another char.

    Apache's JIRA Issue Tracker | 4 years ago | Guillaume Mary
    javax.management.RuntimeOperationsException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Unable to start a spring boot web application with spring batch admin

    Stack Overflow | 2 years ago | Anoop Gopalakrishnan
    javax.management.RuntimeOperationsException: null at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:411)` at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)`
  4. 0

    javax.management.RuntimeOperationsException in prod mode for some URLs

    GitHub | 2 years ago | xhanin
    javax.management.RuntimeOperationsException: null

    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. javax.management.RuntimeOperationsException

      No message provided

      at javax.management.ObjectInstance.<init>()
    2. Java RT
      JmxMBeanServer.registerMBean
      1. javax.management.ObjectInstance.<init>(ObjectInstance.java:97)
      2. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:985)
      3. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
      4. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
      5. com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
      5 frames
    3. Apache CXF Runtime Management
      ResponseTimeMessageInInterceptor.handleMessage
      1. org.apache.cxf.management.jmx.InstrumentationManagerImpl.registerMBeanWithServer(InstrumentationManagerImpl.java:331)
      2. org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:229)
      3. org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:246)
      4. org.apache.cxf.management.jmx.InstrumentationManagerImpl.register(InstrumentationManagerImpl.java:239)
      5. org.apache.cxf.management.counters.CounterRepository.createCounter(CounterRepository.java:117)
      6. org.apache.cxf.management.counters.CounterRepository.increaseCounter(CounterRepository.java:93)
      7. org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.increaseCounter(AbstractMessageResponseTimeInterceptor.java:142)
      8. org.apache.cxf.management.interceptor.AbstractMessageResponseTimeInterceptor.endHandlingMessage(AbstractMessageResponseTimeInterceptor.java:74)
      9. org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor.handleMessage(ResponseTimeMessageInInterceptor.java:39)
      9 frames
    4. Apache CXF Core
      PhaseInterceptorChain.doIntercept
      1. org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      1 frame
    5. Apache CXF JAX-RS Client
      ClientMessageObserver.onMessage
      1. org.apache.cxf.jaxrs.client.ClientMessageObserver.onMessage(ClientMessageObserver.java:56)
      1 frame
    6. Apache CXF Runtime HTTP Transport
      HTTPConduit$WrappedOutputStream.close
      1. org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1627)
      2. org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1494)
      3. org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1402)
      3 frames
    7. Apache CXF Core
      AbstractConduit.close
      1. org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
      1 frame
    8. Apache CXF Runtime HTTP Transport
      HTTPConduit.close
      1. org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:649)
      1 frame
    9. Apache CXF Core
      PhaseInterceptorChain.doIntercept
      1. org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
      2. org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
      2 frames
    10. Apache CXF JAX-RS Client
      WebClient.get
      1. org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:727)
      2. org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:678)
      3. org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:325)
      4. org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:422)
      4 frames