Fix (APAR): PK64379 Status: Fix Release: 6.1.0.15 Operating System: AIX,HP-UX,i5/OS,Linux,Linux pSeries,Linux zSeries,OS/400,Solaris,Windows Supersedes Fixes: CMVC Defect: PK64379 Byte size of APAR: 15402 Date: 2008-04-16 Abstract: URLs returned from ClassLoader.getResource encode spaces as "%20". Not decoding can cause application failures. Description/symptom of problem: PK64379 resolves the following problem: ERROR DESCRIPTION: Change in behavior from 6.1.0.13 to 6.1.0.15. Applications that rely on unencoded spaces in URLs returned from ClassLoader.getResource will fail. Exceptions may show folder names with %20 java.io.FileNotFoundException: C:Program%20FilesIBMWebSphereAppServerprofilesAppSrv01 FilesIBMWebSphereAppServerprofilesAppSrv01installedAp ps......... (The system cannot find the path specified.) LOCAL FIX: PROBLEM SUMMARY USERS AFFECTED: IBM WebSphere Application Server V6.1 users who install applications to a directory with a space in the name. In particular, Microsoft Windows users who install the product to C:\Program Files\. PROBLEM DESCRIPTION: URLs returned from ClassLoader.getResource encode spaces as "%20". Not decoding can cause application failures. RECOMMENDATION: None The fix for PK57900 modified class loader behavior so that the opaque URLs returned by application class loaders return spaces encoded as "%20". This behavior matches java.net.URLClassLoader, and it is required behavior for the URL.toURI() method, which was introduced in Java SE 5, to work properly. PROBLEM CONCLUSION: The class loader has been changed to behave as it did prior to 6.1.0.15 in order to maintain backwards compatibility with existing applications. To enable the behavior introduced in PK57900, you can set the system property com.ibm.ws.classloader.encodeResourceURLs The valid values are false, which is default and causes behavior to match releases prior to 6.1.0.15 by preventing URLs from being encoded, and true, which causes URLs to be encoded as intended by PK57900. JVM custom properties are described by this Information Center article: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com. ibm.websphere.nd.multiplatform.doc/info/ae/ae/xrun_jvm.html Regardless of the setting, you are encouraged to use URL.openConnection() to avoid dependencies on the structure of the URLs returned by a class loader. You are encouraged to set the system property to ensure portability among different environments; for example, URLClassLoader in a non-server test environment will return encoded URLs. If the system property is set and URL.openConnection() is insufficient, you are encouraged to construct java.io.File objects using the result of URL.toURI(), which can only be used reliably when the system property is set. If URL.getPath() or URL.getFile() must be used, then the result must be decoded before it is used. The fix for this APAR is currently targeted for inclusion in fix pack 6.1.0.17. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980 . For WebSphere Application Server zOS customers, the fix for this APAR is currently targeted for inclusion in fixpack 6.1.0.16. Application Server for z/OS customers should follow their normal PTF ordering process. Please refer to the support page download section for additional PTF information: http://www-306.ibm.com/software/webservers/appserv/ zos_os390/support/ Directions to apply fix: Fix applies to Editions: Release 6.1 X_ Application Server (Express or BASE) X_ Network Deployment (ND) Install Fix to: Method: X_ Application Server Nodes NOTE: The user must: * Have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * Logged in with the same authority level when unpacking a fix, fix pack or refresh pack. * Be at V6.0.2.2 or newer of the Update Installer. This can be checked by reviewing the level of the Update Installer in file /updateinstaller/version.txt. The Update Installer can be downloaded from the following link: http://www.ibm.com/support/docview.wss?rs=180&uid=swg21205991 For detailed instructions to Extract the Update Installer see the following Technote: http://www-1.ibm.com/support/docview.wss?rs=180&uid=swg21205400 1) Copy 6.1.0.15-WS-WAS-IFPK64379.pak file directly to the maintenance directory 2) Shutdown WebSphere 3) Launch Update Installer 4) Enter the installation location of the WebSphere product you want to update. 5) Select the "Install maintenance package" operation. 6) Enter the file name of the maintenance package to install (the file that was copied in the maintenance directory). 7) Install the maintenance package. 8) Restart WebSphere Directions to remove fix: NOTE: * The user must have Administrative rights in Windows, or be the Actual Root User in a UNIX environments. * FIXES MUST BE REMOVED IN THE ORDER THEY WERE APPLIED * DO NOT REMOVE A FIX UNLESS ALL FIXES APPLIED AFTER IT HAVE FIRST BEEN REMOVED * YOU MAY REAPPLY ANY REMOVED FIX Example: If your system has fix1, fix2, and fix3 applied in that order and fix2 is to be removed, fix3 must be removed first, fix2 removed, and fix3 re-applied. 1) Shutdown WebSphere 2) Start Update Installer 3) Enter the installation location of the WebSphere product you want to remove the fix. 4) Select "Uninstall maintenance package" operation. 5) Enter the file name of the maintenance package to uninstall. 6) UnInstall maintenance package. 7) Restart WebSphere Directions to re-apply fix: 1) Shutdown WebSphere. 2) Follow the Fix instructions to apply the fix. 3) Restart WebSphere. Additional Information: