Re: Followup on getting felix scr commands to show up in karaf

2011-07-08 Thread mikevan
I'd like us to re-address this issue with getting scr commands being useful
in Karaf.  I've tested them on the trunk, and after installing the latest
version of SCR on Karaf-trunk, there isn't access to any of the scr
commands. I'll be researching this over the weekend, but any pointers you
can give me would be helpful.

Previously in this thread there was the idea of some sort of bridge being
developed that would allow Karaf console usage of the scr commands. Could
someone shed more light on what this actually means? Are we talking about
creating a new set of scr shell commands and then installing them as part of
a felix-scr feature?


Guillaume Nodet wrote:
 
 That's the expected behavior.  Command themselves work but not completion.
 
 On Sun, Mar 20, 2011 at 02:35, Christoper Blunck
 lt;ch...@thebluncks.comgt; wrote:
 Hi Guillaume-
 Thanks for giving me some troubleshooting techniques.  I ran the osgi:ls
 command and here is a snippit of the output:
 Apache Felix Declarative Services (41) provides:
 
 org.osgi.service.cm.ConfigurationListener
 org.apache.felix.scr.ScrService
 org.osgi.service.cm.ManagedService
 org.apache.felix.scr.impl.ScrGogoCommand
 That last line suggests to me that the command itself has been
 registered.
 Interestingly enough scr list fails but scr:list succeeds:
 karaf@root scr list
 Command not found: scr
 karaf@root scr:list
 No components registered

 When I do a tab-tab at the karaf@root prompt I see a bunch of commands
 I
 can execute (which is expected).  However, scr:list is not in that list.
  Here are the commands starting with s that are available to me:
  set                              shell:cat
 shell:clear                      shell:each                      
 shell:echo

 shell:exec                       shell:grep                      
 shell:head

 shell:history                    shell:if                        
 shell:info

 shell:java                       shell:logout                    
 shell:more

 shell:new                        shell:printf
 shell:sleep
 shell:sort                       shell:tac                      
  shell:tail

 show-tree                        shutdown                         sleep

 sort                             ssh                              ssh:ssh

 ssh:sshd                         sshd                             start

 start-level                      stop

 I am really in over my head wrt gogo and the rest of the shell framework
 stuff so I'm not quite sure what to do next.
 Do you have some ideas of what is going on?
 I'd be happy to help you troubleshoot some more but I don't know how much
 more valuable I'd be at this point...
 Thanks again for your time - I do appreciate it.


 -c

 On Sat, Mar 19, 2011 at 3:50 PM, Guillaume Nodet lt;gno...@gmail.comgt;
 wrote:

 As you noticed, scr 1.6.0 use the old felix shell which is different
 from gogo, so that won't work unless there's a bridge somewhere.
 For scr trunk, not sure why it doesn't work.  Can you first check if
 the command is actually registered in the registry using the osgi:ls
 karaf command  ?
 If the command is registered but isn't available, that's a bug in
 Karaf console.  If the command isn't registered, a suspect an
 exception to be thrown in the ScrCommand#register() method.

 On Sat, Mar 19, 2011 at 14:56, Christoper Blunck
 lt;ch...@thebluncks.comgt;
 wrote:
  Hmmm...   I don't believe I'm trying to use a karaf feature on top of
 a
  gogo
  command.
  I'm just trying to run the scr:list command without using tab
 completion
  or
  anything.
  Steps to reproduce:
  1.) Download and untar:
 
 
  http://www.apache.org/dyn/closer.cgi/karaf/2.2.0/apache-karaf-2.2.0.tar.gz
  2.) Start up karaf bin running cd bin; ./karaf
  3.) Download into the deploy directory:
 
 
  http://www.gossipcheck.com/mirrors/apache//felix/org.apache.felix.scr-1.6.0.jar
  4.) type scr:list or scr list at the prompt.  You'll get command
 not
  found.
  A couple of things I've noticed...
  Here's the source code for the bundle activator for SCR in version
  1.6.0:
 
 
   http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.6.0/src/main/java/org/apache/felix/scr/impl/Activator.java
  Note that in the start() method there's a try-catch around the part
  where
  the ScrCommand is registered.  I added a debug statement to the catch
  section and found out that there was a NoClassDefFoundError
  on org.apache.felix.shell.Command  when the code was trying to
 register
  the
  ScrCommand.  I downloaded org.apache.felix.shll.command 1.4.2 and put
 it
  my
  deploy directory.  That made the NoClassDefFoundError go away but it
  still
  did not make the scr list command work.  I still got a command not
  found.
  Also ... It appears the trunk of SCR has been updated to work with
 gogo:
 
 
 http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
  The start() method looks 

