Re: How do I switch off log output?

2008-04-08 Thread Steve Loughran
On Tue, Apr 8, 2008 at 6:27 AM, Ian Clarke [EMAIL PROTECTED] wrote: Thanks for the tip, although I'm afraid it wasn't entirely effective. I used getLogService().setEnabled(false) - but I'm still getting the following: Apr 8, 2008 12:23:48 AM org.apache.commons.httpclient.HttpMethodBase

Exception handling

2008-04-08 Thread Stephan Koops
Hi, is it right, that there is no special excpetion handlung in Restlet for RuntimeExceptions, only the mapping to status 500? Is there more than that and the ResourceException, which is mapped to the given status and nothing else? best regards Stephan

Re: How do I switch off log output?

2008-04-08 Thread Rob Heittman
Yes, it can be a bit of a challenge to find and manage logging output from all the different connectors and plugins that you might possibly be using (a list that grows all the time), not just Restlet itself. I wonder if anybody has any good ideas for easily centralizing this, maybe as part of the

First resource page

2008-04-08 Thread Thierry Boileau
Hello all, We've added a new First resource document in the Restlet web site. You can get it at the following URL: http://www.restlet.org/documentation/1.1/firstResource (or http://www.restlet.org/documentation/1.0/firstResource, for Restlet 1.0). It simply describes how to create 2 basic

Re: How do I switch off log output?

2008-04-08 Thread Ian Clarke
Personally I blame the design of logging frameworks. I find them to be over-engineered, and unintuitive to use. I hate to say it, but maybe we need a new logging framework :-) Ian. On Tue, Apr 8, 2008 at 6:37 AM, Rob Heittman [EMAIL PROTECTED] wrote: Yes, it can be a bit of a challenge to

Re: Help! Weird timeout on GET to Restlet API

2008-04-08 Thread Rob Heittman
It seems that as you work with Restlet, you're running into a lot of things that have been a focus of work in the 1.1 cycle. This one was http://restlet.tigris.org/issues/show_bug.cgi?id=357 The 1.1 milestone builds don't totally fix the issue, but do cover a number of common cases (perhaps

Re: How do I switch off log output?

2008-04-08 Thread Ian Clarke
That didn't work, I think this is commons-logging, I don't have log4j on my classpath. Here is how I solved it: // Switch off logging (stupid f$%king logging frameworks!) component.getLogService().setEnabled(false);

Re: How do I switch off log output?

2008-04-08 Thread Rob Heittman
Heh. One of the guys at my office has been ad-hoc building his own personal logging framework to talk to the logging frameworks. Originally I was going to complain about this on principle, but in truth his code's delightfully easy to read -- simply because his logging classes are intentionally

Re: Authentication Helper/Guard help

2008-04-08 Thread Adam Rosien
Your resource needs to be wrapped (protected) by the Guard, rather than protecting a Router that routes to the Resource. Try something like this: Guard guard = new SharedSecretGuard(...); guard.setNext(UserResource.class); secureRouter.attach(/users/{username}, guard); .. Adam On Mon, Apr 7,

Re: Exception handling

2008-04-08 Thread Adam Rosien
That is correct. You'll have lots of code in your Resources that handles translating detectable errors and exceptions into either ResourceExceptions (or doing getResponse().setStatus(...) in 1.0 code). .. Adam On Tue, Apr 8, 2008 at 2:12 AM, Stephan Koops [EMAIL PROTECTED] wrote: Hi, is it

Tracking Request and Patterns

2008-04-08 Thread Sanjay Acharya
Hi, I am trying to develop a tracker to determine which pattern uri of a restlet service has been invoked. For example, an OrderApplication may support: /order /order/{orderId} /order/lineItem/{lineItemId} I would like to be able to intercept a request and place the pattern uri

StackOverFlow warning

2008-04-08 Thread Bao,Sam
Hi, I've seen a couple of other discussion about this in the past, but didn't know if there's been any progress. Anyways, I've encountered a java.lang.StackOverflowError when sending in a long attribute. Here's the warning I'm getting: Apr 8, 2008 10:59:58 AM org.restlet.util.Template match

Re: Problem with DomRepresentation

2008-04-08 Thread Stephan Koops
Hi Ludovic, It seems, that see server uses chuncked encoding here. Than the bb is the length of the next chunk, and the 0 says, that the end is reached. Take a look at http://tools.ietf.org/html/rfc2616#section-3.6.1 best regards Stephan Ludovic chaplin schrieb: bb ?xml version=1.0

Re: How do I switch off log output?

2008-04-08 Thread Kevin Conaway
So the solution to the confusion surrounding the various log frameworks in use by Restlet and its components isanother log framework? :) As much as I'm against using one of the bridge frameworks for logging, it might make sense for Restlet seeing as how the various components all could (and

