You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by mikevan <mv...@comcast.net> on 2011/07/09 04:05:39 UTC

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

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;chris@thebluncks.com&gt; 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;gnodet@gmail.com&gt;
>> 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;chris@thebluncks.com&gt;
>>> 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
>>> &lt;gnodet@gmail.com&gt;
>>> > 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
>>> &lt;chris@thebluncks.com&gt;
>>> >> 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
>>> >> > chris@thebluncks.com
>>> >> >
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >> --
>>> >> Cheers,
>>> >> Guillaume Nodet
>>> >> ------------------------
>>> >> Blog: http://gnodet.blogspot.com/
>>> >> ------------------------
>>> >> Open Source SOA
>>> >> http://fusesource.com
>>> >
>>> >
>>> >
>>> > --
>>> > Christopher Blunck
>>> > chris@thebluncks.com
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>
>>
>>
>> --
>> Christopher Blunck
>> chris@thebluncks.com
>>
>>
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
> 


-----
Mike Van
--
View this message in context: http://karaf.922171.n3.nabble.com/Followup-on-getting-felix-scr-commands-to-show-up-in-karaf-tp2700804p3153797.html
Sent from the Karaf - User mailing list archive at Nabble.com.

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

Posted by mikevan <mv...@comcast.net>.
Chris,

In my research, I've learned that SCR is a way of deploying bundles without
needing a bundle activator. If this is why you're using SCR, I wonder how
much trouble it would be to simply transition your bundles to use Blueprint
(yeah!) or SpringDM (meh). 

In any case, in the 2.2.x branch of Karaf, I've been able to access all of
the requisite SCR commands. As Guillaume points out, those commands don't
have support for tab-completion or listing using tab-tab.

There are other core felix commands such as "tac"; which, although
implemented in Felix, needed to be re-implemented in Karaf to be used. I
wonder if this needs to be done with SCR commands as well. 

What I hope the Karaf community can do is let me know if I need to
re-implement the SCR commands in Karaf to make them available for
tab-completion and inclusion in the tab-tab list.


blunck2 wrote:
> 
> Hi Mike,
> 
> Yup.  As Guillaume mentioned the change is that SCR trunk still uses
> the old shell infrastructure rather than GoGo.  It looked like there
> was a single file that needed to be updated for SCR (specifically the
> shell bindings) and modified to use GoGo rather than the old shell
> stuff.
> 
> Any help you could give would be great!  It gets old dropping my
> features into 2.1.x so I can verify all the services come up and are
> available!
> 
> 
> -c
> 
> On Fri, Jul 8, 2011 at 10:05 PM, mikevan &lt;mvangeertruy@comcast.net&gt;
> wrote:
>> 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;chris@thebluncks.com&gt; 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;gnodet@gmail.com&gt;
>>>> 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;chris@thebluncks.com&gt;
>>>>> 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
>>>>> &lt;gnodet@gmail.com&gt;
>>>>> > 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
>>>>> &lt;chris@thebluncks.com&gt;
>>>>> >> 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
>>>>> >> > chris@thebluncks.com
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> --
>>>>> >> Cheers,
>>>>> >> Guillaume Nodet
>>>>> >> ------------------------
>>>>> >> Blog: http://gnodet.blogspot.com/
>>>>> >> ------------------------
>>>>> >> Open Source SOA
>>>>> >> http://fusesource.com
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Christopher Blunck
>>>>> > chris@thebluncks.com
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>> ------------------------
>>>>> Open Source SOA
>>>>> http://fusesource.com
>>>>
>>>>
>>>>
>>>> --
>>>> Christopher Blunck
>>>> chris@thebluncks.com
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>>
>>
>>
>> -----
>> Mike Van
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Followup-on-getting-felix-scr-commands-to-show-up-in-karaf-tp2700804p3153797.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Christopher Blunck
> chris@thebluncks.com
> 