Re: Followup on getting felix scr commands to show up in karaf

2011-03-21 Thread Guillaume Nodet
That's the expected behavior.  Command themselves work but not completion.

On Sun, Mar 20, 2011 at 02:35, Christoper Blunck ch...@thebluncks.com wrote:
 Hi Guillaume-
 Thanks for giving me some troubleshooting techniques.  I ran the osgi:ls
 command and here is a snippit of the output:
 Apache Felix Declarative Services (41) provides:
 
 org.osgi.service.cm.ConfigurationListener
 org.apache.felix.scr.ScrService
 org.osgi.service.cm.ManagedService
 org.apache.felix.scr.impl.ScrGogoCommand
 That last line suggests to me that the command itself has been registered.
 Interestingly enough scr list fails but scr:list succeeds:
 karaf@root scr list
 Command not found: scr
 karaf@root scr:list
 No components registered

 When I do a tab-tab at the karaf@root prompt I see a bunch of commands I
 can execute (which is expected).  However, scr:list is not in that list.
  Here are the commands starting with s that are available to me:
  set                              shell:cat
 shell:clear                      shell:each                       shell:echo

 shell:exec                       shell:grep                       shell:head

 shell:history                    shell:if                         shell:info

 shell:java                       shell:logout                     shell:more

 shell:new                        shell:printf
 shell:sleep
 shell:sort                       shell:tac                        shell:tail

 show-tree                        shutdown                         sleep

 sort                             ssh                              ssh:ssh

 ssh:sshd                         sshd                             start

 start-level                      stop

 I am really in over my head wrt gogo and the rest of the shell framework
 stuff so I'm not quite sure what to do next.
 Do you have some ideas of what is going on?
 I'd be happy to help you troubleshoot some more but I don't know how much
 more valuable I'd be at this point...
 Thanks again for your time - I do appreciate it.


 -c

 On Sat, Mar 19, 2011 at 3:50 PM, Guillaume Nodet gno...@gmail.com wrote:

 As you noticed, scr 1.6.0 use the old felix shell which is different
 from gogo, so that won't work unless there's a bridge somewhere.
 For scr trunk, not sure why it doesn't work.  Can you first check if
 the command is actually registered in the registry using the osgi:ls
 karaf command  ?
 If the command is registered but isn't available, that's a bug in
 Karaf console.  If the command isn't registered, a suspect an
 exception to be thrown in the ScrCommand#register() method.

 On Sat, Mar 19, 2011 at 14:56, Christoper Blunck ch...@thebluncks.com
 wrote:
  Hmmm...   I don't believe I'm trying to use a karaf feature on top of a
  gogo
  command.
  I'm just trying to run the scr:list command without using tab completion
  or
  anything.
  Steps to reproduce:
  1.) Download and untar:
 
   http://www.apache.org/dyn/closer.cgi/karaf/2.2.0/apache-karaf-2.2.0.tar.gz
  2.) Start up karaf bin running cd bin; ./karaf
  3.) Download into the deploy directory:
 
   http://www.gossipcheck.com/mirrors/apache//felix/org.apache.felix.scr-1.6.0.jar
  4.) type scr:list or scr list at the prompt.  You'll get command not
  found.
  A couple of things I've noticed...
  Here's the source code for the bundle activator for SCR in version
  1.6.0:
 
    http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.6.0/src/main/java/org/apache/felix/scr/impl/Activator.java
  Note that in the start() method there's a try-catch around the part
  where
  the ScrCommand is registered.  I added a debug statement to the catch
  section and found out that there was a NoClassDefFoundError
  on org.apache.felix.shell.Command  when the code was trying to register
  the
  ScrCommand.  I downloaded org.apache.felix.shll.command 1.4.2 and put it
  my
  deploy directory.  That made the NoClassDefFoundError go away but it
  still
  did not make the scr list command work.  I still got a command not
  found.
  Also ... It appears the trunk of SCR has been updated to work with gogo:
 
  http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
  The start() method looks different and the comment suggests it now works
  with gogo.
  I pulled the trunk and compiled it.  I then tried to run karaf with
  org.apache.felix.scr-1.6.1-SNAPSHOT.  DS started but I still didn't have
  my
  scr list command.
  Any ideas?
 
  -c
 
  On Sat, Mar 19, 2011 at 3:59 AM, Guillaume Nodet gno...@gmail.com
  wrote:
 
  Let's be clear about that.  There's no reason why the scr or any gogo
  commands would not work in karaf.
  What does not work is karaf features on top of gogo such as completion
  (both command and parameter).
  If that's not the case, this should clearly be fixed asap.
 
  On Sat, Mar 19, 2011 at 02:33, Christoper Blunck ch...@thebluncks.com
  wrote:
   Hello all,
   Over in 

