1

This is an odd situation for me. We have a large project using OSGI and I'm modifying one of the bundles. Most of the changes work fine, except that when I try to update one part of the code to read some XML the bundle refuses to load. I get an error message stating that my bundle is missing a constraint for jogl version 0.0.0. My Bundle does not directly use JOGL, although a bundle it's dependent on does use JOG. We have a jogl_1.1.1 bundle installed which is sufficient to load all the other JOGL dependent bundles;

By commenting out parts of the code and testing I've discovered that I can import all of the appropriate classes, but the moment I try to use DocumentBuilderFactory to parse the XML I get the complaint about missing a JOGL bundle. This occurs even if I add the DocumentBuilderFactory into a method that is never called; and occurs despite my ensuring the XML-APIS jar is in the class path.

I'm at a complete lost for how XML parsing could be connected to JOGL. Is a bundle version of 0.0.0 even valid? I don't know where to go from here, so any suggestion as to the cause of this behavior or what I could try to address it is appreciated.

Thanks

drew
  • 577
  • 2
  • 8
  • 20
  • 1
    Does the error manifest itself as an Import Violation on bundle load or a ClassNotFoundException later on? – Ryan Gross Jul 03 '11 at 19:11
  • Please be more specific... "complaint about a missing bundle" doesn't help work out who complains and for what reason. Please paste a copy of the actual error message. – Neil Bartlett Jul 04 '11 at 08:32

1 Answers1

0

Like the comment mentioned, it would be helpful to know if you're trying to import it or if you get a ClassNotFound.

If you're trying to import it and it fails, maybe BND is getting a little bit confused when it analyses your code. If that's the case, I would recommend declaring your imports explicitly in your manifest. (At the very least as a temporary fix to try to learn more about the problem).

If it's a ClassNotFound, that's very strange. I noticed that JOGL uses DocumentBuilderFactory. I'm starting to get into wild-guess-land, but it's possible that JOGL is doing something bad to load/implement DocumentBuilderFactory and it's causing problems across multiple bundles.

As a final though, have you tried just making a dummy bundle that has one class the calls DocumentBuilderFactory to see if that has the same problem?

Jon7
  • 7,165
  • 2
  • 33
  • 39