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

REGRESSION: DataInputStream error with JRE Plugin 1.5.x using IIS 6.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 6
    • 5.0
    • deploy
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.5.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
      Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      None - Std system IBM Aptiva

      A DESCRIPTION OF THE PROBLEM :
       A Java applet that works correctly with all versions (1.3.x and 1.4.x) of the Java plugin and the applet viewer , now fails with ONLY the Java 1.5.0 and 1.5.0_01 Java plugin, and ONLY when communicating with a Windows IIS 6.0 web server. However, the applet works correctly with the Java appletviewer for Java versions 1.5.0 and 1.5.0_01 when communicating with an IIS 6.0 web server.

      Conditions for failure:
      Java applet (built under 1.3.1 J2SE)
      Microsoft IIS 6.0 Web Server
      Java plugin 1.5.x with Mozilla, IE, Firefox.

      This applet communicates with a Perl Script that sends back a binary stream of data that the Applet reads via the following setup. (Partial example of code)

              URL url = new URL(SurveyDataVariables.pnsSDV.thisFileName);
              DataInputStream in = new DataInputStream(url.openStream());
                  SurveyHeaderRecord.pnsSHR.fileTypeIndicator = in.readShort();
                  SurveyHeaderRecord.pnsSHR.fileFormatVersion = in.readFloat();
                  SurveyHeaderRecord.pnsSHR.questionsInFile = in.readShort();
                  SurveyHeaderRecord.pnsSHR.numberOfRespondents = in.readInt();
                  for (int i=1; i<=60; i++) {
                      SurveyHeaderRecord.pnsSHR.titleSurvey =
                      SurveyHeaderRecord.pnsSHR.titleSurvey + (char)in.readByte();
                  }
                  ........
                  in.skipBytes(1780); //Throw Away Trailer "bytesNotUsed * 1780"
                  etc....

      Somewhere in the read data stream gets corrupt..

      IMPORTANT INFORMATION... Microsoft has changed the way it handles the CRLF in communicating with stdin and stdout. However this is a binary stream and should not have been impacted.




      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try these URL (please check this out soon as these links may not be available for more than a month...

      AWT applet version
      http://vls.nyit.edu/cgi-bin/ssvws.pl?surveysaid/psmits/test.atm

      JFC applet version
      http://webbugs.sfbay.sun.com/rt/incidentDisplay?incidentID=399400


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Watch the Java console for Index array error.
      NOTE:
      Will fail with Java plugin 1.5.x BUT will work with other plugin 1.4 or earlier and will work with Applet viewer 1.5.x

      Click on the "Click Here to Start" button
      Once the window appears, click Load "Survey Button"
      Applet fails with error in Java console.


      ACTUAL -
      AWT applet version

      Exception in thread "AWT-EventQueue-3" java.lang.ArrayIndexOutOfBoundsException: 116
      at com.surveysaid.respondent.awt.SurveyReadURLFile.ReadTheFile(SurveyReadURLFile.java:137)
      at com.surveysaid.respondent.awt.MainFrame.initializeSurvey(MainFrame.java:493)
      at com.surveysaid.respondent.awt.MainFrame.buttonSelectSurvey_actionPerformed(MainFrame.java:474)
      at com.surveysaid.respondent.awt.MainFrame$7.actionPerformed(MainFrame.java:148)
      at java.awt.Button.processActionEvent(Unknown Source)
      at java.awt.Button.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
      ============================================================
      JFC applet version (NOTE I included some print statements in applet)
      File Indicator = 5354
      Format Version = 10.0
      questionsInFile = 2
      numberOfRespondents = 0
      all_keywordText[k] =
      all_RatingTy[k] = 8224
      all_Interval[k] = 8224
      Exception in thread "AWT-EventQueue-4" java.lang.ArrayIndexOutOfBoundsException: 116
      at com.surveysaid.respondent.jfc.SurveyReadURLFile.ReadTheFile(SurveyReadURLFile.java:146)
      at com.surveysaid.respondent.jfc.MainFrame.initializeSurvey(MainFrame.java:540)
      at com.surveysaid.respondent.jfc.MainFrame.buttonSelectSurvey_actionPerformed(MainFrame.java:518)
      at com.surveysaid.respondent.jfc.MainFrame$3.actionPerformed(MainFrame.java:140)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      See above
      ---------- END SOURCE ----------

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.
      ###@###.### 2005-03-22 22:59:33 GMT
      ###@###.### 2005-07-19 15:51:18 GMT

            awoodsomsunw Ashley Woodsom (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: