Restelt Client Internal Connector Error (1002)

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

Restelt Client Internal Connector Error (1002)

chirayu
I am using a restlet 2.1 client sever based architecture, my client times out within 1 minute after sending the request. and I get the following exception :
Internal Connector Error (1002) - The calling thread timed out while waiting for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);


how should I configure my client resource to avoid timeout ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Jerome Louvel-3
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

chirayu
No the request processing at server may or maynot take more than 1 minute, which means that the server may not necessaryly respond before timeout.

On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] <[hidden email]> wrote:
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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




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-tp7579347p7579348.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Jerome Louvel-3
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

Jerome


On Tue, Mar 10, 2015 at 2:13 PM, Chirayu Desai <[hidden email]> wrote:
No the request processing at server may or maynot take more than 1 minute, which means that the server may not necessaryly respond before timeout.

On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] <[hidden email]> wrote:
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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




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-tp7579347p7579348.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)

Sent from the Restlet Discuss mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Fabian Mandelbaum
Another possible solution with such requests, which may take LONG to process, is to have the server return HTTP 202 (Accepted) as soon as it's ready to process the request, and the client knows its request will be processed later.

Of course, you may also need another server resource to query the status of such "to be processed later" requests.

HTH


On Tue, Mar 10, 2015 at 8:52 PM, Jerome Louvel <[hidden email]> wrote:
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

Jerome


On Tue, Mar 10, 2015 at 2:13 PM, Chirayu Desai <[hidden email]> wrote:
No the request processing at server may or maynot take more than 1 minute, which means that the server may not necessaryly respond before timeout.

On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] <[hidden email]> wrote:
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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




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-tp7579347p7579348.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)

Sent from the Restlet Discuss mailing list archive at Nabble.com.




--
Fabián Mandelbaum
IS Engineer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

chirayu
I am able to reslove the time out issue but using the org.restlet.ext.http connector i am unable to send objects as method arguments from client to server,and am getting illegal argument and null pointer exceptions.

On Wed, Mar 11, 2015 at 7:18 PM, Fabian Mandelbaum [via Restlet Discuss] <[hidden email]> wrote:
Another possible solution with such requests, which may take LONG to process, is to have the server return HTTP 202 (Accepted) as soon as it's ready to process the request, and the client knows its request will be processed later.

Of course, you may also need another server resource to query the status of such "to be processed later" requests.

HTH


On Tue, Mar 10, 2015 at 8:52 PM, Jerome Louvel <[hidden email]> wrote:
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

Jerome


On Tue, Mar 10, 2015 at 2:13 PM, Chirayu Desai <[hidden email]> wrote:
No the request processing at server may or maynot take more than 1 minute, which means that the server may not necessaryly respond before timeout.

On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] <[hidden email]> wrote:
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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




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-tp7579347p7579348.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)

Sent from the Restlet Discuss mailing list archive at Nabble.com.




--
Fabián Mandelbaum
IS Engineer



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-tp7579347p7579351.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Thierry Boileau-4
Hello,

>but using the org.restlet.ext.http connector i am unable to send objects as method arguments from client to server,
Could you give a little bit more details on how you send objects, and perhaps better could you show some sample code?

>and am getting illegal argument and null pointer exceptions.
are you issuing such exceptions on client side or server side?
Do you have any stack trace?

Best regards,
Thierry Boileau




and am getting illegal argument and null pointer exceptions.

2015-03-12 9:28 GMT+01:00 Chirayu Desai <[hidden email]>:
I am able to reslove the time out issue but using the org.restlet.ext.http connector i am unable to send objects as method arguments from client to server,and am getting illegal argument and null pointer exceptions.

On Wed, Mar 11, 2015 at 7:18 PM, Fabian Mandelbaum [via Restlet Discuss] <[hidden email]> wrote:
Another possible solution with such requests, which may take LONG to process, is to have the server return HTTP 202 (Accepted) as soon as it's ready to process the request, and the client knows its request will be processed later.

Of course, you may also need another server resource to query the status of such "to be processed later" requests.

HTH


On Tue, Mar 10, 2015 at 8:52 PM, Jerome Louvel <[hidden email]> wrote:
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

Jerome


On Tue, Mar 10, 2015 at 2:13 PM, Chirayu Desai <[hidden email]> wrote:
No the request processing at server may or maynot take more than 1 minute, which means that the server may not necessaryly respond before timeout.

On Wed, Mar 11, 2015 at 2:37 AM, Jerome Louvel-3 [via Restlet Discuss] <[hidden email]> wrote:
Hello Chirayu,

Is your server supposed to answer before the timeout observed?
Also, are you be able to upgrade to version 2.3.1 ("stable")?

Best regards,
Jerome


On Tue, Mar 10, 2015 at 1:04 PM, Chirayu Desai <[hidden email]> wrote:
I am using a restlet 2.1 client sever based architecture, my client times out
within 1 minute after sending the request. and I get the following exception
:
Internal Connector Error (1002) - The calling thread timed out while waiting
for a response to unblock it.
        at org.restlet.resource.ClientResource$1.invoke(ClientResource.java:1663)
        at com.sun.proxy.$Proxy17.getTaskList(Unknown Source)....

My code is as below :

import org.restlet.resource.ClientResource;

*ClientResource cr = new ClientResource(uri);
MyResource resource= cr.wrap(MyResource .class);
                                updateStatus = resource.updateData(Parameter);*

how should I configure my client resource to avoid timeout ?



--
View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restelt-Client-Internal-Connector-Error-1002-tp7579347.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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




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-tp7579347p7579348.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)

Sent from the Restlet Discuss mailing list archive at Nabble.com.




--
Fabián Mandelbaum
IS Engineer



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-tp7579347p7579351.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)
Sent from the Restlet Discuss mailing list archive at Nabble.com.



--
Thierry Boileau, Mr B


6 Rue Rose Dieng-Kuntz • Nantes, 44300  France
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Thierry Templier-3
In reply to this post by Jerome Louvel-3

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]> a écrit :
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

Jerome
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

chirayu
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]> 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]> a écrit :
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

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



--
-Regards,
-Chirayu Desai
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

Thierry Boileau-4
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 <[hidden email]>:
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]> 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]> a écrit :
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

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



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)
Sent from the Restlet Discuss mailing list archive at Nabble.com.



--
Thierry Boileau, Mr B


6 Rue Rose Dieng-Kuntz • Nantes, 44300  France
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Restelt Client Internal Connector Error (1002)

chirayu
Some responses from server may take time however the one in the code snippet wont.
yes setting timeout on client works fine i can make the client wait for more the the default time out of one minute, already tested it.

On Mon, Mar 16, 2015 at 8:02 PM, Thierry Boileau-4 [via Restlet Discuss] <[hidden email]> wrote:
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 <[hidden email]>:
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]> 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]> a écrit :
If you need to stick with version 2.1, I recommend using the Apache HTTP Client extension (see "socketTimeout" parameter):

or the Net HTTP Client extension (see "readTimeout" parameter):

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



--
-Regards,
-Chirayu Desai


View this message in context: Re: Restelt Client Internal Connector Error (1002)
Sent from the Restlet Discuss mailing list archive at Nabble.com.



--
Thierry Boileau, Mr B


6 Rue Rose Dieng-Kuntz • Nantes, 44300  France



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-tp7579347p7579361.html
To unsubscribe from Restelt Client Internal Connector Error (1002), click here.
NAML



--
-Regards,
-Chirayu Desai
Loading...