开发者

Bundle gains unexplained requirement to different bundle when try to read XML

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


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