Hi Stephane,

This error means that the entity has already been read by the time  
your resource starts executing.  This might happen in a filter, for  
example.  AFAIK, the SpringBeanRouter (and its various helpers) do not  
touch the entity.

Rhett

On May 13, 2009, at 9:17 AM, Stephane Nicoll wrote:

> Any idea?
>
> Thanks,
> Stéphane
>
> On Sat, May 9, 2009 at 5:21 PM, Stephane Nicoll <[email protected] 
> > wrote:
> Hi,
>
> We move recently to the Spring integration (SpringBeanRouter and  
> RestletFrameworkServlet). Since then, we have a resource that does  
> not behave properly (and not on all environments)
>
> "The Web form cannot be parsed as no fresh content is available. If  
> this entity has been already read once, caching of the entity is  
> required"
>
> And the stacktrace is:
>
> java.lang.IllegalStateException: The Web form cannot be parsed as no  
> fresh content is available. If this entity has been already read  
> once, caching of the entity is required
>         at com.noelios.restlet.util.FormUtils.parse(FormUtils.java: 
> 243)
>
>
>         at com.noelios.restlet.Engine.parse(Engine.java:978)
>         at org.restlet.data.Form.<init>(Form.java:84)
>         at org.restlet.data.Form.<init>(Form.java:133)
>         at org.restlet.data.Message.getEntityAsForm(Message.java:193)
>
>
>         at  
> com 
> .erdas 
> .rsp 
> .babel 
> .service 
> .rest.resource.service.ServicesResource.init(ServicesResource.java:64)
>         at  
> org.restlet.ext.spring.SpringFinder.createTarget(SpringFinder.java: 
> 133)
>         at  
> org.restlet.ext.spring.SpringFinder.createTarget(SpringFinder.java:68)
>
>
>         at org.restlet.Finder.findTarget(Finder.java:240)
>         at org.restlet.Finder.handle(Finder.java:329)
>         at org.restlet.Filter.doHandle(Filter.java:150)
>         at org.restlet.Filter.handle(Filter.java:195)
>
>
>         at org.restlet.Router.handle(Router.java:504)
>         at org.restlet.Filter.doHandle(Filter.java:150)
>         at org.restlet.Filter.handle(Filter.java:195)
>         at org.restlet.Filter.doHandle(Filter.java:150)
>
>
>
> This exception is thrown when we call the getEntityAsForm on the  
> resource.
>
> Any idea? We're using restlet 1.1.4, Linux, JDK6, Spring 2.5.6
>
> Thanks,
> Stéphane
> -- 
> Large Systems Suck: This rule is 100% transitive. If you build one,  
> you suck" -- S.Yegge
>
>
>
> -- 
> Large Systems Suck: This rule is 100% transitive. If you build one,  
> you suck" -- S.Yegge

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2244510

Reply via email to