Re: About JRuby and OSGi

— Den lør 22/5/10 skrev Yoko H. [email protected]:
Fra: Yoko H. [email protected]
Emne: Re: [jruby-user] About JRuby and OSGi
Til: [email protected]
Dato: lørdag 22. maj 2010 17.39

This is exactly the same bug filed, http://jira.codehaus.org/browse
/JRUBY-4798. Not like embed core, there’s no workaround for JSR223
impl. So, maybe, we need JRuby 1.5.1?

Yes, I think so.

Yes, classloader problem is the real cause of this issue. I mean
setting null to context class loader to get things work should not be
needed.

It is even worse. Context classloaders must be ignored completely or all
kinds of bad things may happen. I made a blog entry about this
http://techblog.41concepts.com/2010/05/21/3-small-steps-for-non-osgi-developers-that-want-to-stay-osgi-compatible/

NB: A quick search shows 5 places that uses the context classloader. So
the jsr233 api is just the first place I ran into a fatal error as
result.

Have you
looked at http://jira.codehaus.org/browse/JRUBY-4774 that Paul mention
in JRUBY-4798? I want to figure out why OSGi and some other platforms
that use custom classloader doesn’t work without such workaround.

The correct way to fix this is to use the classloader of any class
inside the JRuby jar to load properties and anything else (see my blog
posting about this).

P.S. Also, I did try the RC but not with OSGI. Only now did I try OSGI
and jruby. Sorry.

/Morten


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email