I'm using Karaf 3.0.1 and Pax Exam 3.5.0. I tried using these commands in
my test:

bundle:install -s -f mvn:<gId>/<aId>/<v> (two times with different bundles)
bundle:uninstall -f <bundleId>

I configured CommandSession without any option. I am still getting the
exception after calling the install command:

bundle:install -s -f mvn:<gId>/<aId>/<v>
java.lang.SecurityException: Insufficient credentials.
...

What is my mistake?

Thank you.

PD: I'm Julio, not Julian ;)


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


On 28 May 2014 14:01, Jean-Baptiste Onofré <[email protected]> wrote:

> Hi Julian,
>
> I guess that you use Karaf 3.0.0, right ?
>
> What's the command that you want to do (maybe bundle:* -f may help) ?
>
> You don't have to provide any use as it uses the default one (karaf), like
> when you run karaf bin bin/karaf.
>
> Regards
> JB
>
>
> On 05/28/2014 01:14 PM, Julio Carlos Barrera Juez wrote:
>
>> 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
>>     <http://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 <http://dana.i2cat.net/>
>>
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Reply via email to