users@jersey.java.net

Re: [Jersey] OSGI Jersey example not working

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Thu, 08 Apr 2010 01:16:32 +0200

Marc Hadley wrote:
> I'm not up-to-speed on the OSGI work but the following explains the module dependencies:
>
> https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html#chapter_deps
>
> Looks like you also need jersey-core unless that is bundled in the jersey-server bundle ?
>

Right, the jersey-core module is needed as well, as it is not bundled
with the jersey-server module.
An example of a OSGified web app could be found at [1], you can just:

svn checkout
https://jersey.dev.java.net/svn/jersey/trunk/jersey/osgi/osgified-war-tests/

then you should see two modules there:

 - osgified-webapp contains a simple OSGified WAR module
 - osgified-war-test contains appropriate test

you need Java SE 6 to be able to run this.

I will move these modules to samples space before the 1.2 release,
and then the content should also become available for download as a
standalone zip file.

HTH,

~Jakub

[1]https://jersey.dev.java.net/svn/jersey/trunk/jersey/osgi/osgified-war-tests/
> Marc.
>
> On Apr 7, 2010, at 2:06 PM, Larry Touve wrote:
>
>
>> Hi,
>>
>> I’m trying to deploy a simple Jersey application to Felix and I’m running into problems. I may be out in left field, but I’ve searched the archives and scoured information trying to see what I might be missing. I downloaded the 1.2-SNAPSHOT version of jersey-server and jsr311-api. I downloaded and built the osgified-webapp example and deployed it. It starts up (shows up as active in Felix) but I get 404’s when I try to access the RESTful URL. I tried my own simple example and get the same results. Am I missing some bundles perhaps?
>>
>> I’ve got Felix 2.0.4 running with the following bundles:
>> START LEVEL 1
>> ID State Level Name
>> [ 0] [Active ] [ 0] System Bundle (2.0.4)
>> [ 1] [Active ] [ 1] Apache Felix Bundle Repository (1.4.2)
>> [ 2] [Active ] [ 1] Apache Felix Bundle Repository (1.4.3)
>> [ 3] [Active ] [ 1] Apache Felix Configuration Admin Service (1.2.4)
>> [ 4] [Active ] [ 1] Apache Felix Http Bundle (2.0.4)
>> [ 5] [Active ] [ 1] Apache Felix Log Service (1.0.0)
>> [ 6] [Active ] [ 1] Apache Felix Shell Service (1.4.2)
>> [ 7] [Active ] [ 1] Apache Felix Remote Shell (1.0.4)
>> [ 8] [Active ] [ 1] Apache Felix Shell TUI (1.4.1)
>> [ 9] [Active ] [ 1] Apache Felix Web Management Console (2.0.6)
>> [ 10] [Active ] [ 1] osgi.cmpn (4.2.0.200908310645)
>> [ 11] [Active ] [ 1] OPS4J Pax Web - Jetty Bundle (0.7.1)
>> [ 233] [Active ] [ 1] jersey-server (1.2.0.SNAPSHOT)
>> [ 234] [Active ] [ 1] jsr311-api (1.1)
>>
>> Any assistance will be greatly appreciated.
>>
>> Thanks,
>> larry
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>