RE: BufferOverflowException v2.1
Was getting the same error with JEE 2.1-M1. Just tested with JEE 2.1-M2 and it seems like its been fixed. Don't get the BufferOverflow anymore Cheers! Nirav -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/BufferOverflowException-v2-1-tp5813158p6039439.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2705324
RE: BufferOverflowException v2.1
It is indeed the same issue and one that was also part of another thread. I separated it out again so as not to confuse one with the other. Anyway, whilst the release notes for the latest 2.1 snapshot *do* suggest that this issue is resolved, my testing shows otherwise (hence Jermone asking me to provide an example unit test below). I was using the snapshot from 2 days ago, so unless it has been fixed since then (the mention of the bug fix *was* in the version I used), then I suspect it is still an outstanding issue, or at least one which requires a few detailed instructions to ensure that the setting is applied such that the Restlet engine will honour it. I am awaiting Jermone's response on this. Below he has suggest they will pick this one up again for the next ,milestone drop. Have you tested the fix. Can you confirm that you can use response streams greater than the default 8K. If so, an example of how (and where) you applied the associated system property would be welcome ? Fraser. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2689332
RE: BufferOverflowException v2.1
Hi, I think this is the same issue as discussed here: http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2682395 It's been fixed in the latest 2.1 snapshot. > Sure. > > Not sure how you normally do this, but here is a JUnit test class which > exercises a slightly modified MailServerApplication example from the samples. > The test class has 2 tests :- > > - GETwithBelow8KResponse (this works) > - GETwithAbove8KResponse (this fails with the buffer overflow exception) > > I set the org.restlet.engine.io.bufferSize property in the test class (to > 100K) and show in the ServerResource class doInit() method that it *does* > retain that value (the same behaviour if I set in as a VM arg). > > Hope this helps > > Regards > > Fraser -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2689135
RE: BufferOverflowException v2.1
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:goff...@gmail.com] Envoyé : mardi 7 décembre 2010 21:47 À : discuss@restlet.tigris.org 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 &g
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-NoSuchMethodError-on-Router-attach-tp5782099p5807795.html > Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.t
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-NoSuchMethodError-on-Router-attach-tp5782099p5807795.html > Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.t