Re: Followup on getting felix scr commands to show up in karaf

2011-03-19 Thread Christoper Blunck
Hmmm...   I don't believe I'm trying to use a karaf feature on top of a gogo
command.

I'm just trying to run the scr:list command without using tab completion or
anything.

Steps to reproduce:

1.) Download and untar:
http://www.apache.org/dyn/closer.cgi/karaf/2.2.0/apache-karaf-2.2.0.tar.gz
2.) Start up karaf bin running cd bin; ./karaf
3.) Download into the deploy directory:
http://www.gossipcheck.com/mirrors/apache//felix/org.apache.felix.scr-1.6.0.jar
4.) type scr:list or scr list at the prompt.  You'll get command not
found.

A couple of things I've noticed...

Here's the source code for the bundle activator for SCR in version 1.6.0:

http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.6.0/src/main/java/org/apache/felix/scr/impl/Activator.java

Note that in the start() method there's a try-catch around the part where
the ScrCommand is registered.  I added a debug statement to the catch
section and found out that there was a NoClassDefFoundError on
org.apache.felix.shell.Command
 when the code was trying to register the ScrCommand.  I downloaded
org.apache.felix.shll.command 1.4.2 and put it my deploy directory.  That
made the NoClassDefFoundError go away but it still did not make the scr
list command work.  I still got a command not found.

Also ... It appears the trunk of SCR has been updated to work with gogo:
http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/Activator.java

The start() method looks different and the comment suggests it now works
with gogo.

I pulled the trunk and compiled it.  I then tried to run karaf with
org.apache.felix.scr-1.6.1-SNAPSHOT.  DS started but I still didn't have my
scr list command.

Any ideas?


-c

On Sat, Mar 19, 2011 at 3:59 AM, Guillaume Nodet gno...@gmail.com wrote:

 Let's be clear about that.  There's no reason why the scr or any gogo
 commands would not work in karaf.
 What does not work is karaf features on top of gogo such as completion
 (both command and parameter).
 If that's not the case, this should clearly be fixed asap.

 On Sat, Mar 19, 2011 at 02:33, Christoper Blunck ch...@thebluncks.com
 wrote:
  Hello all,
  Over in this thread the gogo'ness of SCR is discussed:
 
 http://karaf.922171.n3.nabble.com/getting-felix-scr-commands-to-show-up-in-karaf-td2257486.html
  I'm stuck in the same problem where my SCR bundle loads and all my
 services
  are properly satisfied and injected but the scr command itself is not
  available.
  Guillame you remarked:
  Actually, I've just made some tests and the commands are functional even
  if they don't appear in the tab completion
  I was hoping you could elaborate a little more about this.  Are you
 saying
  that you were able to get to the scr command in the karaf prompt?  Or
 were
  you simply remarking that scr worked wrt injection and that the commands
  just weren't functional?
  I recognize that this ticket is still out there:
   https://issues.apache.org/jira/browse/KARAF-397
  And I see the priority is MAJOR.  Question to the devs:  is this
 something
  you expect will be fixed soon?
  I want to go to Karaf 2.2.0 but the lack of a scr command is going to
 give
  my developers a lot of heartache
 
  Thanks for your time,
 
  -c
 
  --
  Christopher Blunck
  ch...@thebluncks.com
 
 



 --
 Cheers,
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 Open Source SOA
 http://fusesource.com




-- 
Christopher Blunck
ch...@thebluncks.com


Re: Followup on getting felix scr commands to show up in karaf

