Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Having an OSGI HttpService on top of Jetty >= 7

Hi Reto,

7.1.4.v20100609 is released now. The URL for the staged release is new
for each version and a temporary URL.
The error message you see is abut this limitation I was mentioning:
jetty.osgi.boot expects the system property "jetty.home" to be set and
to point to a directory such that ${jetty.home}/etc/jetty.xml exists.
The error message also mentions that if the bundle is unzipped (not
OSGi standard but supported by some implementations), then the jetty
server will be configured according to the jetty.xml file located
inside this bundle; in the jettyhome folder.

This jetty.xml must define the jetty deployer for OSGi web bundles. I
suspect that is what is missing.
Otherwise I'd like to reproduce the setup you have and fix the issue.
Please ping me on #jetty at irc.freenode.net if that would make things easier.

Hugues


On Thu, Jun 10, 2010 at 12:32 AM, Reto Bachmann-Gmuer <reto@xxxxxxxxxx> wrote:
> Hi Hugues
>
> Where do I get staged releases from? I currently downloaded my bundles from
> maven central, now I compiled 7.1.5-SNAPSHOT and getting the following
> exception activating:
>
> java.lang.IllegalArgumentException: The system property -Djetty.home must be
> set to a directory or the bundle org.eclipse.jetty.osgi.boot installed here
> /home/reto/projects/guest/jetty/jetty-osgi/jetty-osgi-boot/target/jetty-osgi-boot-7.1.5-SNAPSHOT.jar
> must be unjarred.
>     at
> org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.setup(WebappRegistrationHelper.java:233)
>     at
> org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker.<init>(JettyContextHandlerServiceTracker.java:75)
>     at
> org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.start(JettyBootstrapActivator.java:92)
>     at
> org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1284)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:652)
>     at org.apache.felix.framework.Felix.activateBundle(Felix.java:1756)
>     ... 8 more
>
> setting jetty.home to a directory prevented the error message and jetty is
> now listening to port 8080. However I get only 404, the felix webconsole and
> another bundle that uses OSGi HttpService do not seem to work. using
> "inspect service capability" on the felix comand line it seems no bunlde if
> offering the HttpService.
>
> Cheers,
> reto
>
> On Thu, Jun 10, 2010 at 12:24 AM, Hugues Malphettes
> <hmalphettes@xxxxxxxxxxx> wrote:
>>
>> Hi Reto,
>>
>> This issue was reported here:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=315004
>> It is fixed in 7.1.4 which is currently staged.
>>
>> Please note that currently the org.eclipse.jetty.osgi.boot is limited
>> in the way the jetty server is configured.
>> The limitation is filed here:
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=309250
>> osgi.boot currently requires the system property jetty.home to be
>> setup to point to a directory such that ${jetty.home}/etc/jetty.xml is
>> there.
>> org.eclipse.jetty.osgi.boot gives access to the jetty server instance
>> if you need to access it programatically.
>>
>> To give some credit to org.eclipse.jetty.osgi.boot it provides:
>> optional support for jsp, jsf and the rest of the hightide features.
>>
>> Let us know how your setup with felix goes.
>>
>> Hugues
>>
>> On Wed, Jun 9, 2010 at 3:09 PM, Reto Bachmann-Gmuer <reto@xxxxxxxxxx>
>> wrote:
>> > Hello
>> >
>> > I was trying to get an OSGi Http Service to run with a jetty version >=
>> > 7.
>> >
>> > I'm using felix and I'm successful till the point I can programmatically
>> > have a webserver running instantiation org.eclipse.jetty.server.Server
>> >
>> > for this I install the following bundles:
>> >
>> > javax.servlet - Servlet API Bundle (2.5.0.v200910301333)
>> > org.eclipse.jetty.server - Jetty :: Server Core (7.1.3.v20100526)
>> > org.eclipse.jetty.continuation - Jetty :: Continuation (7.1.3.v20100526)
>> > org.eclipse.jetty.util - Jetty :: Utilities (7.1.3.v20100526)
>> > org.eclipse.jetty.io - Jetty :: IO Utility (7.1.3.v20100526)
>> > org.eclipse.jetty.http - Jetty :: Http Utility (7.1.3.v20100526)
>> >
>> > Now to get HttpService running I installed [1]
>> >
>> > org.eclipse.jetty.osgi.httpservice - OSGi HttpService provided by
>> > equinox
>> > HttpServiceServlet deployed on jetty (7.1.3.v20100526)
>> >
>> > and its dependency:
>> >
>> > org.eclipse.equinox.http.servlet  -  Http Services Servlet
>> > (1.1.0.v20100503)
>> >
>> > All bundles are active but I see no HttpService, as the name Bootstrap
>> > sounded promising I install the following bundles too:
>> >
>> > org.eclipse.jetty.osgi.boot - Jetty OSGi bootstrap (7.1.3.v20100526)
>> > org.eclipse.jetty.servlet - Jetty :: Servlet Handling (7.1.3.v20100526)
>> > org.eclipse.jetty.security - Jetty :: Security (7.1.3.v20100526)
>> > org.eclipse.jetty.webapp - Jetty :: Webapp Application Support
>> > (7.1.3.v20100526)
>> > org.eclipse.jetty.xml - Jetty :: XML utilities (7.1.3.v20100526)
>> > org.eclipse.jetty.deploy - Jetty :: Deployers (7.1.3.v20100526)
>> >
>> >
>> > I now get the following exception
>> >
>> > org.osgi.framework.BundleException: Activator start error in bundle
>> > org.eclipse.jetty.osgi.boot [112].
>> >     at org.apache.felix.framework.Felix.activateBundle(Felix.java:1803)
>> >     at org.apache.felix.framework.Felix.startBundle(Felix.java:1678)
>> >     at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
>> > [FelixDispatchQueue] INFO
>> > org.apache.clerezza.platform.documentation.DocumentationProvider -
>> > Unregistered documentation of bundle: org.eclipse.jetty.osgi.boot
>> >     at
>> >
>> > org.apache.felix.shell.impl.StartCommandImpl.execute(StartCommandImpl.java:114)
>> >     at
>> >
>> > org.apache.felix.shell.impl.Activator$ExecutePrivileged.run(Activator.java:375)
>> >     at java.security.AccessController.doPrivileged(Native Method)
>> >     at
>> >
>> > org.apache.felix.shell.impl.Activator$ShellServiceImpl.executeCommand(Activator.java:274)
>> >     at
>> >
>> > org.apache.felix.shell.tui.Activator$ShellTuiRunnable.run(Activator.java:184)
>> >     at java.lang.Thread.run(Thread.java:636)
>> > Caused by: java.lang.NoClassDefFoundError: org/xml/sax/SAXException
>> >     at
>> >
>> > org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker.<init>(JettyContextHandlerServiceTracker.java:74)
>> >     at
>> >
>> > org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.start(JettyBootstrapActivator.java:92)
>> >     at
>> >
>> > org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1284)
>> >     at java.security.AccessController.doPrivileged(Native Method)
>> >     at
>> >
>> > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:652)
>> >     at org.apache.felix.framework.Felix.activateBundle(Felix.java:1756)
>> >     ... 8 more
>> > Caused by: java.lang.ClassNotFoundException: org.xml.sax.SAXException
>> >     at
>> >
>> > org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:814)
>> >     at
>> > org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:61)
>> >     at
>> >
>> > org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1733)
>> >     at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>> >     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:334)
>> >     ... 14 more
>> > java.lang.NoClassDefFoundError: org/xml/sax/SAXException
>> >
>> >
>> > I this this is cause by org.eclipse.jetty.osgi.boot not import
>> > ogr.xml.sax.
>> >
>> > I would be thankful for any hint on how to have an HttpService running
>> > with
>> > a recent jetty version.
>> >
>> > Cheers,
>> > reto
>> >
>> > 1. http://www.eclipse.org/equinox/server/http_in_equinox.php
>> >
>> > _______________________________________________
>> > jetty-users mailing list
>> > jetty-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/jetty-users
>> >
>> >
>> _______________________________________________
>> jetty-users mailing list
>> jetty-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-users
>
>


Back to the top