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

Deserialization of javax.naming.ldap.Rdn fails

XMLWordPrintable

    • b32
    • sparc
    • solaris_2.6



      Name: ygR10224 Date: 11/24/2003


      Filed By : SPB JCK team (###@###.###)
      JDK : java full version "1.5.0-beta-b28"
      JCK : 1.5
      Platform[s] : Solaris
      switch/Mode :
      JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
      Failing Test [s] : N/A


      Problem description
      ===================
      Attempt to deserialize the object of class javax.naming.ldap.Rdn fails.

      The following minimized test demonstrates this failure.
          
      Minimized test:
      ===============
      ------- Test.java -------
      import javax.naming.*;
      import javax.naming.ldap.*;
      import java.io.*;

      public class Test {

          public static void main(String[] args) throws Exception {
              String filename = "rdn.ser";
              
              Rdn obj = new Rdn("cn=Juicy\\, Fruit");
              ObjectOutputStream oos = new ObjectOutputStream(
                      new FileOutputStream(filename));
              System.out.println("Serializing Rdn ...");
              oos.writeObject(obj);
              System.out.println("PASSED");
              oos.close();
              
              ObjectInputStream ois = new ObjectInputStream(
                      new FileInputStream(filename));
              System.out.println("Deserializing Rdn ...");
              Rdn nobj = (Rdn) ois.readObject();
              System.out.println("PASSED");
              ois.close();
          }

      }

      ------- end-of-Test.java -------

      Minimized test output:
      ======================
      Serializing Rdn ...
      PASSED
      Deserializing Rdn ...
      Exception in thread "main" java.lang.NullPointerException
              at javax.naming.ldap.Rdn.put(Rdn.java:220)
              at javax.naming.ldap.Rfc2253Parser.doParse(Rfc2253Parser.java:93)
              at javax.naming.ldap.Rfc2253Parser.parseRdn(Rfc2253Parser.java:68)
              at javax.naming.ldap.Rdn.readObject(Rdn.java:723)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:326)
              at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:931)
              at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
              at Test.main(Test.java:21)


      JCK test source location:
      ==========================
      /java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests

      Specific Machine Info:
      =====================
      SunOS helmet 5.8 Generic_108528-14 sun4u sparc SUNW,Ultra-2
          
      ======================================================================

            jhangalsunw Jayalaxmi Hangal (Inactive)
            gyisunw Gyi Gyi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: