question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OSGi compatibility + SVGProviderInfo classloader lookup

See original GitHub issue

Although TwelveMonkey is not OSGi-ready, it is relatively easy to port it to OSGi by SPI-fying it using an approach similar to what demonstrated in: https://github.com/Maurice-Betzel/twelvemonkeys-osgi.

However, the call to isClassAvailable on https://github.com/haraldk/TwelveMonkeys/blob/633e5cc6a2c0637e508ab334b629b24470071724/imageio/imageio-batik/src/main/java/com/twelvemonkeys/imageio/plugins/svg/SVGProviderInfo.java#L42 prevents OSGi from finding SVG reader (as it returns false). Removing line 42 makes SVG reader available and SVG parsing works fine.

So, is this classloader lookup absolutely necessary, if not could it be removed in a future version?

Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NMichascommented, Feb 9, 2018

Hi Harald, didn’t know GitHub could detect a comment in another project’s commit and cross-post back to the original project/issue being mentioned 😃 The patch was for our own project in which we needed a solution immediately, I understand it’s not a solution in general for TM.

I still intend to test your proposal, it sounds like it could solve the problem. Give me a couple of days and I’ll get back to this.

0reactions
haraldkcommented, Mar 7, 2018

Implemented. Feel free to reopen the case, should you test and find it does not solve the issue.

– Harald K

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unraveling Java and OSGi class loader problems
Learn how to address common Java and OSGi class loader problems in CICS OSGi and Liberty ... Keep that parent-first search pattern in...
Read more >
OSGi Classloading - Mine of Information
The OSGi approach does a little more work when loading a bundle, but then normally resolves any needed class with a single table...
Read more >
3 Module Layer - OSGi Core 7
The key mechanism to hide and share packages is the Java class loader that loads classes from a sub-set of the bundle-space using...
Read more >
Class loader issues in OSGi | Third-party libs using the Thread ...
Solution. The way that third-party libraries load their classes is out of your control. In most cases it's fine, if the third-party library ......
Read more >
JNDI lookup from OSGI equinox bundle deployed on tomcat ...
The parent of the embedded OSGi container is ext: The Java extension class loader. To be able to see the classes of Tomcat,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found