Home » Developer & Programmer » Forms » Bean not found when form is loaded (6i to 10g migration)
icon9.gif  Bean not found when form is loaded [message #381033] Wed, 14 January 2009 23:17 Go to next message
sirivijay
Messages: 48
Registered: October 2008
Member
Hi,
when i run my form im immediately im geting geting this error message

oracle.forms.webutil.file.FileFunctions bean not found.CLIENT_TEXT_IO.fopen will not work



when i searched in meta link i found a solution but not know ing how to implement it..


this is the solution i have found


Symptoms
When running a customized Webutil Form an error similar with the following is displayed:




oracle.forms.webutil.file.FileFunctions bean not found.
CLIENT_TEXT_IO.fopen will not work.

The exact function that "will not work" may change in the error message depending on the WebUtil code used.
There are no errors displayed in the Java Console.
The original WebUtil Demo Form runs successfully.
Cause
The WebUtil code that is failing is placed in triggers that are firing before Forms instantiates the WebUtil PJCs.
This is not allowed when using WebUtil and it is explained in the WebUtil User Guide release 1.0.6, section 5.3:
"Once the WebUtil library has been attached to your form you can start to add calls to the various PL/SQL APIs defined by the utility.
However, there is an important restriction in the use of WebUtil functions: WebUtil can only start to communicate with the client once the Form has instantiated the WebUtil PJCs.
This means that you cannot call WebUtil functions before the Forms user interface is rendered.
This would include triggers such as PRE-FORM, WHEN-NEW-FORM-INSTANCE and WHEN-NEW-BLOCK-INSTANCE for the first block in the Form."
Solution
Do not use Webutil code in triggers like PRE-FORM, WHEN-NEW-FORM-INSTANCE and WHEN-NEW-BLOCK-INSTANCE because these triggers are firing before Forms instantiates the WebUtil PJCs
Instead, you can test the WebUtil functionality with a WHEN-BUTTON-PRESSED trigger and you can use it in your application in other allowed locations.
Re: Bean not found when form is loaded [message #381059 is a reply to message #381033] Thu, 15 January 2009 00:39 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Are you asking a question or just telling us something?

David

[Updated on: Thu, 15 January 2009 00:39]

Report message to a moderator

Re: Bean not found when form is loaded [message #381065 is a reply to message #381059] Thu, 15 January 2009 02:07 Go to previous messageGo to next message
sirivijay
Messages: 48
Registered: October 2008
Member
Mr.Martin im just taking advise to know whether i can do this or not..coz till now i dint touched the code in migration and im brand new to this job trying to do it taking help from internet,i dont think there is something to test senior people like this.
icon14.gif  Re: Bean not found when form is loaded [message #381078 is a reply to message #381065] Thu, 15 January 2009 03:11 Go to previous messageGo to next message
sirivijay
Messages: 48
Registered: October 2008
Member
I fixed it ..Here is the solution..

what i did was create a new trigger WHEN-TIMER-EXPIRED copied all the code from my WHEN-NEW-FORM-INSTANCE and put it in the WHEN-TIMER-EXPIRED and then put the following code into WHEN-NEW-FORM-INSTANCE :

declare
fake_timer TIMER;
begin

--
-- Purpose of the fake timer is the we cannot call webutil in this trigger since the
-- beans have not yet been instantiated. If we put the code in a when-timer-expired-trigger
-- it means that this timer will not start running until Forms has focus (and so the webutil
-- beans will be instantiated and so call canbe made.
--
fake_timer:= CREATE_TIMER('webutil',100,NO_REPEAT);

--create_blob_table;
null;
end;
Re: Bean not found when form is loaded [message #384501 is a reply to message #381033] Wed, 04 February 2009 02:27 Go to previous messageGo to next message
icmohsin
Messages: 12
Registered: January 2009
Location: Mumbai
Junior Member
Thanks
Re: Bean not found when form is loaded [message #550769 is a reply to message #381078] Thu, 12 April 2012 04:02 Go to previous message
slamonty
Messages: 8
Registered: October 2007
Junior Member

Thank you so much,

Perfect Idea and Solution
Previous Topic: 11g OLE2 Excel printing behind parameter form.
Next Topic: Ora-06511 - Cursor already open - Trigger raised unhandled exception.
Goto Forum:
  


Current Time: Mon Dec 05 09:12:52 CST 2016

Total time taken to generate the page: 0.14906 seconds