Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class loading problem under OSGi #135

Closed
PatrickGotthard opened this issue Sep 30, 2013 · 2 comments
Closed

class loading problem under OSGi #135

PatrickGotthard opened this issue Sep 30, 2013 · 2 comments
Milestone

Comments

@PatrickGotthard
Copy link
Member

=== This issue was migrated from JIRA ===
Type: Bug
Priority: Major
Status: Open
Resolution: UNRESOLVED
Reported by: seli
Assigned to: ROME Jira Lead
Created: Tue Sep 08 10:16:35 CEST 2009
Updated: Tue Sep 08 10:16:35 CEST 2009
Resolved: Tue Sep 08 10:16:35 CEST 2009
Version: current
Fix version: milestone 1
JIRA Link: https://rometools.jira.com/browse/ROME-134
=========================================

I'm not sure whether to call this a defect or a patch. I'd just like to make you
aware of a blog post (given as URL above) that solved a problem I had when
integrating ROME into Day Communiqué 5, a web content management system based on
Apache Sling (and thus using OSGi bundles to deploy libraries). That blog post
explains that in an OSGi context, using
Thread.currentThread().getContextClassLoader() leads to the wrong class loader.
I followed the advice given there and changed all occurrences of that expression
to this.getClass().getClassLoader() (or

{Classname}

.class.getClassLoader() in
static contexts) in the ROME source, and this solved my problems. I'm not
familiar enough with class loading issues to say whether this is the right
approach both within and outside of OSGi, just wanted to let you developers know
and leave the issue for you to ponder.

@imk
Copy link
Contributor

imk commented Oct 7, 2013

That should be adressed when refactoring rome2 api, see #173.

@PatrickGotthard PatrickGotthard modified the milestones: Version 1.5.0, Version 2.0.0 Feb 20, 2016
@PatrickGotthard
Copy link
Member Author

This should have been fixed in version 1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants