You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2013/12/05 04:09:36 UTC

[jira] [Resolved] (CXF-4878) Avoid trying to register Jetty MBean if already registered to avoid very ugly WARN with stacktrace

     [ https://issues.apache.org/jira/browse/CXF-4878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved CXF-4878.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.0-milestone1
                   2.7.8

the jetty version 8.1.4 used in CXF now already have fix from jetty side

> Avoid trying to register Jetty MBean if already registered to avoid very ugly WARN with stacktrace
> --------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4878
>                 URL: https://issues.apache.org/jira/browse/CXF-4878
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.7.3
>            Reporter: Claus Ibsen
>            Assignee: Freeman Fang
>            Priority: Minor
>             Fix For: 2.7.8, 3.0.0-milestone1
>
>
> Running som OSGi Karaf + Camel + CXF tests and noticed these ugly warns
> {code}
> 2013-03-06 15:27:09,958 | WARN  | rint Extender: 1 | MBeanContainer                   | eclipse.jetty.jmx.MBeanContainer  305 | 94 - org.eclipse.jetty.util - 7.6.8.v20121106 | bean: org.apache.cxf.transport.http_jetty.JettyHTTPHandler@42882b9d
> javax.management.InstanceAlreadyExistsException: org.apache.cxf.transport.http_jetty:type=jettyhttphandler,id=0
> 	at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)[:1.7.0_13]
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)[:1.7.0_13]
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)[:1.7.0_13]
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)[:1.7.0_13]
> 	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)[:1.7.0_13]
> 	at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:512)[:1.7.0_13]
> 	at org.eclipse.jetty.jmx.MBeanContainer.addBean(MBeanContainer.java:298)[99:org.eclipse.jetty.jmx:7.6.8.v20121106]
> 	at org.eclipse.jetty.util.component.Container.addBean(Container.java:182)[94:org.eclipse.jetty.util:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.AbstractHandler.setServer(AbstractHandler.java:80)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.setServer(HandlerWrapper.java:136)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.ContextHandler.setServer(ContextHandler.java:249)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:90)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:162)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:282)[100:org.eclipse.jetty.server:7.6.8.v20121106]
> 	at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:432)[139:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.3]
> 	at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:179)[139:org.apache.cxf.cxf-rt-transports-http-jetty:2.7.3]
> 	at org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48)[113:org.apache.cxf.cxf-api:2.7.3]
> 	at org.apache.cxf.binding.AbstractBaseBindingFactory.addListener(AbstractBaseBindingFactory.java:95)[113:org.apache.cxf.cxf-api:2.7.3]
> 	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:131)[113:org.apache.cxf.cxf-api:2.7.3]
> 	at org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.doStart(CxfRsConsumer.java:44)[170:org.apache.camel.camel-cxf:2.11.0.SNAPSHOT]
> 	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)[68:org.apache.camel.camel-core:2.11.0.SNAPSHOT]
> {code}
> You can see them on the console when running this test from Apache Camel
> {code}
> camel/tests/camel-itest-osgi$ mvn clean test -Dtest=CxfRsBlueprintRouterTest
> {code}
> Wonder if there is a way to check if the mbean is already registered and avoid the WARN logs.



--
This message was sent by Atlassian JIRA
(v6.1#6144)