Tuesday, April 22, 2008

Webutil Configuration for 10G


-- the webutil configuration in 10 g is easier than previous version as you just make the following simple steps to start using webutil functionality


1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.


2) Copy or move jacob.jar and jacob.dll [JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18 ( note that the jacob 18 is the recommended version by oracle) copy jacob.jar [OraHome]\forms\java\. copy jacob.dll [OraHome]\forms\webutil\.


3) Sign frmwebutil.jar and jacob.jar Open a DOS command prompt. Add [OraHome]\jdk\bin to the PATH: set PATH=[OraHome]\jdk\bin;%PATH% ---- of the operating system path OR BY THE REGULAR WAY (system properties from my computer---- advanced tab--environement variables) Sign the files, and check the output for success:
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar [OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar


4) If you already have a schema in your RDBMS which contains the WebUtil stored code, you may skip this step. Otherwise, Create a schema to hold the WebUtil stored code, and privileges needed to connect and create a stored package. Schema name "WEBUTIL" is recommended for no reason other than consistency over the user base. Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment out the EXIT statement, to be able to see whether the objects were created witout errors. Start SQL*Plus as SYSTEM, and issue: CREATE USER webutil IDENTIFIED BY [password] DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp; / GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil; /
CONNECT webutil/[password]@[connectstring] @[OraHome]\forms\create_webutil_db.sql -- Inspect SQL*Plus output for errors, and then CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db; /
Reconnect as SYSTEM, and issue: grant execute on webutil_db to public;
/

5) Modify [OraHome]\forms\server\default.env, and append [oraclehome]\jdk\jre\lib\rt.jar to the CLASSPATH entry.


6) Start the OC4J instance


7) Start Forms Builder and connect to a schema in the RDBMS used in step (4). Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T). It is important to generate the PLX, to avoid the FRM-40039 discussed in Note 303682.1 If the PLX is not generated, the Webutil.pll library would have to be attached with full path information to all forms wishing to use WebUtil. This is NOT recommended.


8- note that you must regenertate the webutil.pll before use , rather than you will encounter the error (ora 06508)you can do that by cmd as follow :frmcmp module=.....\webutil.pll userid=module_type=librarycompile_all=yes


9- also the rt.jar and frmwebuitl.jar must be included in the CLASSPATH enviroment variable


10- to use webutil in your form you must attach the webutill.pll and copy the object group"webutil" from the webutil.olb


11-in the first run of webutil in the client machine all libraries required will be downloaded


12- for advanced using of webutil ( like file transfer ) you must edit the "webutil.cfg" file to enable the file transfer that by default disabled


13- also in the "webutil.cfg" file you can edit loging option ( you should clean it up regualary)
14-also you must note that you shouldn't call any functionality of webutil before the interface is loaded ( suppose you want to get the client information like operating system or machine name when the form instance simply you can create timer with 1 second or 2 second and put your code in " when timer expired"
14- client_image.read_image_file and write_image_file may not read or write non ASCII file names corretly

1 comment:

Md. Tanweer Qasim Mohnavi said...

Assalamo Alaikum

Thank you for your Articles.

How I configuration on Oracle Developer Suite 10g version 10.1.2.0.2 ?

Can you give the steps to me "Or" you can upload in your blog and please CC to me ?

Thanks