Ok,

so looks like you infected your boot-classloader which is used by felix
with classes already present.
Anyway I'd always make sure that both are seperated, therefore I'd use a
ProcessBuilder to start the felix + addons. Maybe use a bnd-tools
self-contained jar for that?

Regarding the outer classpath, make sure you have felix started in a way
it's not exporting everything as bootloader to the other bundles.

regards, Achim

2016-11-04 13:02 GMT+01:00 Benson Margulies <[email protected]>:

> On Fri, Nov 4, 2016 at 7:47 AM, 'Achim Nierbeck' via OPS4J
> <[email protected]> wrote:
> > Hi,
> >
> > as I'm still puzzled by what your are trying to achieve.
> > Are you trying to have a Servlet-Bridge?
> > In that case we still have a wip-branch[1] for that. It could need some
> > love,
> > but maybe that part will already help you?
> >
>
> I have a service inside the OSGi container, which, when asked nicely,
> makes HTTP connections to another REST-ful service elsewhere.
>
> I want to test this service. So, I need to start up an ephemeral service.
>
> Thus the following idea, in a plain old Junit test:
>
> 1: launch the test service using the CXF API; no OSGi involved.
> 2: launch the OSGi container
> 3: poke the service of the OSGi container that talks to the test service
> 4: observe success
> 5: go home
>
> However, as soon as a stick the CXF jars into the classpath of the
> test (next to Felix itself), I get the problem I've reported here, in
> which Jetty tries to find an mbean using the wrong class loader.
>
> If I launch the test service in another JVM somewhere, everything is
> fine, which is what I'm actually doing now. I just wish I could figure
> out _why_ changing the 'outer' classpath has this effect.
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OPS4J" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to