Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4375118

Serialization of org.omg.CosNaming._BindingIteratorStub fails

XMLWordPrintable

    • sparc
    • solaris_2.6



      Name: ooR10001 Date: 09/29/2000


      Object of org.omg.CosNaming._BindingIteratorStub class can not be serialized.
      The following test example shows a bug:
      ---------------------
      public class test {

        public static void main(String[] args) {
                  org.omg.CosNaming._BindingIteratorStub m =
                      new org.omg.CosNaming._BindingIteratorStub();
              try {
                  java.io.ObjectOutputStream oos =
                      new java.io.ObjectOutputStream(
                          new java.io.ByteArrayOutputStream());
                  oos.writeObject(m);
                  oos.close();
      } catch (java.io.IOException e) {
                  System.out.println("FAILED:" + e);
      }
          }
      }
      -----------------------
      Output:
      -----------------------
      Exception in thread "main" java.lang.SecurityException: ORBSingleton: access denied
              at com.sun.corba.se.internal.corba.ORBSingleton.object_to_string(ORBSingleton.java:305)
              at org.omg.CosNaming._BindingIteratorStub.writeObject(_BindingIteratorStub.java:124)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1878)
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
              at test.main(test.java:10)
      -----------------------
      It needs to be fixed.

      Jusification:
      ======================================================================

            hputtaswsunw Hemanth Puttaswamy (Inactive)
            oovsunw Oov Oov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: