Put together a simple Jersey 2 example. Check it out here:
https://github.com/aruld/jersey2-sample
-Arul
On Wed, Jun 6, 2012 at 1:09 PM, <agksmehx_at_gmail.com> wrote:
> I built the simplest Jersey 2.0 application into a .war file using
> maven. I had dependencies on jersey-server, jersey-client,
> jersey-common for version 2.0-m04 which causes the .war file to contain
> within WEB-INF/lib the jars listed below. I tried deploying it in
> Glassfish 3.1.2 but it didn't work. (javax.servlet.ServletException:
> PWC1391: Servlet.init() for servlet com.younum.web.www.rs.RS threw
> exception) root cause:
> com.sun.jersey.spi.inject.Errors$ErrorMessagesException
>
> I am omitting details of the error because I am doing something higher
> level that's not right.
>
> Could somebody please give me newbie-level instructions on how to run
> Jersey 2.0? I can use maven only at an elementary level (compile,
> install java / war projects).
>
> My guess is that I cannot use Glassfish 3.1.2. The central question is
> -- given a web server such as Jetty or a Java EE server such as
> Glassfish, how to modify it to run Jersey 2.0?
>
> jars included in WEB-INF/lib:
>
> activation-1.1.jar
> asm-all-repackaged-2.0.3.jar
> auto-depends-2.0.3.jar
> gmbal-api-only-3.0.0-b023.jar
> grizzly-framework-2.2.7.jar
> grizzly-http-2.2.7.jar
> grizzly-http-server-2.2.7.jar
> grizzly-rcm-2.2.7.jar
> guava-osgi-11.0.1.jar
> hk2-api-2.0.3.jar
> javax.inject-1.jar
> javax.inject-2.0.3.jar
> javax.ws.rs-api-2.0-m05.jar
> jersey-client-2.0-m04.jar
> jersey-common-2.0-m04.jar
> jersey-container-grizzly2-http-2.0-m04.jar
> jersey-server-2.0-m04.jar
> mail-1.4.jar
> management-api-3.0.0-b012.jar
> osgi-resource-locator-1.0.1.jar
> tiger-types-1.4.jar
>
--
http://aruld.info
http://twitter.com/aruld