You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Dmitry M. Kononov (JIRA)" <ji...@apache.org> on 2006/05/23 14:31:29 UTC

[jira] Created: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

[classlib][luni] java.net.MulticastSocket cannot be instantiated.
-----------------------------------------------------------------

         Key: HARMONY-497
         URL: http://issues.apache.org/jira/browse/HARMONY-497
     Project: Harmony
        Type: Bug

  Components: Classlib  
    Reporter: Dmitry M. Kononov


There is no possibility to instantiate a java.net.MulticastSocket object.
It looks like some code has not been updated after some refactoring.

The following code

---
public class MulticastSocketTest {
    public static void main(String args[]) throws Exception {
        new java.net.MulticastSocket();
    }
}
---

throws the following exception

---
java.net.SocketException: Unknown socket type
    at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
    at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
    at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
    at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
    at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
    at MulticastSocketTest.main(MulticastSocketTest.java:4)
---

If you look at the MulticastSocket.createSocketImpl method you will see 
that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
org.apache.harmony.luni.net package.

Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
The following exception still occurs.

---
java.net.SocketException: Unknown socket type
    at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
    at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
    at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
    at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
    at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
    at MulticastSocketTest.main(MulticastSocketTest.java:4)
Caused by: java.lang.IllegalAccessException
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1238)
    at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
    ... 5 more
---


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

Posted by "Richard Liang (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-497?page=all ]

Richard Liang updated HARMONY-497:
----------------------------------

    Attachment: Harmony497.diff

Hello,

Please apply the patch on luni. Thanks a lot.

Best regards,
Richard

> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-497?page=all ]

Mark Hindess reassigned HARMONY-497:
------------------------------------

    Assign To: Mark Hindess

> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Assignee: Mark Hindess
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-497?page=all ]
     
Mark Hindess resolved HARMONY-497:
----------------------------------

    Resolution: Fixed

Patch applied in r413812.  Dmitry, please confirm that this resolves the issue.


> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Assignee: Mark Hindess
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

Posted by "Dmitry M. Kononov (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/HARMONY-497?page=comments#action_12415974 ] 

Dmitry M. Kononov commented on HARMONY-497:
-------------------------------------------

The issue looks fixed. Thanks!

> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Assignee: Mark Hindess
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (HARMONY-497) [classlib][luni] java.net.MulticastSocket cannot be instantiated.

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-497?page=all ]
     
Mark Hindess closed HARMONY-497:
--------------------------------


Verified by Dmitry.


> [classlib][luni] java.net.MulticastSocket cannot be instantiated.
> -----------------------------------------------------------------
>
>          Key: HARMONY-497
>          URL: http://issues.apache.org/jira/browse/HARMONY-497
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Dmitry M. Kononov
>     Assignee: Mark Hindess
>  Attachments: Harmony497.diff
>
> There is no possibility to instantiate a java.net.MulticastSocket object.
> It looks like some code has not been updated after some refactoring.
> The following code
> ---
> public class MulticastSocketTest {
>     public static void main(String args[]) throws Exception {
>         new java.net.MulticastSocket();
>     }
> }
> ---
> throws the following exception
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> ---
> If you look at the MulticastSocket.createSocketImpl method you will see 
> that the java.net.PlainMulticastSocketImpl class is used to instantiate an object. There is 
> no PlainMulticastSocketImpl class in the java.net package. It has been moved into the 
> org.apache.harmony.luni.net package.
> Sadly, replacing the java.net package with the org.apache.harmony.luni.net one does not solve the problem.
> The following exception still occurs.
> ---
> java.net.SocketException: Unknown socket type
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:633)
>     at java.net.MulticastSocket.createSocket(MulticastSocket.java:546)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:72)
>     at java.net.DatagramSocket.<init>(DatagramSocket.java:57)
>     at java.net.MulticastSocket.<init>(MulticastSocket.java:46)
>     at MulticastSocketTest.main(MulticastSocketTest.java:4)
> Caused by: java.lang.IllegalAccessException
>     at java.lang.Class.newInstanceImpl(Native Method)
>     at java.lang.Class.newInstance(Class.java:1238)
>     at java.net.MulticastSocket.createSocketImpl(MulticastSocket.java:631)
>     ... 5 more
> ---

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira