Don't log the warning about the jmx stuff if the start method isn't there.  Its 
not there on recent jetty


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/65b0f60d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/65b0f60d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/65b0f60d

Branch: refs/heads/master-jaxrs-2.1
Commit: 65b0f60d75ae3b25f5a4ecd8a7b10874161ae31d
Parents: a5f53af
Author: Daniel Kulp <[email protected]>
Authored: Thu Aug 25 13:54:46 2016 -0400
Committer: Daniel Kulp <[email protected]>
Committed: Thu Aug 25 13:54:46 2016 -0400

----------------------------------------------------------------------
 .../transport/http_jetty/JettyHTTPServerEngineFactory.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/65b0f60d/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
 
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
index 4e0d91e..bd468a6 100644
--- 
a/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
+++ 
b/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineFactory.java
@@ -338,8 +338,11 @@ public class JettyHTTPServerEngineFactory {
                 
                 mBeanContainer = (Container.Listener) cls.
                     getConstructor(MBeanServer.class).newInstance(mbs);
-                
-                cls.getMethod("start", (Class<?>[]) 
null).invoke(mBeanContainer, (Object[]) null);
+                try {
+                    cls.getMethod("start", (Class<?>[]) 
null).invoke(mBeanContainer, (Object[]) null);
+                } catch (NoSuchMethodException mex) {
+                    //ignore, Jetty 9.1 removed this methods and it's not 
needed anymore
+                }
             } catch (Throwable ex) {
                 //ignore - just won't instrument jetty.  Probably don't have 
the
                 //jetty-management jar available

Reply via email to