felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Capano (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FELIX-4234) Using HttpService provided by Felix Jetty bundle
Date Fri, 20 Sep 2013 14:06:53 GMT
Luca Capano created FELIX-4234:

             Summary: Using HttpService provided by Felix Jetty bundle
                 Key: FELIX-4234
                 URL: https://issues.apache.org/jira/browse/FELIX-4234
             Project: Felix
          Issue Type: Test
          Components: HTTP Service
    Affects Versions: http-2.2.0
         Environment: Several hardware configurations
Operating System Ubuntu 12.10 amd64
            Reporter: Luca Capano
             Fix For: http-2.2.0

I'm new in using Felix implementation of OSGi and I'm trying to start the Jetty bundle and
register a simple servlet, but I have a problem in getting the Service Reference of HttpService.
In details, I made the following steps:
1) Get Felix framework from the proper site
2) Get the Jetty bundle (org.apache.felix.http.jetty) from the same site and insert it in
the /bundle folder (the auto-deploy folder)
3) Write my little training bundle made by Activator+Little servlet+Manifest file
4) Create a jar of my bundle
5) Put the jar into /bundle folder (the same where Jetty bundle is put in)
6) In the config.properties file write the property org.apache.felix.http.enable=true
7) Start the felix framework typing "sudo java -jar /bin/felix.jar" from the install folder
of felix

In this way it seems that Jetty starts on localhost:8080 (I see 404 Error into the browser),
but I have no reference for HttpService. In details, in the activator I have this line:

ServiceReference<?> ref=context.getServiceReference(HttpService.class.getName());

but ref is always null. The same happens if I start Jetty and then my little bundle. What
am I doing wrong? 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message