hi,

actually, I think that there is an underlying exception that provokes the
infinite recursion and the stackoverflow exception.

Thierry Boileau

On 10/1/07, Joan Picanyol i Puig <[EMAIL PROTECTED]> wrote:
>
> * Thierry Boileau <[EMAIL PROTECTED]> [20070928 13:55]:
> > It seems that an exception is thrown. You can get it by setting the the
> log
> > mechanism (see http://www.restlet.org/documentation/1.0/tutorial#part07)
> > since this exception is logged in the
> > com.noelios.restlet.StatusFilter.getStatus method.
>
> I'm not sure I understand you, what else would you expect to get? The
> trace shown appeared in catalina.out (we're under Tomcat 5.5.20), and it
> does show a StackOverflowError (which extends Throwable and is thus
> caught in StatusFilter.doHandle). FWIW, I have a similar backtrace
> (pasted below), in which the only difference is the "exit point", but
> the infinite recursion is the same (Filter.doHandle() calling
> Filter.handle()).
>
> java.lang.StackOverflowError
>        at java.nio.charset.CharsetDecoder.<init>(CharsetDecoder.java:169)
>        at java.nio.charset.CharsetDecoder.<init>(CharsetDecoder.java:209)
>        at sun.nio.cs.ISO_8859_1$Decoder.<init>(ISO_8859_1.java:52)
>        at sun.nio.cs.ISO_8859_1$Decoder.<init>(ISO_8859_1.java:49)
>        at sun.nio.cs.ISO_8859_1.newDecoder(ISO_8859_1.java:42)
>        at java.nio.charset.CharsetEncoder.isLegalReplacement(
> CharsetEncoder.java:311)
>        at java.nio.charset.CharsetEncoder.replaceWith(CharsetEncoder.java
> :267)
>        at java.nio.charset.CharsetEncoder.<init>(CharsetEncoder.java:186)
>        at java.nio.charset.CharsetEncoder.<init>(CharsetEncoder.java:209)
>        at sun.nio.cs.ISO_8859_1$Encoder.<init>(ISO_8859_1.java:116)
>        at sun.nio.cs.ISO_8859_1$Encoder.<init>(ISO_8859_1.java:113)
>        at sun.nio.cs.ISO_8859_1.newEncoder(ISO_8859_1.java:46)
>        at java.lang.StringCoding$CharsetSE.<init>(StringCoding.java:321)
>        at java.lang.StringCoding$CharsetSE.<init>(StringCoding.java:312)
>        at java.lang.StringCoding.encode(StringCoding.java:369)
>        at java.lang.String.getBytes(String.java:812)
>        at org.restlet.resource.StringRepresentation.updateSize(
> StringRepresentation.java:181)
>        at org.restlet.resource.StringRepresentation.setCharacterSet(
> StringRepresentation.java:171)
>        at org.restlet.resource.StringRepresentation.<init>(
> StringRepresentation.java:116)
>        at org.restlet.resource.StringRepresentation.<init>(
> StringRepresentation.java:92)
>        at org.restlet.resource.StringRepresentation.<init>(
> StringRepresentation.java:76)
>        at com.noelios.restlet.StatusFilter.getRepresentation(
> StatusFilter.java:165)
>        at
> com.noelios.restlet.application.ApplicationStatusFilter.getRepresentation(
> ApplicationStatusFilter.java:66)
>        at com.noelios.restlet.StatusFilter.afterHandle(StatusFilter.java
> :111)
>        at org.restlet.Filter.handle(Filter.java:135)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at org.restlet.Filter.handle(Filter.java:134)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at org.restlet.Filter.handle(Filter.java:134)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
>        at org.restlet.Filter.handle(Filter.java:134)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at org.restlet.Filter.handle(Filter.java:134)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at org.restlet.Filter.handle(Filter.java:134)
>        at org.restlet.Filter.doHandle(Filter.java:105)
>        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
> .
> .
> .
>
> Any ideas?
> tks
> --
> pica
>
>
>
> >
> >
> > best regards,
> > Thierry Boileau
> >
> > On 9/26/07, Joan Picanyol i Puig <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi there,
> > >
> > > We've implemented a callback mecanism under version 1.0.2. We have 5
> > > different restlets, and after attaching them all we attach a default
> > > restlet with this simple handle method:
> > >
> > >    public void handle(Request request, Response response) {
> > >
> > >        log.error("Default handle, unidentified notificacion.");
> > >        response.setStatus( Status.SUCCESS_OK);
> > >
> > >    }
> > >
> > > Simple integration tests are fine, and everything looks OK upon
> startup,
> > > but
> > > after a while something gets wedged (the mecanism stops working) and
> we
> > > end up
> > > with:
> > >
> > > 26-sep-2007 18:30:37 com.noelios.restlet.StatusFilter getStatus
> > > GRAVE: Unhandled exception or error intercepted
> > > java.lang.StackOverflowError
> > >    at java.util.Hashtable.get(Hashtable.java:336)
> > >    at java.util.Properties.getProperty( Properties.java:774)
> > >    at java.lang.System.getProperty(System.java:630)
> > >    at sun.security.action.GetPropertyAction.run(GetPropertyAction.java
> :66)
> > >    at java.security.AccessController.doPrivileged(Native Method)
> > >    at java.io.PrintWriter.<init>(PrintWriter.java:77)
> > >    at java.io.PrintWriter.<init>(PrintWriter.java:61)
> > >    at java.util.logging.SimpleFormatter.format(SimpleFormatter.java
> :71)
> > >    at java.util.logging.StreamHandler.publish (StreamHandler.java:179)
> > >    at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
> > >    at java.util.logging.Logger.log(Logger.java:452)
> > >    at java.util.logging.Logger.doLog(Logger.java:474)
> > >    at java.util.logging.Logger.log (Logger.java:563)
> > >    at com.noelios.restlet.StatusFilter.getStatus(StatusFilter.java
> :183)
> > >    at
> com.noelios.restlet.application.ApplicationStatusFilter.getStatus(
> > > ApplicationStatusFilter.java:76)
> > >    at com.noelios.restlet.StatusFilter.doHandle (StatusFilter.java:89)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java :105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
> > >    at org.restlet.Filter.handle(Filter.java :134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:87)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java :105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >    at org.restlet.Filter.handle(Filter.java:134)
> > >    at org.restlet.Filter.doHandle(Filter.java:105)
> > >
> > > repeated about 200 times. Any ideas or suggestions on how to debug
> this?
> > >
> > > tks
> > > --
> > > pica
> > >
>

Reply via email to