users@jersey.java.net

Re: [Jersey] Why do I need jersey in /lib ?

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Wed, 02 Jul 2008 12:37:00 +0200

Hi Markus,

On Wed, Jul 02, 2008 at 10:37:14AM +0200, Markus Karg wrote:
> I want to use Jersey inside of GlassFish v2.
> So I added jersey 0.8's JARs to the /lib folder of my .war file.
> It works pretty well.
>
> Now I used updatetool of GlassFish to install Jersey 0.8 support into GlassFish v2.
> Then I removed the /lib folder from my .war.
>
> Now I cannot deploy anymore since it says that the Jersey classes are missing.
>
> So it seems it is not enough to just run the updatetool.
>
> What more do I have to do to be able to use Jersey in GlassFish v2 without adding Jersey itself into all of my .war files?

You may try to use [--libraries] switch when deploying your war file.
See [1] for details. You can provide a comma separated list of jar
files to be added to you webapp classpath.
If you provide a relative path, the base is [$DOMAIN/lib/applibs]

The following should work for a simple Jersey based app
and default GFv2 installation:

% ln $AS_HOME/jersey/lib/*.jar $AS_HOME/domains/domain1/lib/applibs
% $AS_HOME/bin/asadmin deploy --libraries asm-3.1.jar,jersey.jar,jsr311-api.jar $WAR_FILE

We could probably explore a possibility to make the links to the jar files
directly when installing the UC module to GlassFish. I.e. it would then create
links for all existing domains. I am only not sure it is possible to create
file system links from Java in a platform independent way.

HTH,

~Jakub

Notice: Jersey is still not final, that is why it was not allowed to standard
GlassFish libs.


[1] https://glassfish.dev.java.net/javaee5/docs/DG/beade.html

>
> Thanks
> Markus
>
> QUIPSY QUALITY GmbH & Co. KG
> Ein Unternehmen der MES-Gruppe
> Stuttgarter Strasse 23
> D-75179 Pforzheim
> Tel: 07231-9189-52
> Fax: 07231-9189-59
> www.quipsy.de
> karg_at_quipsy.de
> Registergericht Mannheim HRA 701214
> Geschäftsführer: Nils Schroeder
>
> Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe geschützte Informationen und ist ausschließlich für den vorgesehenen o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail versehentlich erhalten haben und nicht der vorgesehene Empfänger sind, bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte informieren Sie uns als Absender über diesen Zustellungsfehler und löschen Sie die E-Mail.
>
>
>
>
>

Content-Description: Markus KARG.vcf
> BEGIN:VCARD
> VERSION:2.1
> X-MS-SIGNATURE:YES
> N;LANGUAGE=de:KARG;Markus
> FN:Markus KARG
> ORG:QUIPSY QUALITY GmbH & Co. KG;Research & Development
> TITLE:Team Leader Implementation & Design
> TEL;WORK;VOICE:+49 7231 9189 52
> ADR;WORK;PREF;CHARSET=Windows-1252:;;Stuttgarter Stra?e 23;Pforzheim;;75179;Germany
> LABEL;WORK;PREF;CHARSET=Windows-1252;ENCODING=QUOTED-PRINTABLE:Stuttgarter Stra=DFe 23=0D=0A=
> 75179 Pforzheim=0D=0A=
> Germany
> X-MS-OL-DEFAULT-POSTAL-ADDRESS:2
> URL;WORK:http://www.quipsy.de
> EMAIL;PREF;INTERNET:karg_at_quipsy.de
> X-MS-OL-DESIGN;CHARSET=utf-8:<card xmlns="http://schemas.microsoft.com/office/outlook/12/electronicbusinesscards" ver="1.0" layout="left" bgcolor="ffffff"><img xmlns="" align="fit" area="16" use="cardpicture"/><fld xmlns="" prop="name" align="left" dir="ltr" style="b" color="000000" size="10"/><fld xmlns="" prop="org" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="title" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="dept" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="telwork" align="left" dir="ltr" color="000000" size="8"><label align="right" color="626262">Work</label></fld><fld xmlns="" prop="email" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="addrwork" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="webwork" align="left" dir="ltr" color="000000" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/><fld xmlns="" prop="blank" size="8"/></card>
> REV:20080618T082751Z
> END:VCARD

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net


-- 
http://blogs.sun.com/japod