felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Chad.Da...@emc.com>
Subject troubleshooting help for newbie
Date Fri, 04 May 2012 13:48:28 GMT
Hello felix people.  I think I'll be spending a lot of time here as I've inherited a "troublesome"
osgi app. I'm both new to the app and new to osgi.  I do, however, understand the architecture
of the app pretty well, and I do understand the general landscape of osgi.  It may be that
I don't' have enough info here, but if you can suggest troubleshooting direction, I'd appreciate
it.

I'm getting a runtime error, thrown from a sequence of code that starts from one bundle's
activator.  I get a ClassCastException on a hibernate library class that says, basically that
object of Class A can't be cast to Class A.  In other words, I'm getting a ClassCastException
trying to cast the exact same type to itself.  I believe that this means two different classloaders
have loaded this class, correct?

I assume this situation arises from the quirkiness of my app's osgi configuration.  Here's
what I know.


1)      The bundle whose activator is executing does not import or embed the hibernate class
in question

2)      A bundle whose code is hit on the way to the hibernate call, does embed the hibernate
class.

3)      Nothing else so far. . . .

Thoughts?  My suspicion is that the embedding of the hibernate in the one bundle causes it
to be loaded into one classloader, and then somewhere in my runtime hibernate is loaded into
another class loader.

Also, this felix container is embedded in another application.  Do the classes and classloaders
of that primary application have any bearing on the osgi runtime?  There are some libraries
bootstrapped into the system bundle when the osgi container is created, but other than that
is there any connection between the primary app and the osgi runtime?

Thanks for answering nebulous questions . . .


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message