Hello.

I'm creating a Pax Exam test and I want to install a bundle in an specific
moment of the test. I'm using a CommandSession to use bundle:install
command. I get more or less all the stuff working, but I'm getting
"java.lang.SecurityException: Insufficient credentials".

My CommandSession is obtained locally (without getting explicitly the OSGi
service with:

final CommandSession commandSession =
commandProcessor.createSession(System.in, printStream, System.err);


as I saw in many examples. What I need to do to inject credentials in this
session. I've found many non-working solutions like:

commandSession.put("APPLICATION", System.getProperty("karaf.name", "root"));

commandSession.put("USER", "karaf");

Thank you!


Julio C. Barrera Juez
Office phone: +34 93 357 99 27
Distributed Applications and Networks Area (DANA)
i2CAT Foundation, Barcelona, Spain
http://dana.i2cat.net

Reply via email to