I making a simple put method to update a patient's address, it updates the
patient but it takes a lot of time and enters an infinite loop so thats
weird and it outputs the following exceptions:

At the client:
Exception in thread "main" Communication Error (1001) - The connector failed
to complete the communication with the server
        at org.restlet.resource.ClientResource.doError(ClientResource.java:582)
        at
org.restlet.engine.resource.ClientInvocationHandler.invoke(ClientInvocationHandler.java:236)
        at $Proxy9.putAddress(Unknown Source)
        at testsultan.client.TestClient.main(TestClient.java:59)
Java Result: 1

At the server:
Starting the internal [HTTP/1.1] server on port 8182
in Hbase Server
This patient is already available
Patient Added
2012-04-27      22:53:44        127.0.0.1       -       -       8182    PUT     
/test/addpatient        -       200     0       -       160
http://localhost:8182   Restlet-Framework/2.1rc3        -
in Hbase Server
123456
info:address => 
Janaklees; info:bloodGroup => 
B; info:dateOfBirth => 
Thu Nov 10 00:00:00 EET 3870; info:fullname => 
Ahmed Hassan; info:gender => 
MALE; info:maritalStatus => 
MARRIED; 
info:address => 
Janaklees; info:bloodGroup => 
B; info:dateOfBirth => 
Thu Nov 10 00:00:00 EET 3870; info:fullname => 
Ahmed Hassan; info:gender => 
MALE; info:maritalStatus => 
MARRIED; 
2012-04-27      22:53:44        127.0.0.1       -       -       8182    GET     
/test/123456/retrievepatient    -
200     188     0       14      http://localhost:8182   
Restlet-Framework/2.1rc3        -
in Hbase Server
123456
info:address => 
Janaklees; info:bloodGroup => 
B; info:dateOfBirth => 
2012-04-27      22:53:44        127.0.0.1       -       -       8182    GET     
/test/123456/retrievepatient    -
200     188     0       9       http://localhost:8182   
Restlet-Framework/2.1rc3        -
Thu Nov 10 00:00:00 EET 3870; info:fullname => 
Ahmed Hassan; info:gender => 
MALE; info:maritalStatus => 
MARRIED; 
info:address => 
Janaklees; info:bloodGroup => 
B; info:dateOfBirth => 
Thu Nov 10 00:00:00 EET 3870; info:fullname => 
Ahmed Hassan; info:gender => 
MALE; info:maritalStatus => 
MARRIED; 
in Hbase Server
12356
In Patient Delete Method
This patient is not available
Patient Deleted
2012-04-27      22:53:44        127.0.0.1       -       -       8182    DELETE  
/test/12356/deletepatient       -
200     0       5       9       http://localhost:8182   
Restlet-Framework/2.1rc3        -
Unable to block the thread at the cyclic barrier

java.util.concurrent.TimeoutException
in Hbase Server
Patient be4 Update
        at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:222)
        at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:399)
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:179)
        at
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:228)
        at org.restlet.engine.io.Buffer.process(Buffer.java:597)
        at
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:305)
        at java.io.InputStream.read(InputStream.java:82)
        at org.restlet.engine.io.BioUtils.exhaust(BioUtils.java:238)
Patient Updated
        at
org.restlet.representation.Representation.exhaust(Representation.java:247)
        at
org.restlet.engine.connector.ServerOutboundWay.onCompleted(ServerOutboundWay.java:174)
        at
org.restlet.engine.connector.HttpServerOutboundWay.onCompleted(HttpServerOutboundWay.java:117)
        at
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:410)
        at org.restlet.engine.connector.Way.onSelected(Way.java:412)
        at
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
        at 
org.restlet.engine.connector.Connection.onSelected(Connection.java:603)
        at
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
        at
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:200)
        at
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
        at
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:273)
        at
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:153)
        at org.restlet.engine.connector.Controller.run(Controller.java:158)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
Unable to automatically exhaust the request entity.

java.io.IOException: Unable to block the thread at the cyclic barrier.
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:183)
        at
org.restlet.engine.io.NbChannelInputStream.onFill(NbChannelInputStream.java:228)
        at org.restlet.engine.io.Buffer.process(Buffer.java:597)
        at
org.restlet.engine.io.NbChannelInputStream.read(NbChannelInputStream.java:305)
        at java.io.InputStream.read(InputStream.java:82)
        at org.restlet.engine.io.BioUtils.exhaust(BioUtils.java:238)
        at
org.restlet.representation.Representation.exhaust(Representation.java:247)
        at
org.restlet.engine.connector.ServerOutboundWay.onCompleted(ServerOutboundWay.java:174)
        at
org.restlet.engine.connector.HttpServerOutboundWay.onCompleted(HttpServerOutboundWay.java:117)
        at
org.restlet.engine.connector.OutboundWay.processIoBuffer(OutboundWay.java:410)
        at org.restlet.engine.connector.Way.onSelected(Way.java:412)
        at
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
        at 
org.restlet.engine.connector.Connection.onSelected(Connection.java:603)
        at
org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:295)
        at
org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:200)
        at
org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:99)
        at
org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:273)
        at
org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:153)
        at org.restlet.engine.connector.Controller.run(Controller.java:158)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.util.concurrent.TimeoutException
        at java.util.concurrent.CyclicBarrier.dowait(CyclicBarrier.java:222)
        at java.util.concurrent.CyclicBarrier.await(CyclicBarrier.java:399)
        at
org.restlet.util.SelectionRegistration.block(SelectionRegistration.java:179)
        ... 24 more
*2012-04-27     22:54:44        127.0.0.1       -       -       8182    PUT     
/test/updatepatient     -       200     0       *-
29      http://localhost:8182   Restlet-Framework/2.1rc3        -

Although as seen get, put, delete methods worked before..

http://restlet-discuss.1400322.n2.nabble.com/file/n7507409/UpdatePatientAddressServerResource.java
UpdatePatientAddressServerResource.java 
http://restlet-discuss.1400322.n2.nabble.com/file/n7507409/UpdatePatientAddressResource.java
UpdatePatientAddressResource.java 
http://restlet-discuss.1400322.n2.nabble.com/file/n7507409/TestClient.java
TestClient.java 
http://restlet-discuss.1400322.n2.nabble.com/file/n7507409/Testsultan.java
Testsultan.java 



--
View this message in context: 
http://restlet-discuss.1400322.n2.nabble.com/Restlet-Put-Method-infinite-loop-tp7507409.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

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

Reply via email to