WEBUTIL_HOST.blocking is not blocking
Hello,
I am having problems using WEBUTIL_HOST.blocking for Microsoft Office 2003 products and Adobe. For example, if I try to open a Word document in blocking mode and Word is already open, the blocking feature fails. I found that this happens also in Excel, Outlook and for pdf files. If the host application is not already open the blocking feature works fine. I have found that for file types using notepad, the blocking feature works all the time.
Here is our setup:
Forms Version 10.1.2.0.2
JInitiator: Version 1.3.1.2
Forms AS 10.1.2.0.2
DB10g Enterprise Edition Release 10.1.0.5.0
Windows XP professional, service pack 2
Here is the code that runs:
// v_fullname contains the fully qualifed filename
v_Cmd := 'cmd /c start "" /WAIT "' || v_fullname || '"' ;
Ret := WEBUTIL_HOST.blocking( v_Cmd ) ;
I found a thread on here that solved this problem for Word with the following syntax
v_Cmd := 'cmd /c start "" /WAIT WINWORD /W "' || v_fullname || '"' ;
Is there a way to solve this problem with a generic solution? All help is greatly appreciated.
Thanks Jim
Hello,
does anyone have any thoughts on this or a workaround?
We use the blocking feature to allow the user to make changes to the document and then restore those changes to the database. Without this feature the code falls through and breaks the link between the document and the forms application.
appreciate all help
Jim
Similar Messages
-
Webutil_host.blocking is not working when an existing Chrome browser is already open
Hi Everyone,
I've a small issue which I would like to share with you and hopefully you might have come across this problems before and assist me to resolve it.
The problem is I'm using Oracle Forms [32 Bit] Version 11.1.2.0.0 (Production) version and in one of the Form's button I'm calling an external API to display the image in a Chrome browser and once it completes, it would return control back to the Oracle Form. In the ideal situation where there isn't any existing Chrome browser opened, the logic would work perfectly as I was using the webutil_host.blocking command that block Form processing until the Chrome browser is terminated. However, as soon as I have one or more existing Chrome browsers open, I was still able to call the external API to display the image but the locking or blocking of the Oracle Form would not work. By the way, all clients accessing the oracle Forms are using Window 7. Is that a solution for that? Is that a Chrome, OS or/and WebUtil issue? Thank you for your assistance and time.
Regards,
JohnHello,
does anyone have any thoughts on this or a workaround?
We use the blocking feature to allow the user to make changes to the document and then restore those changes to the database. Without this feature the code falls through and breaks the link between the document and the forms application.
appreciate all help
Jim -
Webutil_host.blocking( ) example needed * SOLVED *
Hello, I need to get the name of the UNIX application server from my forms 10g program. I'm calling pid := webutil_host.blocking('uname -n') but it fails with a return code of 2 no matter how I format the command ('ksh -c "uname -n"', etc). subsequent calls to outp := webutil_host.get_standard_output(pid) or outp := webutil_host.get_standard_error(pid) don't seem to work either as trying to display outp(0), etc display nothing.
webutil functionality is not being called in pre-form or when-new-form-instance (before webutil is instantiated).
Can anyone point me to a working example of getting output from a UNIX command?
Thanks,
GaryOk, here's how I did it, turned out to be pretty simple:
FUNCTION get_oas_name RETURN varchar2 IS
fp text_io.file_type;
output varchar2(30);
BEGIN
host('/bin/uname -n > /tmp/oasname');
fp := text_io.fopen('/tmp/oasname','r');
text_io.get_line(fp, output);
text_io.fclose(fp);
return output;
END;Gary -
WEBUTIL_HOST.blocking and winword 2003
Hi all,
I got some problems using webutil_host and winword 2003.
As i open a document with winword in blocking mode, works well if word is not already open.
Eg if word is already open it dunot do the blocking stuff, and go back to forms immediatly.
here is the code :
LC$Cmd := 'cmd /c start "" /WAIT "winword.exe'||'" '|| Path_vima;
Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
fms_message('back from call');
LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
If LN$But <> 0 Then
Set_Alert_Property( 'AL_ERREUR', TITLE, 'Host() command' ) ;
End if ;
So if winword is not open on client -> it works well
if winword already open -> it dunot block and display fms_message('back from call');
Plz Help :)
Thanks
PS : this work perfectly with Excel ....Ok seems that dunot work even if not using forms.
as launch a cmd like cmd /c start /WAIT winword
it wait the close of winword to continue execution
but if i launch winword first and than try a
cmd /c start /WAIT winword
it open a second winword but dunot wait for word to be close.....
that's to bad .
I'll try look at MS forum -
Webutil_host.blocking procedure blocking the application intermittently
we are using webutil_host.blocking procedure to open a word document and have the application blocked until word document is closed. It opens the word document fine but blocking the application intermittently. Since it was not blocking intially, I started debugging and tried recompiling the form. It is now blocking the application fine, with no change in the code. It is definitely not the recompilation that made the trick because I compiled the form many times earlier while I was working on other parts of the form. Please share your expertise if anyone had the same issue.
we are using Forms 10.1.2.0.2 with Webutil 1.0.6
-
WEBUTIL_HOST.Blocking
When I try to call the WEBUTIL_HOST.Blocking function from a Webutil enabled Form, I get this error when I try to compile the trigger:
"expression is of wrong type"
It is as if I cannot call WEBUTIL_HOST.Blocking as function.
Here is the code I am trying to compile:
DECLARE
type PROCESS_ID is record (handle PLS_INTEGER);
ret_pid PROCESS_ID;
BEGIN
ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
END;
Anyone else run into this problem???
Thanks.This works for me:
DECLARE
ret_pid WEBUTIL_HOST.PROCESS_ID;
BEGIN
ret_pid := WEBUTIL_HOST.Blocking('c:\bat\runprog.bat');
END;Well, when I say works I mean it compiles. Obviously I don't have a 'c:\bat\runprog.bat' to run.
Cheers, APC -
Webutil_host.blocking /nonblocking_with_callback problem
I have a word document stored in the database. I want to open it in Word, edit it, save then store it back in the database.
I thought that by using webutil_host.blocking, it would wait until I'd saved the document before continuing, but it doesn't.
I've tried the following code:
ret_code := WEBUTIL_HOST.Blocking('C:\Program Files\Microsoft Office\Office10\WINWORD.exe '|| doc_name ) ;
and also:
cmd := 'cmd /c start "" /WAIT "' || doc_name || '"' ;
ret_code := WEBUTIL_HOST.Blocking( cmd );
but neither work - the code following (to save back into the database) executes immediately and doesn't wait until I've quit Word.
I've also tried using nonblocking_with_callback with a callback trigger, but the trigger is executed immediately while my Word doc is still open!
Can anyone help?Hello,
Yes, it is a user-defined form-level trigger.
Francois -
Webutil.host.HostBean not found WEBUTIL_HOST.execute will not work
Hi everyone:
I've got a form. I've attached webtill.pll and subclassed webutil.olb.
In the WHEN-NEW-FORM-INSTANCE trigger it does:
client_host('cmd /c cd > arch.txt');
When I execute my form I got the errror:
webutil.host.HostBean not found
WEBUTIL_HOST.execute will not work
Could anyone give me some help on it?
Thanks!
CarolinaHi!
this is what I got in the Java console
JInitiator: Versión 1.3.1.22
Usar versión JRE 1.3.1.22-internal Java HotSpot(TM) Client VM
Directorio local del usuario = C:\Documents and Settings\Administrador
Configuración del delegado: sin delegado
JAR cache enabled
Location: C:\Documents and Settings\Administrador\Oracle Jar Cache
Maximum size: 50 MB
Compression level: 0
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
q: hide console
s: dump system properties
t: dump thread list
x: clear classloader cache
0-5: set trace level to <n>
Loading http://rx26201:7778/forms/java/frmall_jinit.jar from JAR cache
Loading http://rx26201:7778/forms/java/frmwebutil.jar from JAR cache
Loading http://rx26201:7778/forms/java/jacob.jar from JAR cache
Loading http://rx26201:7778/forms/java/dgrImages.jar from JAR cache
proxyHost=null
proxyPort=0
connectMode=HTTP, native.
La versión del applet Forms es: 10.1.2.0
thanks! -
hi dear all
after searching a lot.. now posting a problem
my problem = Linux client not running client_host command , no error in console , no other sound
i created character base report printing form. that first generate filename.txt out put from report then print to any network printer which selected by user.
server = windows 2003 with oracle 10g forms and reports server
client1 = windows XP
webutil client info working fine
form run following command
client_host('cmd /c copy jobid0866.txt \\computer_name\printer_share');
working fine
client2 = Linux Mint
webutil client info working fine
form run following command
client_host('/bin/smbclient //computer_name/printer_share password -U username -c 'print /home/user_name/Downloads/jobid0866.txt' ');
actual command in form for further elaborate
WEBUTIL_HOST.NONBLOCKING('/bin/ smbclient '||:PRINTER_NAME||' printer -U printer -c '||chr(39)||'print home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||chr(39));
not working with no warning, no error
Edited by: mhpinger on Jan 27, 2012 3:40 AMserver windows 2003 with oracle application 10g
client linux mint
working
cmd_string := '/bin/cp /home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||' '||'/home/'||:global.client_user||'/Downloads/result.txt';
webutil_host.blocking(cmd_string);
not working
cmd_string := '/bin/smbclient '||:PRINTER_NAME||' printer -U printer -c '||chr(39)||'print home/'||:global.client_user||'/Downloads/'||:parameter.p_filename||chr(39);
webutil_host.blocking(cmd_string);
Edited by: mhpinger on Jan 31, 2012 1:32 AM
Edited by: mhpinger on Jan 31, 2012 2:59 AM -
WEBUTIL not working, some help please
Hi,
I am new to Forms 10G and I am starting conversion from Forms 6i. I think I have setup WEBUTIL as decribed in Oracle documentation, step by step. I noticed that none of the calls to WEBUTIL API's are working. For test I tried to delete a file by running: "client_host('cmd /c del c:\putty.log');"
It came back with error:
"oracle.forms.webutil.host.Host bean not found. WEBUTIL_HOST.Execute will not work."
What am I missing? Could anyone help please?
Thanks.I have done the following test:
1. Create new module
2. Add a block manualy
3. Add a button on the block
4. In the WHEN-BUTTON-PRESSED trigger add : "client_host('cmd /c del c:\putty.log');"
5. Attach webutil.pll removing the path
6. Compiled Ok
7. Executing the form returns the error mentioned above
than
8. Open webutil.olb object library from form builder
9. Double click on the MAIN tab
10. Drag the WEBUTIL object group under object groups node of my form subclassing it which added the following objects to my form:
a) WEBUTIL_ERROR under alerts node
b) WEBUTIL under data blocks node
c) WEBUTIL_CANVAS under canvases node
d) WEBUTIL under object groups node
e) WEBUTIL_HIDDEN_WINDOW under windows node
11. Compile OK
12. Works
Hope this helps,
Alex -
CLIENT_HOST-Command not working properly
Hi everyone,
i am having trouble on starting a SQL-PLUS-Prompt with the WEBUTIL_HOST-Package.
I use the following code to start SQL-PLUS:
DECLARE
THE_COMMAND Varchar2(100);
BEGIN
THE_COMMAND := 'PLUS80.EXE scott/scott@database'
WEBUTIL_HOST.Blocking(THE_COMMAND);
END;
The Command-Window on the Client comes up, but i see nothing but the cursor blinking in the upper left corner.
If i change the Code to
THE_COMMAND := 'PLUS80W.EXE scott/scott@database'
the Window comes up. ** Confusing **
Has anyone managed to start the Commandline Version of SQL-PLUS by using the functionality of the WEBUTIL_HOST.Package ?
Thanks in advance,
F.Thornshi steve,
Thanks for your response
after the host command i added like this
host.....;
pause;
if form_failure then
emessage('hi selva');
else
emessage('failure selva');
end if;
when I executed,
I got the below messages
PLEASE ACKNOWLEDGE
-- when i clicked ok,
it showed me failure selva
but still the shell script has not executed.
Note:
In /tmp directory, no log files are available.
Can you plz help
thanks,
selvaraj -
Try to call wfs.exe (MS fax and scan) with webutil_host !!
hi,
I would call from Forms the MS scan and fax application “wfs.exe”.
This is found under windows\system32.
call:
WEBUTIL_HOST.NONBLOCKING ('cmd /c C:\windows\system32\wfs.exe');
Unfortunately, nothing happens. No error message and no cmd-process remains open in the taskmanager.
with other applications it works. For example:
WEBUTIL_HOST.BLOCKING('cmd /c C:\Windows\System32\notepad.exe');
WEBUTIL_HOST.BLOCKING('cmd /c C:\Windows\System32\calc.exe');
I use Forms 10.1.2.3 on Windows 7.
Does anyone have any idea or can test that if it works?
thx Alfredyou can use
WEBUTIL.client_HOST ('cmd /c C:\windows\system32\wfs.exe',hide_screen);
instead of
WEBUTIL_HOST.NONBLOCKING ('cmd /c C:\windows\system32\wfs.exe');
which will run the wfs.exe file located in the windows\system32 directory. if client machine is on the windows O/S
you can view the process list by tasklist command on the command prompt.
you can use cmd /k option for remaining in that session for the errorlevel checking. -
Dealing with problem where calling to webutil_host on form startup
hey ,
i try to call webutil_host in order to open an external .NET form.
this done on form startup (on when-new-form-instance calling).
the call:
WEBUTIL_HOST.NONBLOCKING(v_url_path);
(on forms 10).
as a result , i get:
oracle.forms.webutil.host.host been not found
WEBUTIL_HOST.execute will not work
when i made the same call , this time with a button , everithing is worked fine.
i had solve this problem by using a timer in when-new-form-instance trigger.
my question is:
why is it happend and if there is a way to solve it , without the use of timer.
thanks , yair.Hi
Everybody who has this problem has used a timer.
As Aleksandar said, it's to do with the initialisation of the webutil bean not having occurred until the form startup process has completed.
rgds
Tony -
Dear All,
i am facing a problem of running webutil functions. I have compiled my webutil.pll and then attach to my form and then i copy the webtuil.olb objects into my
form and i created one button on my form to show the calculator the code is as follows
Note: i have webutil.cfg in my classpath of default.env file and i signed both webtuil.jar and jacob.jar successfully but still i am facing error.
e.g;
when-button-press
webutil_host.host('calc.exe');
error: oracle.forms.webutil.host HOST bean not found.
WEBUTIL_HOST.execute will not work.
Thanks.
Immediate help will be appreciated....Hi,
Have you entered the webutil values in the formsweb.cfg file?
e.g. WebUtilConfig=<somewhere>\WebUtil\server\webutil.cfg
WebUtilArchive=frmwebutil.jar,jacob.jar
WebUtilErrorMode=Alert
WebUtilConfig=<somewhere>\WebUtil\server\webutil.cfg
baseHTMLjinitiator=<somewhere>\WebUtil\server\webutiljini.htm
baseHTMLjpi=<somewhere>\WebUtil\server\webutiljpi.htm
baseHTML=<somewhere>\WebUtil\server\webutilbase.htm
Hopefully this may help you.
L :-) -
How to delete file from client machine
Hi all,
we are using the DataBase: oracle:10g,
and forms/reports 10g(developer suite 10g-10.1.2.2).
can anybody help me how to delete the file from client machine in specified location using webutil or any
(i tried with webutil_host & client_host but it is working for application server only)
thank you.hi
check this not tested.
PROCEDURE OPEN_FILE (V_ID_DOC IN VARCHAR2)
IS
-- Open a stored document --
LC$Cmd Varchar2(1280) ;
LC$Nom Varchar2(1000) ;
LC$Fic Varchar2(1280);
LC$Path Varchar2(1280);
LC$Sep Varchar2(1) ;
LN$But Pls_Integer ;
LB$Ok Boolean ;
-- Current Process ID --
ret WEBUTIL_HOST.PROCESS_ID ;
V_FICHERO VARCHAR2(500);
COMILLA VARCHAR2(4) := '''';
BOTON NUMBER;
MODO VARCHAR2(50);
URL VARCHAR2(500);
Begin
V_FICHERO := V_ID_DOC;
LC$Sep := '\';--WEBUTIL_FILE.Get_File_Separator ; -- 10g
LC$Nom := V_FICHERO;--Substr( V_FICHERO, instr( V_FICHERO, LC$Sep, -1 ) + 1, 100 ) ;
--LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
LC$Path := 'C:';
LC$Fic := LC$Path || LC$Sep || LC$Nom ;
If Not webutil_file_transfer.DB_To_Client
LC$Fic,
'TABLE_NAME',
'ITEM_NAME',
'WHERE'
) Then
Raise Form_trigger_Failure ;
End if ;
LC$Cmd := 'cmd /c start "" /MAX /WAIT "' || LC$Fic || '"' ;
Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
If LN$But 0 Then
Set_Alert_Property( 'ALER_STOP_1', TITLE, 'Host() command' ) ;
Set_Alert_Property( 'ALER_STOP_1', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
LN$But := Show_Alert( 'ALER_STOP_1' ) ;
LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
Raise Form_Trigger_Failure ;
End if ;
If Not webutil_file_transfer.Client_To_DB
LC$Fic,
'TABLE_NAME',
'ITEM_NAME',
'WHERE'
) Then
NULL;
Else
Commit ;
End if ;
LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
Exception
When Form_Trigger_Failure Then
Raise ;
End ;sarah
Maybe you are looking for
-
Is there a way to create a multi-state button or have a pict ring behave like boolean?
Does someone know of a way to make a multi-state button say (function one, function two,function three, off) or implement boolean-like behavior for a pict ring? I want to be able to cycle through the states without a menu popping up for all possible
-
Problem with saved tabs and downloads
Hello. After updating to version 32.0. i have a few problems. First, after opening Firefox some of my saved tabs became new tabs. I`m using Super Start, maybe its his problems, but it doesn`t look like that. Previously it worked fine. Second, i can`t
-
Had to reload windows, now itunes thinks I have a new laptop.
Had to reload windows, now itunes thinks I have a new laptop. I cannot now delete or load songs onto iphone unless I wipe them all and start again. Is there anything I can do to get round this problem? Strange how I do not have this problem with my i
-
Stored procedure call throwing SQLException
Our application recently migrated to WLS8.1 SP3 from 7.0 SP4. While registering the value to OracleTypes.CURSOR, I am getting the following exception. We are using oracle 8.1.7, and thin driver(Solaris 5.9). After installing I noticed that WLS8.1 doe
-
CS6 Creative Suite Products freezing
I've been trying to download different CS6 creative suite products & after a half hour of downloading it stops or freezes. I don't know what the problem is. Is there a solutioin to fix this?