2011-03-19 Thread Guillaume Nodet
As you noticed, scr 1.6.0 use the old felix shell which is different
from gogo, so that won't work unless there's a bridge somewhere.
For scr trunk, not sure why it doesn't work.  Can you first check if
the command is actually registered in the registry using the osgi:ls
karaf command  ?
If the command is registered but isn't available, that's a bug in
Karaf console.  If the command isn't registered, a suspect an
exception to be thrown in the ScrCommand#register() method.

On Sat, Mar 19, 2011 at 14:56, Christoper Blunck ch...@thebluncks.com wrote:
 Hmmm...   I don't believe I'm trying to use a karaf feature on top of a gogo
 command.
 I'm just trying to run the scr:list command without using tab completion or
 anything.
 Steps to reproduce:
 1.) Download and untar:
  http://www.apache.org/dyn/closer.cgi/karaf/2.2.0/apache-karaf-2.2.0.tar.gz
 2.) Start up karaf bin running cd bin; ./karaf
 3.) Download into the deploy directory:
  http://www.gossipcheck.com/mirrors/apache//felix/org.apache.felix.scr-1.6.0.jar
 4.) type scr:list or scr list at the prompt.  You'll get command not
 found.
 A couple of things I've noticed...
 Here's the source code for the bundle activator for SCR in version 1.6.0:
   http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.6.0/src/main/java/org/apache/felix/scr/impl/Activator.java
 Note that in the start() method there's a try-catch around the part where
 the ScrCommand is registered.  I added a debug statement to the catch
 section and found out that there was a NoClassDefFoundError
 on org.apache.felix.shell.Command  when the code was trying to register the
 ScrCommand.  I downloaded org.apache.felix.shll.command 1.4.2 and put it my
 deploy directory.  That made the NoClassDefFoundError go away but it still
 did not make the scr list command work.  I still got a command not
 found.
 Also ... It appears the trunk of SCR has been updated to work with gogo:
 http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
 The start() method looks different and the comment suggests it now works
 with gogo.
 I pulled the trunk and compiled it.  I then tried to run karaf with
 org.apache.felix.scr-1.6.1-SNAPSHOT.  DS started but I still didn't have my
 scr list command.
 Any ideas?

 -c

 On Sat, Mar 19, 2011 at 3:59 AM, Guillaume Nodet gno...@gmail.com wrote:

 Let's be clear about that.  There's no reason why the scr or any gogo
 commands would not work in karaf.
 What does not work is karaf features on top of gogo such as completion
 (both command and parameter).
 If that's not the case, this should clearly be fixed asap.

 On Sat, Mar 19, 2011 at 02:33, Christoper Blunck ch...@thebluncks.com
 wrote:
  Hello all,
  Over in this thread the gogo'ness of SCR is discussed:
 
   http://karaf.922171.n3.nabble.com/getting-felix-scr-commands-to-show-up-in-karaf-td2257486.html
  I'm stuck in the same problem where my SCR bundle loads and all my
  services
  are properly satisfied and injected but the scr command itself is not
  available.
  Guillame you remarked:
  Actually, I've just made some tests and the commands are functional
  even
  if they don't appear in the tab completion
  I was hoping you could elaborate a little more about this.  Are you
  saying
  that you were able to get to the scr command in the karaf prompt?  Or
  were
  you simply remarking that scr worked wrt injection and that the commands
  just weren't functional?
  I recognize that this ticket is still out there:
   https://issues.apache.org/jira/browse/KARAF-397
  And I see the priority is MAJOR.  Question to the devs:  is this
  something
  you expect will be fixed soon?
  I want to go to Karaf 2.2.0 but the lack of a scr command is going to
  give
  my developers a lot of heartache
 
  Thanks for your time,
 
  -c
 
  --
  Christopher Blunck
  ch...@thebluncks.com
 
 



 --
 Cheers,
 Guillaume Nodet
 
 Blog: http://gnodet.blogspot.com/
 
 Open Source SOA
 http://fusesource.com



 --
 Christopher Blunck
 ch...@thebluncks.com





-- 
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/

Open Source SOA
http://fusesource.com


Re: Followup on getting felix scr commands to show up in karaf

2011-03-19 Thread Christoper Blunck
Hi Guillaume-

Thanks for giving me some troubleshooting techniques.  I ran the osgi:ls
command and here is a snippit of the output:

Apache Felix Declarative Services (41) provides:

org.osgi.service.cm.ConfigurationListener
org.apache.felix.scr.ScrService
org.osgi.service.cm.ManagedService
org.apache.felix.scr.impl.ScrGogoCommand

