users@jersey.java.net

Re: New Exceptions

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 29 Feb 2008 09:52:38 +0100

Hi Dianne,

I think this is a bug in the RuntimeDelegate.getInstance(). How have you
configured the javax.ws.rs.ext.RuntimeDelegate? are you using the
default options?

What is happening is RuntimeDelegate.getInstance() is throwing
WebApplicaitonException which in turn is required to use
RuntimeDelegate.getInstance() to get the Response.ResponseBuilder and so
on until the stack overflows. Do you have more information on the stack
trace to get a better idea of the cause?

RuntimeDelegate.getInstance() should not be throwing
WebApplicationException, it should be another type of runtime exception.

Paul.

Dianne Jiao wrote:
> Hi,
>
> I got this exception quite recently. After I did a bringover Tuesday,
> starting LW HTTP Server throw exception:
>
> Feb 28, 2008 2:47:28 PM com.sun.ws.rest.api.core.DynamicResourceConfig init
> INFO: Scanning for resource classes ...
> Feb 28, 2008 2:47:28 PM com.sun.ws.rest.api.core.DynamicResourceConfig init
> INFO: Resource class:
> com.sun.ts.tests.jaxrs.api.rs.getTest.HttpMethodGetTest Loaded.
> Feb 28, 2008 2:47:28 PM com.sun.ws.rest.api.core.DynamicResourceConfig init
> INFO: Resource class:
> com.sun.ts.tests.jaxrs.api.rs.headTest.HttpMethodHeadTest Loaded.
> Feb 28, 2008 2:47:28 PM com.sun.ws.rest.api.core.DynamicResourceConfig init
> INFO: All resource classes loaded.
> Exception in thread "main" java.lang.StackOverflowError
> at java.nio.Buffer.<init>(Buffer.java:176)
> at java.nio.ByteBuffer.<init>(ByteBuffer.java:259)
> at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52)
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
> at java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
> at
> java.lang.StringCoding$StringEncoder.encode(StringCoding.java:237)
> at java.lang.StringCoding.encode(StringCoding.java:272)
> at java.lang.String.getBytes(String.java:947)
> at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
> at
> java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
> at java.io.File.exists(File.java:733)
> at
> sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:983)
> at
> sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:961)
> at sun.misc.URLClassPath.findResource(URLClassPath.java:145)
> at java.net.URLClassLoader$2.run(URLClassLoader.java:362)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findResource(URLClassLoader.java:359)
> at java.lang.ClassLoader.getResource(ClassLoader.java:977)
> at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)
> at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:94)
> at
> javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:92)
> at
> javax.ws.rs.core.Response$ResponseBuilder.newInstance(Response.java:300)
> at javax.ws.rs.core.Response.status(Response.java:89)
> at javax.ws.rs.core.Response.serverError(Response.java:164)
> at
> javax.ws.rs.WebApplicationException.<init>(WebApplicationException.java:79)
> at
> javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:109)
> at
> javax.ws.rs.core.Response$ResponseBuilder.newInstance(Response.java:300)
> at javax.ws.rs.core.Response.status(Response.java:89)
> at javax.ws.rs.core.Response.serverError(Response.java:164)
> ...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109