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

Java WS cache uses both URL-encoded and decoded names for the cache directories

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_7

      Description



      Name: ngR10108 Date: 11/12/2002



         The Java Web Start player uses URL components for building the cache
      hierarchy. If there are URL-encoded (RFC-2396) character there it uses these
      encoded values without decoding them. But the classloader decodes these names
      at the same point and the cached JAR file becomes unavailable for them because
      of non-existing pathname. This causes problem when trying to access the
      resources (like resource bundles, images etc) stored in the JAR file. Class
      file access works fine.

          How to reproduce:

          Put a "Draw" application (it does use resource bundle) into the URL
      containing "=" character. Write the correct value for the JNLP codebase (it
      should be URL-encoded, i.e. it will contain %3D instead of "="). Try to load
      this application using Java Web Start. The application will not start because
      it is unable to find the resources :

      #### Java Web Start Error:
      #### Can't find bundle for base name resources, locale en

         Tracing of the JVM shows that the classloader tries to access the JAR
      archive using URL-encoded name (as specified in the codebase) :

      29809: open("/home/gng/.javaws/cache/http/Dstorm/P8000/DMri-test/DMdelivery/
      DMjnlp/DM1_1000002_0_3DSS2lo-L4s6e-hjWoe30w%3D%3D/RMdraw.jar",O_RDONLY|
      O_LARGEFILE) = 8

          But at some poing it starts using the decoded name :

      29809: stat64("/home/gng/.javaws/cache/http/Dstorm/P8000/DMri-test/DMdelivery/
      DMjnlp/DM1_1000002_0_3DSS2lo-L4s6e-hjWoe30w==/RMdraw.jar", 0xF0DFFBE0) Err#2 ENOENT

          Looks like it first happens only when the application tries to access a
      resource, not a class file.

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                herrick Andy Herrick
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: