You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ivaschenko, Aleksei V (JIRA)" <ji...@apache.org> on 2007/04/12 10:54:32 UTC

[jira] Updated: (HARMONY-3631) [classlib][luni][nio] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception

     [ https://issues.apache.org/jira/browse/HARMONY-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivaschenko, Aleksei V updated HARMONY-3631:
-------------------------------------------

    Summary: [classlib][luni][nio] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception  (was: [classlib][luni] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception)

> [classlib][luni][nio] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3631
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3631
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows and Linux
>            Reporter: Ivaschenko, Aleksei V
>         Attachments: luni.patch, NIOTest.java
>
>
> The attached test creatres non-blocking SocketChannel connection and writes into channel untinl socket output buffer become overfull and further write operations will not write even one byte. This is normal situation according to SocketChannel spec and no exceptions should be thrown. But the test fails on Harmony with exception:
> java.lang.NoSuchMethodError: init
>         at org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketDirectImpl(Native Method)
>         at org.apache.harmony.luni.platform.OSNetworkSystem.writeDirect(OSNetworkSystem.java:105)
>         at org.apache.harmony.nio.internal.SocketChannelImpl.writeImpl(SocketChannelImpl.java:557)
>         at org.apache.harmony.nio.internal.SocketChannelImpl.write(SocketChannelImpl.java:491)
>         ...
> This exception is generated by JNI call to GetMethodID while attempt to find java.net.SocketException constructor by name "init" instead of "<init>".
> This part of the issue could be fixed with attached patch. Even when this is fixed, the test continue to fail with unexpected exception (but with another one):
> java.net.SocketException: The socket is marked as nonblocking operation would block
>         at org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketDirectImpl(Native Method)
>         at org.apache.harmony.luni.platform.OSNetworkSystem.writeDirect(OSNetworkSystem.java:105)
>         at org.apache.harmony.nio.internal.SocketChannelImpl.writeImpl(SocketChannelImpl.java:557)
>         at org.apache.harmony.nio.internal.SocketChannelImpl.write(SocketChannelImpl.java:491)
>         ...
> It's a reasonable exception for non-blocking connections, but according to spec it shouldn't be thrown - write method of SocketChannel should return 0 instead.
> This issue also leads Jetty scenario (HARMONY-3530) to fail.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.