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

Deployment cache incompatible issue

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Build:
      b11
    • Introduced In Version:
      7u6
    • Resolved In Build:
      b49
    • CPU:
      x86
    • OS:
      windows_7
    • Verification:
      Verified

      Backports

        Description

        J2SE Version (please include all output from java -version flag):
        7u6 b17


        Does this problem occur on J2SE 6ux or 7ux? Yes / No (pick one)
        No


        Operating System Configuration Information (be specific):
        Windows_7


        Bug Description:

        Issue 1:

        1. While the jars gets downloaded in our application, got class not found exception for LocalApplicationProperties.class

        It seems you have removed both LocalApplicationProperties.class and AssociationDesc.class from your deploy.jar.

        deploy\com\sun\deploy\cache\LocalApplicationProperties.class
        deploy\com\sun\deploy\cache\AssociationDesc.class


        As a work around we added new classes
        with the same name and it seems to have solved the issue for now.


        Issue 2:

        But as soon as the jars gets downloaded, Got the below issue as soon as the applet tries to launch.


        cache: Trying to upgrade in place D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
        Invalidating entry url= file=D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
        java.io.UTFDataFormatException: malformed input around byte 177
        at java.io.DataInputStream.readUTF(Unknown Source)
        at java.io.RandomAccessFile.readUTF(Unknown Source)
        at com.sun.deploy.cache.CacheEntry.readIndexFile602(Unknown Source)
        at com.sun.deploy.cache.CacheEntry.readIndexFileOld(Unknown Source)
        at com.sun.deploy.cache.CacheEntry.readIndexFile(Unknown Source)


        We verified the deploy.jar again and oracle seems to have made many changes to this jar out of which notable changes were made to CacheEntry file where this

        exception occurs. Attaching the diff file of CacheEntry of Jre 17U5 (working) and Jre 17U6 (Not working).


        There are some changes being made especially in the methods readIndexFile where a check is made for the .idx file which is downloaded into our cache.


        Steps to reproduce:
        1. Install jre17u6
        2. Delete all the file from java cache location (can be found from control panel -> java -> settings (in general tab) -> locations.
        3. Also enable tracing and console logs of java in Control Panel->Java->Advanced->Debugging and Java Console
        4. check 'Comments' field for login information
        5. Browser tries to download jars and will throw exception as "No class def found for the class LocalApplicationProperties" in the console.
        6. To fix the above we modified our code and changed the package of the import for the class LocalApplicationProperties as com.sun.deploy.model (earlier <Com.sun.deploy.cache>). The modified code is present in the "com" package provided in the attachment.

        Below steps is to repackage the jar file with the modified package.

        7. Now go to the java cache location and search for the string "customjpipreloader7u2" (most probably it will be available in folder no 57)
        8. Copy the 0- file (eg. 329fde76-3166fa61-6.4.0.0-) which contains this string.
        9. Paste into some local folder and then extract using following command - jar -xvf <name of the 0- file>
        10. After extract delete the 0- file. (eg. 329fde76-3166fa61-6.4.0.0-) from the local folder
        11. Replace the com folder with the attached com folder.
        12. Make the jar file using following command - jar -cvf <name of the 0- file> *
        13. Now replace the old 0- file in java cache location with the newly created one.
        14. Re-login the application using 4th step without clearing java cache. Now jars get downloaded but as soon as applet tries to launch java exception throws in the console.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                nam Nam Nguyen (Inactive)
                Reporter:
                tyao Ting-Yun Ingrid Yao (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: