WEBUTIL_HOST.HOST (or CLIENT_HOST) Stops Working when Using JRE 8+ or JRE 7U21+ or JRE 6U45+ With Ei
APPLIES TO: Oracle Forms
Oracle Forms - Version 10.1.2.3.0 and later
Information in this document applies to any platform.
SYMPTOMS : JRE (Java Runtime Environment), WEBUTIL_HOST.HOST and/or CLIENT_HOST fail
After upgrading the client JRE (Java Runtime Environment) to version 1.7.0_21+ (JRE 7u21+) or 1.6.0_45+ (JRE 6u45+) or JRE 8+, certain commands issued by WEBUTIL_HOST.HOST and/or CLIENT_HOST fail. No errors are reported within Forms or the Java Console.
CHANGES : upgrading the client JRE
The user client machines were upgraded to JRE 8+ or JRE 7U21+ or 6U45+
CAUSE change made to the Java Plugin
The failure is the result of a change made to the Java Plugin. This change causes each blank space in a string to be assumed an argument. In cases where the command or executible contains blank spaces (i.e. in the path), Java misinterprets the request. More details can be found in the Java 7U21 and 7U25 release notes, which can be found HERE.
Here is an example of the Forms code which may be failing:
webutil_host.host('C:\Program Files\Internet Explorer\iexplore.exe');
Note the blank spaces in the path to iexplorer.exe
Enabling WebUtil logging will present the following error(s) reported in the Java Console.
2013-Apr-19 15:56:38.404 WUH[setProperty()] Setting property WUH_EXECUTION_MODE to 0 2013-Apr-19 15:56:38.404 WUH[setProperty()] Setting property WUH_EXECUTE to c:\Program Files\Internet Explorer\iexplore.exe 2013-Apr-19 15:56:38.404 WUH[setProperty()] Setting property WUH_EXECUTE to 2013-Apr-19 15:56:38.405 WUH[Host.executeHost()] c:\Program Files\Internet Explorer\iexplore.exe 2013-Apr-19 15:56:38.406 WUH[HostCommand.execute()] c:\Program Files\Internet Explorer\iexplore.exe 2013-Apr-19 15:56:38.411 WUH[HostCommand.execute()] IOException: Cannot run program "c:\Program": CreateProcess error=2, The system cannot find the file specified mproId1
Another reported case is when doing something like the following code :
WEBUTIL_HOST.NONBLOCKING('cmd /c "C:\Program Files (x86)\Microsoft Office\Office14\winword.exe" "C:\temp\Test document.doc"');
In this case, it fails with the following exception in the Java Console.
java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments at java.lang.ProcessImpl.isQuoted(Unknown Source) at java.lang.ProcessImpl.getExecutablePath(Unknown Source) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) at java.lang.ProcessBuilder.start(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at oracle.forms.webutil.host.HostCommand.execute(Unknown Source) at oracle.forms.webutil.host.HostCommand.run(Unknown Source) <dateStamp> ERROR>WUC-15 [HostCommand.execute()] Onverwachte fout; uitzondering: java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments
SOLUTION : Patch:16686443
The bug is fixed in the generic one-off Patch:16686443 which can be applied on top of 188.8.131.52 or 184.108.40.206
IMPORTANT : Please make sure you download the correct patch for the correct version of Oracle Forms being used. Eg, 220.127.116.11 or 18.104.22.168
If the Patch:16686443 is not available for your version then you can adopt the following workaround:
The above patch will require some amendments to your Forms Code and Applet parameters. For example, you will require
1. The forms applet parameter WebUtilNextGenHost to be set to TRUE
2. That you code to WEBUTIL_HOST (or CLIENT_HOST) to be encapsulated in double-quotes (eg ") and if the code uses double-quotes in the string itself, it will need to be escaped with a back-slash (eg \). For example,
cmd /c "dir C:\ > \"C:\tmp\my directory\dir.txt\""
See NOTE:1568659.1 or the Patch README for further details.
Amend the code so that it uses short names (DOS 8dot3 notation).
Also, if the application is required to open content files (e.g. .doc, .pdf, .txt, .mp3, etc), the following code can be used. Simply pass in the path and file name. Do not include a reference to the associated executible which normally opens the content. This will be handled by the OS.
Declare my_cmd varchar2(255); Begin my_cmd := 'rundll32 shell32,ShellExec_RunDLL '|| :t1; -- :t1 could be a text field where users enter the path and name of the file they want to open CLIENT_HOST(my_cmd); End;
* Also refer to Note 1568659.1