Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332200 - Eliminate expected exceptions from log while using org.eclipse.jetty.jmx bundle in Apache Felix
Summary: Eliminate expected exceptions from log while using org.eclipse.jetty.jmx bund...
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.1.x   Edit
Assignee: Michael Gorovoy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 04:58 EST by Martin CLA
Modified: 2011-06-23 17:54 EDT (History)
3 users (show)

See Also:


Attachments
patch with the fix (629 bytes, patch)
2011-03-02 11:20 EST, Martin CLA
no flags Details | Diff
Modified patch (1.34 KB, patch)
2011-03-14 17:19 EDT, Michael Gorovoy CLA
no flags Details | Diff
Updated patch (690 bytes, patch)
2011-03-14 17:38 EDT, Michael Gorovoy CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin CLA 2010-12-09 04:58:45 EST
Build Identifier: 7.2.0.v20101020

org.eclipse.jetty.jmx bundle tries to load various non-existing classes like:
org.eclipse.jetty.server.handler.jmx.ScopedHandlerMBean
org.eclipse.jetty.server.session.jmx.SessionHandlerMBean
org.eclipse.jetty.servlet.jmx.ServletContextHandlerMBean
org.eclipse.jetty.util.component.jmx.AbstractLifeCycleMBean
...

When running on latest Apache Felix, it prints stacktraces to the console.

See also: http://www.mail-archive.com/users@felix.apache.org/msg08593.html

Reproducible: Always

Steps to Reproduce:
Use OSGi and this code with latest Apache Felix:

Server server = new Server();
...
Thread.currentThread().setContextClassLoader(MBeanContainer.class.getClassLoader()); // for JMX
server.getContainer().addEventListener(mBeanContainer);
mBeanContainer.start();
server.start();

Then watch logs/console.
Comment 1 Martin CLA 2011-02-22 07:14:33 EST
How is the progress?
Comment 2 Martin CLA 2011-03-02 11:20:17 EST
Created attachment 190177 [details]
patch with the fix

attached patch against jetty 7.3.0

The problem is that Apache Felix adds more details to ClassNotFoundException message. Example:

org.eclispe.jetty.jmx.JettyConnectorMBean not found by org.eclipse.jetty.jmx [41]
Comment 3 Michael Gorovoy CLA 2011-03-14 17:15:11 EDT
Martin,

Thank you very much for your patch. I've modified it a little bit, and need to test it to make sure everything is working correctly. It will be applied to the codebase shortly.

Thanks,
Michael
Comment 4 Michael Gorovoy CLA 2011-03-14 17:19:18 EDT
Created attachment 191172 [details]
Modified patch
Comment 5 Michael Gorovoy CLA 2011-03-14 17:38:41 EDT
Created attachment 191173 [details]
Updated patch
Comment 6 Michael Gorovoy CLA 2011-06-23 17:54:24 EDT
I've committed the latest patch that I've posted. Please re-open this issue if this fix doesn't work for you.

Committed r3416.