Re: How do I switch off log output?

2008-04-08 Thread Ian Clarke
It seems ridiculous, I know, but unfortunately if all the existing options are over-engineered and hard to use, and produce spurious output in their default configuration, then the natural alternative is to create a framework that doesn't suffer from these problems. Of course, a simple solution

Re: Problem with DomRepresentation

2008-04-08 Thread Thierry Boileau
Hi Ludovic, I've tried several configurations[(standalone with Jetty or Simple connectors) and Servlet container] and Firefox2.0/IE7, and was not able to reproduce your problem. I'm using Restlet 1.0.9. Could you precise your context (Restlet version, server connector, client, etc)? best

Re: How do I switch off log output?

2008-04-08 Thread Adam Rosien
I think a well-written FAQ entry or explicit documentation page with recommended solutions would be the most practical solution to alleviating a lot of the pain of the logging conundrum. This page must be easy to find as this situation happens to every user of Restlet, and, well, sucks. .. Adam

Re: Problem with DomRepresentation

2008-04-08 Thread Thierry Boileau
Hello Ludovic, are you running your code from a servlet container? Or as a standalone application? Are you using Firefox, IE? best regards, Thierry Boileau Hello, I'm beginning with the RESTlet Framework and I trying to create a DomRepresentation of my ressource. I adapt the sample I

RE: Authentication Helper/Guard help

2008-04-08 Thread Barrie Selack
Adam, Thanks, that was the trick! Barrie Selack Rite Aid Corporation -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Rosien Sent: Tuesday, April 08, 2008 11:17 AM To: discuss@restlet.tigris.org Subject: Re: Authentication Helper/Guard help Your

Re: How do I switch off log output?

2008-04-08 Thread Rob Heittman
After musing about this for a few hours, I wonder if the core of the frustration is the lack of any standard way for a Java component vendor to expose artifacts that communicate (at a machine-understandable level) - What logging framework the component uses - What logging keys or properties are

Re: How do I switch off log output?

2008-04-08 Thread Michael McCallum
sfl4j in a nutshell... you write all your code and all the libraries write code againsts a simple api.. which has not deps and no implementation when someone decides they actually wish to run the code and log the results they choose the implementation - be that logback, juli, log4j etc etc -

Re: Serving PDF content

2008-04-08 Thread Avi Flax
On Wed, Mar 26, 2008 at 3:03 PM, Jerome Louvel [EMAIL PROTECTED] wrote: Hi Avi, Why don't you try using an InputRepresentation instead? It is a concrete class, you just need to pass an InputStream (ex: ByteArrayInputStream). Thanks Jerome, that's perfect. For some reason I missed that

Re: StackOverFlow warning

2008-04-08 Thread William Pietri
Bao,Sam wrote: I'm sorry, but I don't set up the template at all. Is that where I'm going wrong? Should I be setting a template? I'm just using createRoot() to init the router, and register my resource as such: * * *public* *synchronized* Restlet createRoot() { Router router = *new*

RE: Re: StackOverFlow warning

2008-04-08 Thread Bao,Sam
Ah, that seems to get through all the template stuff, and at that point, I can indeed extract the attributes myself. I agree it's a roundabout way to do it instead of using the router functionality, but no more hackish than using the post to do a get. I'll keep going down this path and see

Small glitch in Freemarker dependency?

2008-04-08 Thread Konstantin Läufer
Hi, The org.restlet.ext.freemarker 1.1-M3 dependency on Freemarker reads as follows: dependency groupIdfreemarker/groupId artifactIdfreemarker/artifactId version2.3.11/version /dependency However, there is no corresponding entry in the official Maven