Login  Register

Re: OSGi with Bndtools and Apache Felix throws exception

Posted by sneakpaw on Mar 26, 2013; 8:10am
URL: https://forum.jogamp.org/OSGi-with-Bndtools-and-Apache-Felix-throws-exception-tp4028765p4028821.html

This thing kept bothering me, so I kept trying.

Apparently Felix couldn't find the OGLUtilities even if it was within the build path (and class). Apparently JOGL uses a Class.forName(...) to get the class, which is not recommended practice for OSGI. Interestingly while trying to access the same class (also with Class.forName(...)) from within the bundle itself (actually from the test-bundle), I got the class just fine... and apparently the subsequent call within JOGL also succeeds then... I consider that a temporary workaround, not a fix.
While writing this post, I noticed another interesting point. When I removed my own Class.forName(...) again, JOGLs own Class.forName(...) still finds it. I'm a bit confused, because I didn't change anything else (except for rebuilding and stepping through the stack a few times).

But for now, it helps me to get to the next Exception... which is again the ArrayIndexOutOfBoundsException while trying to chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:169)

I sifted to the log, but it is just very massive if you don't know what you're looking for.

So I kindly request, that you take a look at it again.
ArrayIndexOutOfBoundsException-with-osgi-felix-and-awt-2013-03-26-0844.txt