Re: RepositoryAdmin ClassCastException

2014-08-07 Thread Tim McIver
of it. >> Hope this makes you understand how this stuff works. I had to read OSGi in >> Action (for the low-level details) and also Enterprise OSGi in Action (for >> the real-world usage) to get my head around OSGi, and now I understand it (I >> hope!), and I love it...

Re: RepositoryAdmin ClassCastException

2014-08-07 Thread Neil Bartlett
gt; people and start hating it because you just couldn't get it. > > Regards, > Renato > >> Date: Wed, 6 Aug 2014 11:58:52 -0400 >> From: tmci...@verizon.net >> To: users@felix.apache.org >> Subject: Re: RepositoryAdmin ClassCastExce

RE: RepositoryAdmin ClassCastException

2014-08-07 Thread Paulo Renato de Athaydes
able to import it as a Service in another bundle. Does this make sense? Renato > Date: Wed, 6 Aug 2014 23:23:07 -0400 > From: tmci...@verizon.net > To: users@felix.apache.org > Subject: Re: RepositoryAdmin ClassCastException > > Renato, > > Thanks for the response. You

Re: RepositoryAdmin ClassCastException

2014-08-06 Thread Tim McIver
u will go down the same path as most > people and start hating it because you just couldn't get it. > > Regards, > Renato > >> Date: Wed, 6 Aug 2014 11:58:52 -0400 >> From: tmci...@verizon.net >> To: users@felix.apache.org >> Subject: Re: RepositoryAdmin Cla

RE: RepositoryAdmin ClassCastException

2014-08-06 Thread Paulo Renato de Athaydes
u just couldn't get it. Regards, Renato > Date: Wed, 6 Aug 2014 11:58:52 -0400 > From: tmci...@verizon.net > To: users@felix.apache.org > Subject: Re: RepositoryAdmin ClassCastException > > Neil, > > Thanks for your reply. Here are the OSGi/Felix -related import

Re: RepositoryAdmin ClassCastException

2014-08-06 Thread Tim McIver
Neil, Thanks for your reply. Here are the OSGi/Felix -related imports I have in the class that contains the code that I included in the original email (below): import org.apache.felix.bundlerepository.Resource; import org.apache.felix.framework.Felix; import org.apache.felix.framework.util.Felix

Re: RepositoryAdmin ClassCastException

2014-08-06 Thread Tim McIver
David, Thanks for the reply. I figured it had to do with Class loaders but I'm at a loss as to how this is happening; I don't know a lot about class loaders. Here's some more detail on my situation: as I said we're using Felix in an embedded fashion; we instantiate a Felix object and start it fr

Re: RepositoryAdmin ClassCastException

2014-08-06 Thread Neil Bartlett
Tim, you don’t really need to know anything about classloaders! The important part from David’s email was the second paragraph. Make sure you import the same package that the provider of the service uses, and you will be okay. By the way, how did you open your ServiceTracker? Did you call open(t

Re: RepositoryAdmin ClassCastException

2014-08-06 Thread David Bosschaert
Hi Tim, > java.lang.ClassCastException: > org.apache.felix.bundlerepository.impl.RepositoryAdminImpl cannot be > cast to org.apache.felix.bundlerepository.RepositoryAdmin This happens when the RepositoryAdmin interface is loaded from a different classloader than where the RepositoryAdminImpl load