Error : java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Error : java.lang.IllegalStateException: The Web form cannot be parsed as no fresh content is available

nisha
This post has NOT been accepted by the mailing list yet.


Hi,

I am using restlet framework to create webservice api.
I am using Advanced restclient plugin of chrome and i am uploading the file where i set MIME TYPE as application/vnd.ms-excel as its CSV file. When i say send the request to the server i am getting below error:

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:979)
at org.restlet.data.Form.<init>(Form.java:84)
at org.restlet.data.Form.<init>(Form.java:133)

Where i server side code handling post request as follows

protected Representation postWithResult(Object contextObject, Representation request) throws BusinessException {

Form form = new Form(request);
}


As request i am getting MIME Type as multipart/form-data.

Can you please help me and please let me know if you need more details.

Loading...