That last line suggests to me that the command itself has been registered.

Interestingly enough scr list fails but scr:list succeeds:

karaf@root scr list
Command not found: scr
karaf@root scr:list
No components registered


When I do a tab-tab at the karaf@root prompt I see a bunch of commands I
can execute (which is expected).  However, scr:list is not in that list.
 Here are the commands starting with s that are available to me:

 set  shell:cat
shell:clear  shell:each   shell:echo

shell:exec   shell:grep   shell:head

shell:historyshell:if shell:info

shell:java   shell:logout shell:more

shell:newshell:printf
shell:sleep
shell:sort   shell:tacshell:tail

show-treeshutdown sleep

sort ssh  ssh:ssh

ssh:sshd sshd start

start-level  stop


I am really in over my head wrt gogo and the rest of the shell framework
stuff so I'm not quite sure what to do next.

Do you have some ideas of what is going on?

I'd be happy to help you troubleshoot some more but I don't know how much
more valuable I'd be at this point...

Thanks again for your time - I do appreciate it.



-c

On Sat, Mar 19, 2011 at 3:50 PM, Guillaume Nodet gno...@gmail.com wrote:

 As you noticed, scr 1.6.0 use the old felix shell which is different
 from gogo, so that won't work unless there's a bridge somewhere.
 For scr trunk, not sure why it doesn't work.  Can you first check if
 the command is actually registered in the registry using the osgi:ls
 karaf command  ?
 If the command is registered but isn't available, that's a bug in
 Karaf console.  If the command isn't registered, a suspect an
 exception to be thrown in the ScrCommand#register() method.

 On Sat, Mar 19, 2011 at 14:56, Christoper Blunck ch...@thebluncks.com
 wrote:
  Hmmm...   I don't believe I'm trying to use a karaf feature on top of a
 gogo
  command.
  I'm just trying to run the scr:list command without using tab completion
 or
  anything.
  Steps to reproduce:
  1.) Download and untar:
 
 http://www.apache.org/dyn/closer.cgi/karaf/2.2.0/apache-karaf-2.2.0.tar.gz
  2.) Start up karaf bin running cd bin; ./karaf
  3.) Download into the deploy directory:
 
 http://www.gossipcheck.com/mirrors/apache//felix/org.apache.felix.scr-1.6.0.jar
  4.) type scr:list or scr list at the prompt.  You'll get command not
  found.
  A couple of things I've noticed...
  Here's the source code for the bundle activator for SCR in version 1.6.0:
 
 http://svn.apache.org/repos/asf/felix/releases/org.apache.felix.scr-1.6.0/src/main/java/org/apache/felix/scr/impl/Activator.java
  Note that in the start() method there's a try-catch around the part where
  the ScrCommand is registered.  I added a debug statement to the catch
  section and found out that there was a NoClassDefFoundError
  on org.apache.felix.shell.Command  when the code was trying to register
 the
  ScrCommand.  I downloaded org.apache.felix.shll.command 1.4.2 and put it
 my
  deploy directory.  That made the NoClassDefFoundError go away but it
 still
  did not make the scr list command work.  I still got a command not
  found.
  Also ... It appears the trunk of SCR has been updated to work with gogo:
 
 http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/Activator.java
  The start() method looks different and the comment suggests it now works
  with gogo.
  I pulled the trunk and compiled it.  I then tried to run karaf with
  org.apache.felix.scr-1.6.1-SNAPSHOT.  DS started but I still didn't have
 my
  scr list command.
  Any ideas?
 
  -c
 
  On Sat, Mar 19, 2011 at 3:59 AM, Guillaume Nodet gno...@gmail.com
 wrote:
 
  Let's be clear about that.  There's no reason why the scr or any gogo
  commands would not work in karaf.
  What does not work is karaf features on top of gogo such as completion
  (both command and parameter).
  If that's not the case, this should clearly be fixed asap.
 
  On Sat, Mar 19, 2011 at 02:33, Christoper Blunck ch...@thebluncks.com
  wrote:
   Hello all,
   Over in this thread the gogo'ness of SCR is discussed:
  
  
 http://karaf.922171.n3.nabble.com/getting-felix-scr-commands-to-show-up-in-karaf-td2257486.html
   I'm stuck in the same problem where my SCR