blunck2 wrote:
> 
> Hi Mike,
> 
> Yup.  As Guillaume mentioned the change is that SCR trunk still uses
> the old shell infrastructure rather than GoGo.  It looked like there
> was a single file that needed to be updated for SCR (specifically the
> shell bindings) and modified to use GoGo rather than the old shell
> stuff.
> 
> Any help you could give would be great!  It gets old dropping my
> features into 2.1.x so I can verify all the services come up and are
> available!
> 
> 
> -c
> 
> On Fri, Jul 8, 2011 at 10:05 PM, mikevan &lt;mvangeertruy@comcast.net&gt;
> wrote:
>> 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;chris@thebluncks.com&gt; 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;gnodet@gmail.com&gt;
>>>> 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;chris@thebluncks.com&gt;
>>>>> 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
>>>>> &lt;gnodet@gmail.com&gt;
>>>>> > 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
>>>>> &lt;chris@thebluncks.com&gt;
>>>>> >> 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
>>>>> >> > chris@thebluncks.com
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> --
>>>>> >> Cheers,
>>>>> >> Guillaume Nodet
>>>>> >> ------------------------
>>>>> >> Blog: http://gnodet.blogspot.com/
>>>>> >> ------------------------
>>>>> >> Open Source SOA
>>>>> >> http://fusesource.com
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Christopher Blunck
>>>>> > chris@thebluncks.com
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Guillaume Nodet
>>>>> ------------------------
>>>>> Blog: http://gnodet.blogspot.com/
>>>>> ------------------------
>>>>> Open Source SOA
>>>>> http://fusesource.com
>>>>
>>>>
>>>>
>>>> --
>>>> Christopher Blunck
>>>> chris@thebluncks.com
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Guillaume Nodet
>>> ------------------------
>>> Blog: http://gnodet.blogspot.com/
>>> ------------------------
>>> Open Source SOA
>>> http://fusesource.com
>>>
>>
>>
>> -----
>> Mike Van
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Followup-on-getting-felix-scr-commands-to-show-up-in-karaf-tp2700804p3153797.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Christopher Blunck
> chris@thebluncks.com
> 


-----
Mike Van
--
View this message in context: http://karaf.922171.n3.nabble.com/Followup-on-getting-felix-scr-commands-to-show-up-in-karaf-tp2700804p3153970.html
Sent from the Karaf - User mailing list archive at Nabble.com.

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

Posted by Christoper Blunck <ch...@thebluncks.com>.
Hi Mike,

Yup.  As Guillaume mentioned the change is that SCR trunk still uses
the old shell infrastructure rather than GoGo.  It looked like there
was a single file that needed to be updated for SCR (specifically the
shell bindings) and modified to use GoGo rather than the old shell
stuff.

Any help you could give would be great!  It gets old dropping my
features into 2.1.x so I can verify all the services come up and are
available!


-c

On Fri, Jul 8, 2011 at 10:05 PM, mikevan <mv...@comcast.net> wrote:
> 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;chris@thebluncks.com&gt; 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;gnodet@gmail.com&gt;
>>> 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;chris@thebluncks.com&gt;
>>>> 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
>>>> &lt;gnodet@gmail.com&gt;
>>>> > 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
>>>> &lt;chris@thebluncks.com&gt;
>>>> >> 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
>>>> >> > chris@thebluncks.com
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Cheers,
>>>> >> Guillaume Nodet
>>>> >> ------------------------
>>>> >> Blog: http://gnodet.blogspot.com/
>>>> >> ------------------------
>>>> >> Open Source SOA
>>>> >> http://fusesource.com
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Christopher Blunck
>>>> > chris@thebluncks.com
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Guillaume Nodet
>>>> ------------------------
>>>> Blog: http://gnodet.blogspot.com/
>>>> ------------------------
>>>> Open Source SOA
>>>> http://fusesource.com
>>>
>>>
>>>
>>> --
>>> Christopher Blunck
>>> chris@thebluncks.com
>>>
>>>
>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> ------------------------
>> Open Source SOA
>> http://fusesource.com
>>
>
>
> -----
> Mike Van
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Followup-on-getting-felix-scr-commands-to-show-up-in-karaf-tp2700804p3153797.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Christopher Blunck
chris@thebluncks.com