Hello, some things are not clear to me: - are you sure the server answers quickly, or do know that the server takes time? - when you set up time out on client side, does it have any effect?
Best regards, Thierry Boileau 2015-03-16 6:11 GMT+01:00 Chirayu Desai <chir...@purpledocs.com>: > Hi, > Followin are my code snippets: > > At Client RESTLet : > > @Override > public Task getTask(int taskId) { > > logger.debug(" RESTLetTaskDAO.getTask taskid = {} ", taskId); > Task task = null; > try { > final Context context = new Context(); > context.getParameters().set("socketTimeout", "120000"); > > String url = RESTLetWebSvcsFactory.getFactoryInstance().getServer_URL() + > "task/" > +sessionId; > ClientResource cr = new ClientResource(context,url); > TaskResource resource = cr.wrap(TaskResource.class); > *task = resource.getTask(taskId);* > } > catch (ResourceException re) { > int statusCode = new RESTLetErrorHandler().handleServerError(re); > if (statusCode != -1){ > throw new CRUDException(statusCode); > } > } > return task; > } > > > At Server Restlet : > > @Get > public Task getTask(int taskId) throws CRUDException, > SessionTerminatedException { > > String userSessionId = (String) > this.getRequest().getAttributes().get("sessionid"); > TaskDAO taskDAO = DAOFactory.getDefaultFactory().getTaskDAO(); > Task task = taskDAO.getTask(taskId); > if (task != null) { > logger.trace("TaskResourceImpl.getTask sessionid = {}, task fetched = > {}",task.toFormattedString()); > } > else { > logger.error("TaskResourceImpl.getTask No task matching criteria found - > task is null"); > } > return task; > } > > > The error log At server : > > 16 Mar 2015 10:27:00 INFO - 2015-03-16 10:27:00 127.0.0.1 - 127.0.0.1 > 8080 GET > /purpledocsstar_svr/tasks/0/0/null/0/all/null/null/c300647c-7fcb-45bf-a45a-9d7cf87b4598 > - 200 - 0 60026 http://localhost:8080 Restlet-Framework/2.0.13 - > 16 Mar 2015 10:27:09 DEBUG - ErrorStatusService.getStatus code Throwable > throwable,UniformResource resource > 16 Mar 2015 10:27:09 DEBUG - ErrorStatusService.getStatus Throwable > throwable, Request request, Response response > 16 Mar 2015 10:27:09 INFO - ErrorStatusService.getStatus - throwable NOT > instanceof DBCRUDException > 16 Mar 2015 10:27:09 INFO - ErrorStatusService.getStatus - throwable NOT > instanceof DBCRUDException > 16 Mar 2015 10:27:09 WARN - Exception or error caught in resource > java.lang.IllegalArgumentException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at org.restlet.resource.ServerResource.doHandle(ServerResource.java:449) > at org.restlet.resource.ServerResource.get(ServerResource.java:648) > at org.restlet.resource.ServerResource.doHandle(ServerResource.java:530) > at > org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:590) > at > org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:302) > at org.restlet.resource.ServerResource.handle(ServerResource.java:849) > at org.restlet.resource.Finder.handle(Finder.java:513) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Router.doHandle(Router.java:500) > at org.restlet.routing.Router.handle(Router.java:740) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at > org.restlet.engine.application.StatusFilter.doHandle(StatusFilter.java:154) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114) > at > org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:75) > at org.restlet.Application.handle(Application.java:391) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Router.doHandle(Router.java:500) > at org.restlet.routing.Router.handle(Router.java:740) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.routing.Router.doHandle(Router.java:500) > at org.restlet.routing.Router.handle(Router.java:740) > at org.restlet.routing.Filter.doHandle(Filter.java:159) > at org.restlet.routing.Filter.handle(Filter.java:206) > at org.restlet.engine.ChainHelper.handle(ChainHelper.java:114) > at org.restlet.Component.handle(Component.java:391) > at org.restlet.Server.handle(Server.java:491) > at org.restlet.engine.ServerHelper.handle(ServerHelper.java:74) > at > org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:153) > at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1031) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > at > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) > at > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) > at > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) > at > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313) > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > > > > I am usin the org.restlet.ext.httpclient.HttpClientHelper connector and as > I wrote eariler and client to server method call communication between > restlet layers , with methods containting arguments say integer, string or > even objects is not working for me. However i am able to configure the > socket timeout manually through this. > > > > On Thu, Mar 12, 2015 at 8:54 PM, Thierry Templier-3 [via Restlet Discuss] > <[hidden email] <http:///user/SendEmail.jtp?type=node&node=7579356&i=0>> > wrote: > >> Hello, >> >> For your information, I answered to your StackOverflow question (see >> http://stackoverflow.com/questions/28973184/restlet-client-internal-connector-error-1002/28975178#28975178) >> . >> >> Thierry >> Le 11 mars 2015 00:52, "Jerome Louvel" <[hidden email] >> <http:///user/SendEmail.jtp?type=node&node=7579354&i=0>> a écrit : >> >>> If you need to stick with version 2.1, I recommend using the Apache HTTP >>> Client extension (see "socketTimeout" parameter): >>> >>> http://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jee/ext/org/restlet/ext/httpclient/HttpClientHelper.html >>> >>> or the Net HTTP Client extension (see "readTimeout" parameter): >>> >>> http://restlet.com/technical-resources/restlet-framework/javadocs/2.1/jee/ext/org/restlet/ext/net/HttpClientHelper.html >>> >>> Jerome >>> >> >> >> ------------------------------ >> If you reply to this email, your message will be added to the >> discussion below: >> >> http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347p7579354.html >> To unsubscribe from Restelt Client Internal Connector Error (1002), click >> here. >> NAML >> <http://restlet-discuss.1400322.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >> > > > > -- > -Regards, > -Chirayu Desai > > ------------------------------ > View this message in context: Re: Restelt Client Internal Connector Error > (1002) > <http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347p7579356.html> > Sent from the Restlet Discuss mailing list archive > <http://restlet-discuss.1400322.n2.nabble.com/> at Nabble.com. > -- *Thierry Boileau, Mr B* +1 (408) 387-3184 • tboil...@restlet.com <http://restlet.com/> 6 Rue Rose Dieng-Kuntz • Nantes, 44300 • France ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3105605