felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michiel Vermandel <mverm...@yahoo.com>
Subject Re: Beginners problem
Date Fri, 16 Mar 2012 08:17:06 GMT
Oh yes!!
Missed that one.

Thank you so much!

Michiel

 
-----------------
http://www.codessentials.com - Your essential software, for free!
Follow us at http://twitter.com/#!/Codessentials


________________________________
 From: Richard S. Hall <heavy@ungoverned.org>
To: users@felix.apache.org 
Sent: Thursday, March 15, 2012 11:49 PM
Subject: Re: Beginners problem
 
Is it related to this:

     http://www.mail-archive.com/users@felix.apache.org/msg06703.html

If so, you'll need to set the property in conf/config.properties.

-> richard


On 3/15/12 5:08 PM, Michiel Vermandel wrote:
> Hello,
>
> I am very new to the Apache Felix community so I hope I am doing right in just sending
a mail to this address.
>
> I am having an issue with my very first attempt to create a servlet bundle with Apache
Felix.
> Basically I just followed the example at this page:
>
> http://felix.apache.org/site/apache-felix-http-service.html
>
> My setup:
>
>      0|Active     |    0|System Bundle (4.0.2)
>      1|Active     |    1|Apache Felix Bundle Repository (1.6.6)
>      2|Active     |    1|Apache Felix Gogo Command (0.12.0)
>      3|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
>      4|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>      6|Active     |    1|Apache Felix Http Bundle (2.2.0)
>
> So 0 ->  4 came with the Felix 4.0.2 zip.
> The I installed and started "HTTP Service Bundle" (http://apache.belnet.be//felix/org.apache.felix.http.bundle-2.2.0.jar)
as described in the previously mentioned document.
> This gave me bundle 6 which started nicely.
>
> Then I created a bundle as described in the document.
> I just added an else-branche in the Activator:
>
>
> public class Activator implements BundleActivator
> { public void start(BundleContext context) throws Exception  { ServiceReference sRef
= context.getServiceReference(HttpService.class.getName()); if (sRef != null) { HttpService
service = (HttpService) context.getService(sRef); service.registerServlet("/hello", new HelloWorld(),
null, null); }
> else{
> System.out.println("No HttpService!");
> }
> }
> }
> When I install and start the bundle I get the "No HttpService!" message.
> When I do an inspect of bundel 6 (Http Bundle) I get:
>
> g! inspect capability service 6
> org.apache.felix.http.bundle [6] provides:
> ------------------------------------------
> service; javax.servlet.http.HttpServlet with properties:
>     http.felix.dispatcher = org.apache.felix.http.base.internal.DispatcherServlet
>     service.description = Dispatcher for bridged request handling
>     service.id = 17
>     service.vendor = The Apache Software Foundation
> service; java.util.EventListener with properties:
>     http.felix.dispatcher = org.apache.felix.http.base.internal.EventDispatcher
>     service.description = Dispatcher for bridged HttpSession events
>     service.id = 18
>     service.vendor = The Apache Software Foundation
>
> Nothing about HttpService.
>
> Am I missing something?
> Do I need to install something else?
>
> Thank you!
>
> Michiel
>
>
>
> -----------------
> http://www.codessentials.com - Your essential software, for free!
> Follow us at http://twitter.com/#!/Codessentials

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message