users@jersey.java.net

Re: [Jersey] Problem with Response.created(someUri).build()

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 21 Jan 2010 11:44:50 +0000

Hi Daniel,

Are you using GF v3 with Jersey 1.1.4.1?

I am guessing that from the error, 9031, a description of which can be
found here:

   http://docs.sun.com/app/docs/doc/820-7700/gjkaj?a=view

WEB9031 WebappClassLoader unable to load resource [{0}], because it
has not yet been started, or was already stopped
Cause:
This problem usually indicates that the classloader of a web
application was cached, and an attempt is being made to have it load
resources even though the web application with which the classloader
used to be associated has already been undeployed

Solution:
Make sure that the classloader associated with your web application is
not cached and used beyond the lifetime of your web application


Jersey does not cache any classloader. I wonder if this is a glitch in
GF v3. All i can suggest at the moment is you stop and restart GF v3.

Paul.

On Jan 20, 2010, at 10:01 PM, Daniel Mischler wrote:

> Hi all
>
> I'm fairly new to Jersey and stuck with the following problem.
>
> Based on the webscanwebapp I'm trying to add a @POST method and
> return the appropriate response:
>
> @POST
> @Path("create")
> public Response create() throws URISyntaxException {
> ...
>
> URI _uri = new URI("/records/" + createID());
> return Response.created(_uri).build();
> }
>
> Doing so ends with the following exception:
>
> java.lang.IllegalStateException: WEB9031: WebappClassLoader unable
> to load resource
> [com.sun.jersey.core.spi.factory.ResponseBuilderHeaders], because it
> has not yet been started, or was already stopped
>
>
> What am I missing?
>
> Thanx for your help
>
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>