etc/config.properties and org.osgi.service.http.port and org.ops4j.pax.web.
pchandler May 26, 2009 4:14 PMI an trying to use the native org.osgi.service.http (Compendium Service). I have some code that runs fine in Equinox but fails in Servicemix.
First, I change the http port in config.properties file I set org.osgi.service.http.port=1234
Side effects are:
1, the follow bundlles will not start:
169 Resolved 50 OPS4J Pax Web - Web Container (0.4.1)
170 Resolved 50 OPS4J Pax Web Extender - Whiteboard (0.3.0)
ERROR: Error starting mvn:org.ops4j.pax.web/pax-web-bundle/0.4.1 (org.osgi.framework.BundleException: Activator start error.)
java.lang.NullPointerException
at org.ops4j.pax.web.service.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:272)
at org.ops4j.pax.web.service.internal.ServerControllerImpl.start(ServerControllerImpl.java:54)
at org.ops4j.pax.web.service.internal.ServerControllerImpl$Unconfigured.configure(ServerControllerImpl.java:377)
at org.ops4j.pax.web.service.internal.ServerControllerImpl.configure(ServerControllerImpl.java:71)
at org.ops4j.pax.web.service.internal.Activator$2.updated(Activator.java:148)
at org.ops4j.pax.web.service.internal.Activator.createManagedService(Activator.java:171)
at org.ops4j.pax.web.service.internal.Activator.start(Activator.java:65)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:591)
at org.apache.felix.framework.Felix._startBundle(Felix.java:1607)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1541)
at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1135)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:267)
2. My HTTP service bundle starts but there is no TCP/IP process listening on org.osgi.service.http.port?
Follow-up questions.
1. Can org.osgi.service.http and org.ops4j.pax.web.service coexist?
2. What are the minimum bundle I need to start for only the OSGi Framework and Compendium Services.
3. Do I need to start the HTTP implementation bundle (org.mortbay.jetty)? If so how? How does org.osgi.service.http get bound to an implementation in ServiceMix?
4. I do not get any error(s) on httpService.registerServlet(). How do I debug inside OSGi HTTP Service? Is there a special log level I can set? Change a log4j.property file?
5. Do you have any org.osgi.service.http.HttpService & ServiceMix example code?
Thanks,
Peter.
Edited by: pchandler on May 26, 2009 8:12 PM