Hi Fraser, This looks like a bug. Could you provide a small (JUnit) test case to reproduce it. We'll try to fix this for the upcoming 2.1 M2 version.
Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -----Message d'origine----- De : Fraser Goffin [mailto:[email protected]] Envoyé : mardi 7 décembre 2010 21:47 À : [email protected] Objet : BufferOverflowException v2.1 (separated from previous topic) Guido thanks for the advice. However ... I have tried again to resolve this problem by using the latest 2.1 snapshot but still to no avail. I set the property as early as I can(actually as a launch argument using -D{property-name}, that is, long before the Restlet Application class has been initialized, but, although the property resorts the value set, the BufferOverfloeException remains ?? Previous message ;- 05-Dec-2010 23:57:06 org.restlet.engine.connector.OutboundWay onSelected WARNING: Error while writing an HTTP message java.nio.BufferOverflowException at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:180) at org.restlet.engine.io.InputStreamChannel.read(InputStreamChannel.java:173) at org.restlet.engine.io.InputStreamChannel.read(InputStreamChannel.java:146) at org.restlet.engine.io.ReadableChunkingChannel.read(ReadableChunkingChannel.java:120) at org.restlet.engine.connector.OutboundWay.fillByteBuffer(OutboundWay.java:207) at org.restlet.engine.connector.OutboundWay.onSelected(OutboundWay.java:359) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:241) at org.restlet.engine.connector.Connection.onSelected(Connection.java:519) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:241) at org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:183) at org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:107) at org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:236) at org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:142) at org.restlet.engine.connector.Controller.run(Controller.java:274) at org.restlet.engine.connector.ServerConnectionController.run(ServerConnectionController.java:176) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:810) 05-Dec-2010 23:57:06 org.restlet.engine.connector.OutboundWay onSelected INFO: Error while writing an HTTP message java.nio.BufferOverflowException at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:180) at org.restlet.engine.io.InputStreamChannel.read(InputStreamChannel.java:173) at org.restlet.engine.io.InputStreamChannel.read(InputStreamChannel.java:146) at org.restlet.engine.io.ReadableChunkingChannel.read(ReadableChunkingChannel.java:120) at org.restlet.engine.connector.OutboundWay.fillByteBuffer(OutboundWay.java:207) at org.restlet.engine.connector.OutboundWay.onSelected(OutboundWay.java:359) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:241) at org.restlet.engine.connector.Connection.onSelected(Connection.java:519) at org.restlet.util.SelectionRegistration.onSelected(SelectionRegistration.java:241) at org.restlet.engine.connector.ConnectionController.onSelected(ConnectionController.java:183) at org.restlet.engine.connector.ServerConnectionController.onSelected(ServerConnectionController.java:107) at org.restlet.engine.connector.ConnectionController.selectKeys(ConnectionController.java:236) at org.restlet.engine.connector.ConnectionController.doRun(ConnectionController.java:142) at org.restlet.engine.connector.Controller.run(Controller.java:274) at org.restlet.engine.connector.ServerConnectionController.run(ServerConnectionController.java:176) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:432) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:284) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:810) Fraser > Hi, > the current implementation in IOUtils is > > public static final int BUFFER_SIZE = getProperty( > "org.restlet.engine.io.bufferSize", 8192); > > This is executed only once, afaik at module loading time. A call to > setProperty should therefore be done before anything of the RESTlet > engine is loaded, or even on the commandline with a -D parameter to > the java runtime. > > BTW, I tested this setting with a value of -1. Throws a nice exception > without any test coding. > > Guido Schmidt. > -- > View this message in context: > http://restlet-discuss.1400322.n2.nabble.com/Serialization-example-NoS > uchMethodError-on-Router-attach-tp5782099p5807795.html > Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2688566 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2688573

