Hi Achim,

I added bootFinished per your recommendation, but I am still getting the same 
exception. 
The interesting thing is that, right before invoking the feature:install 
command, I call the feature:list command, which generates this output:

2015-12-07 09:18:40,382 | INFO  | -192.168.200.136 | KarafTestSupport           
      | 146 - PAXEXAM-PROBE-138474ed-cff4-4652-9364-ab5d759685bf - 0.0.0 | Name 
                                   | Version          | Required | State       
| Repository                  | Description
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
framework-security                      | 4.0.3            |          | 
Uninstalled | standard-4.0.3              | OSGi Security for Karaf
service-security                        | 4.0.3            |          | 
Uninstalled | standard-4.0.3              | Services Security for Karaf
aries-proxy                             | 4.0.3            |          | Started 
    | standard-4.0.3              | Aries Proxy
aries-blueprint                         | 4.0.3            | x        | Started 
    | standard-4.0.3              | Aries Blueprint
aries-annotation                        | 4.0.3            |          | 
Uninstalled | standard-4.0.3              | Aries Annotations
feature                                 | 4.0.3            | x        | Started 
    | standard-4.0.3              | Features Support


Which shows the ‘feature’ feature as installed.   Right after this, calling 
feature:install fails with “Command not found”  exception.


Best regards,
Alex soto


> On Dec 5, 2015, at 3:39 PM, Achim Nierbeck <[email protected]> wrote:
> 
> Hi, 
> 
> most likely your test jumps in to early. 
> Did you make sure that your test "waits" for the 
> BootFinish service to appear?
> 
> @Inject
> protected BootFinished bootFinished;
> 
> regards, Achim
> 
> 
> 
> 2015-12-04 22:27 GMT+01:00 Alex Soto <[email protected] 
> <mailto:[email protected]>>:
> When running integration tests with Pax-Exam, trying to install any feature 
> fails with the exception below.
> It works from the interactive console.  Other feature commands, like 
> “feature:list” work fine, only “feature:install” fails.
> 
> Example:
> 
> feature:install spring
> 
> org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found: 
> feature:install
>       at 
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredSessionFactoryImpl.checkSecurity(SecuredSessionFactoryImpl.java:116)
>       at 
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:66)
>       at 
> org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)
>       at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)
>       at 
> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)
>       at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)
>       at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)
>       at 
> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
>       at 
> org.apache.karaf.shell.impl.console.HeadlessSessionImpl.execute(HeadlessSessionImpl.java:90)
> 
> Any idea what may be causing this?
> 
> Best regards,
> Alex Soto
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer 
> & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ 
> <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS 
> <http://bit.ly/1ps9rkS>>
> 
> Software Architect / Project Manager / Scrum Master 
> 

Reply via email to