JDK-4777431 : Java WS cache uses both URL-encoded and decoded names for the cache directories
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2002-11-12
  • Updated: 2002-11-12
  • Resolved: 2002-11-12
Related Reports
Duplicate :  
Relates :  
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.

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

Comments
WORK AROUND Name: ngR10108 Date: 11/12/2002 ======================================================================
31-08-2004

EVALUATION see comments, allready fixed in: 4754763 ###@###.### 2002-11-12
12-11-2002