Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-135

SerializingCloner breaks on large objects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.3.13.GA, 2.0.0.Beta1
    • 1.3.9.GA
    • Serial
    • None
    • Hide

      send an object with following read and write methods through the SerializingCloner

      private void writeObject(java.io.ObjectOutputStream out) throws IOException

      { byte[] baImage = new byte[374301]; out.writeInt(baImage.length); out.write(baImage); out.flush(); }

      private void readObject(java.io.ObjectInputStream in) throws IOException,
      ClassNotFoundException

      { int length = in.readInt(); byte[] baImage = new byte[length]; in.readFully(baImage); }
      Show
      send an object with following read and write methods through the SerializingCloner private void writeObject(java.io.ObjectOutputStream out) throws IOException { byte[] baImage = new byte[374301]; out.writeInt(baImage.length); out.write(baImage); out.flush(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { int length = in.readInt(); byte[] baImage = new byte[length]; in.readFully(baImage); }

    Description

      When sending large objects with a readObject method between EJB's a EOFException is thrown

      java.io.EOFException: Read past end of file
      org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:126)
      org.jboss.marshalling.SimpleDataInput.readFully(SimpleDataInput.java:152)
      org.jboss.marshalling.SimpleDataInput.readFully(SimpleDataInput.java:131)
      org.jboss.marshalling.MarshallerObjectInputStream.readFully(MarshallerObjectInputStream.java:137)
      content.ImageContent.readObject(ImageContent.java:146)

      I've narrowed down the problem to the fact that the class StepObjectOutput writes the object as a list blocks (steps).
      The StepObjectInput reads only from the first block(step).

      Attachments

        Activity

          People

            dlloyd@redhat.com David Lloyd
            danamin Wouter De Borger (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: