Bug 561827 - Server side plugin classloaders do not honor META-INF/service/*
Summary: Server side plugin classloaders do not honor META-INF/service/*
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: RHQ Project
Classification: Other
Component: Core Server
Version: 1.4
Hardware: All
OS: All
low
high
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-04 13:20 UTC by Heiko W. Rupp
Modified: 2014-05-27 18:34 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-27 18:34:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Heiko W. Rupp 2010-02-04 13:20:20 UTC
Packages like RESTEasy or jruby-complete.jar (JSR-223 support) rely on classloaders reading files in META-INF/services/ and instantiating classes from there. 

E.g. RESTEasy uses it to find a concrete implementation of com.sun.ws.rs.ext.RuntimeDelegateImpl

----------- /im/rhq/modules/enterprise/server/plugins/alert-sms/src/main/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate ---
org.jboss.resteasy.spi.ResteasyProviderFactory
----------------------------------------------------

Unfortunately it looks like this file is never consulted, which ends up in 

14:07:50,064 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: com.sun.ws.rs.ext.RuntimeDelegateImpl


So users that want to use RESTeasy in their alert-plugin will not be able to use it.

In the above example, I copied the file to $plugin-jar/META-INF/lib, but optimally it should be obtained from $plugin-jar/lib/resteasy-jaxrs.jar   or in the jruby case from $plugin-jar/lib/jruby-complete.jar

Comment 1 Heiko W. Rupp 2010-02-04 15:05:17 UTC
In both cases, copying the jruby jar or the resteasy jars to jbossas/server/default/lib fixes the issue (for resteasy at least the one listed here).

For jruby-complete putting into server/default/lib it completely fixes it.

Comment 2 John Mazzitelli 2010-09-30 14:22:46 UTC
this would involve non-trivial amount of work. to fix, we'd have to put it on the dev plan to block out some time to do it. Needs at least a few days of work (just a guess).

Comment 3 Jay Shaughnessy 2014-05-27 18:34:51 UTC
Never given priority. closing.


Note You need to log in before you can comment on or make changes to this bug.