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

writeUTF throws DataFormatException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • other-libs
    • generic
    • generic



      Name: skT45625 Date: 10/16/2000


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      I'am writing the content of a string using a ObjectOutputStream. Using Corba
      this stream uses com.sun.corba.se.internal.io.IIOPOutputStream to provide the
      writeUTF() method i used for that.
      Calling writeUTF with a string containig characters over '\u00FF' causes the
      following exception stack.

      ---------------------------------------------------------------------

      2000-10-13 14:07:51.547 JLE----N org.omg.CORBA.DATA_CONVERSION: minor code:
      1398079494 completed: No
      at com.sun.corba.se.internal.iiop.CDROutputStream.write_string(Unknown Source)
      at com.sun.corba.se.internal.io.IIOPOutputStream.writeUTF(Unknown Source)
      at com.si.lt.dom.CSiSunDOMParser.writeElement(CSiSunDOMParser.java:106)
      at com.si.lt.base.ASiProperties.writeObject(ASiProperties.java:72)
      at com.sun.corba.se.internal.io.IIOPOutputStream.writeObject(Native Method)
      at com.sun.corba.se.internal.io.IIOPOutputStream.invokeObjectWriter(Unknown
      Source)
      at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(Unknown Source)
      at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(Unknown
      Source)
      at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(Unknown
      Source)
      at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(Unknown Source)
      at com.sun.corba.se.internal.iiop.CDROutputStream.write_value(Unknown Source)
      at com.sun.corba.se.internal.iiop.CDROutputStream.write_value(Unknown Source)
      at com.si.la.doc.CSiDocHelper.write(CSiDocHelper.java:38)
      at com.si.lc.engine.interfaces._ISiDocumentImplBase._invoke
      (_ISiDocumentImplBase.java:137)
      at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(Unknown Source)
      at com.sun.corba.se.internal.iiop.ORB.process(Unknown Source)
      at com.sun.corba.se.internal.iiop.CachedWorkerThread.doWork(Unknown Source)
      at com.sun.corba.se.internal.iiop.CachedWorkerThread.run(Unknown Source)

      ---------------------------------------------------------------------

      Looking inside the sources of the jsdk1.3 shows that writeUTF() calls
      write_string() of CDROutputStream.
      This method checks for characters > '\u00FF' and throws the
      org.omg.CORBA.DATA_CONVERSION Exception.

      Using a ObjectOutputSteam( new FileOutputSteam(...) ) there are no exceptions.

      I think writeUTF() should call write_wstring() of CDROutputStream or creating
      the real UTF Format and write it as bytes.
      (Review ID: 110916)
      ======================================================================

            eandersosunw Everett Anderson (Inactive)
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: