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
OClassLoaderHelper uses javax.imageio.spi.ServiceRegistry #3402
Comments
yes, i also wondered a few times why was imageio there, i'll change this with (java.util.ServiceLoader)[https://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html] after we released 2.0 final. the reason for not do it now is that we don't want to mess up 2 days before release, and this may impact some osgi environment. |
FYI, using imageio impl may actually prevent proper usage in osgi: FTR we are also having some issues already in Apache Karaf with OrientDB failing to find function factories, unsure if its related, but gut suggests it may be. |
@tglman WDYT? |
FTR I can't say if changing to the java.util.ServiceLoader will actually resolve this yet. I may run some local tests, as it may still be problematic due to how the classloader is selected by consumers of OClassLoaderHelper. Will let you guys know what we find. |
Update: I just tested switching to java.util.ServiceLoader and by itself, it doesn't change the behavior for the issue we're seeing (karaf still can't find OGraphFunctionFactory, so graph functions show up as missing when you try to use them in select statements). |
thanks @cwilper, we'll have to dig a bit more to see if there is an issue with how we have the CL setup or if its a more fundamental issue of how orient is loading these based on the loading with specific CL |
Thanks guys, we really appreciate your work on this. |
FYI, a quick solution to this is to make the graphdb bundle a fragment of the core bundle:
This will merge their contents at runtime in OSGi so that they effectively share the same classpath and should therefore make the graph functions visible. |
I'm not an OSGi expert. Everybody agrees on this change? |
fixed closing |
Seems odd that its depending on javax.imageio libraries here.
Suggest you guys change to use java.util.ServiceLocator instead, which IIUC is essentially the same thing you need here.
The text was updated successfully, but these errors were encountered: