FRM-40734: Internal Error: PL/SQL error occurred Forms 11g

tancat used Ask the Experts™
I have just started using Forms 11g after using 6i several years ago, so my memory is a bit foggy on where to find stuff.  I'm not even sure what information you need in order to help me troubleshoot.  I'm running on Windows 7 64-bit and the database is 11g.  

I have two forms, both of which work in production, which makes me think the problem might be with my setup.  One of the forms I can run locally without a problem, the other gives me this error message.

The main difference between the two forms is that the one that works uses text_io, the one that does not work uses client_text_io from the attached webutil library.  

Can anyone tell me where to look for the root of this problem?  I have looked through a bunch of folders under C:\Oracle\Middleware but cannot find any log files that seem to correlate with the problem I'm having.  

Thank you!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Helena Markováprogrammer-analyst

I would look at
1. )  default.env file if there is:
# webutil config file path
CLASSPATH= .... C:\Oracle\Middleware\ORA_HOME\forms\java\frmwebutil.jar ...

2.) formsweb.cfg:
# Forms applet archive setting for other clients (Sun Java Plugin, Appletviewer, etc)
archive=icons.jar,jacob.jar,frmall.jar,frmwebutil.jar  -- order is important

Also there must be webutil.plx and webutil.olb where your *.fmx are located.

I hope this can help you.
tancatOracle Developer


default.env was correct, I fixed the order in formsweb.cfg, and changed my semi-colons to commas.  webutil.plx is in my folder where my fmx is, but I could not find webutil.olb on our network; however, there is another olb file, ofgwebol.olb, that I put in the same folder as the fmx and plx.  

I don't get as far now as I did before.  As soon as the form opens, FRM-93652 pops up.  Previously I was able to enter values and the file was created, just never written to.  

I will ask about the webutil.olb file.  

tancatOracle Developer


Ok, we don't use the webutil.olb file, apparently, or no one knows about it and everything is theoretically working without it.

Since the suggested changes did not help the situation, I reversed them, and went back to an empty file being created and the FRM-40734 error.  It appears that this line is not liked:

loc_test_file := CLIENT_TEXT_IO.FOPEN(P_PATH||loc_filename,'w');

I have displayed the path and loc_filename and both appear to be valid, and the file is created, but i can't get past this line.  

Rumor has it that client_text_io doesn't work when you run forms locally, only text_io does.  Would you know anything about that?

Also, my shop has sent out instructions to have us install everything for deployment instead of development...that doesn't seem necessary.  Does anyone have an opinion about that?  

Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

For development you need webutil.olb. It is a part of installation so it ought to be somewhere in your office. See topic "Using WebUtil in Your Applications" in the forms on-line help - part Adding The Required Objects:

"WebUtil is designed to be as simple as possible to use within your applications. For each form that needs to use WebUtil functions, do the following:

1.) Attach the webutil.pll library. This library contains all of the APIs available through WebUtil and is the only way of calling the WebUtil functions. Attempting to call the WebUtil PJCs directly will result in errors.

2.) Subclass the WebUtil object group. webutil.olb contains a WebUtil object group, which you can simply drag into your Form. This object group contains all of the PJCs that implement the WebUtil functionality, along with a Canvas and Window to hold them and the alert used for popup errors. Normally the WebUtil window is hidden so its presence will not interfere with your user interface.

Note: The order of these operations is important. If you subclass the object group before attaching the library, the triggers within the object group will be marked as uncompiled and calls to WebUtil will fail with a WUC-15 error unless you do a Recompile All (Control-shift-K) on your module.

Once the WebUtil objects have been attached to your Forms you can start to use the APIs exposed by the PLL as detailed in Functions in WebUtil. There is no need to carry out any initialization steps in your code, as the utility automatically initializes itself.

Note that the WebUtil block that contains the PJC is normally hidden but if your application navigates using the NEXT_BLOCK and PREVIOUS_BLOCK Built-ins, your users may inadvertently navigate to the block. You should check your navigation logic to ensure that this does not happen.

The WebUtil block itself also serves as an "About Screen" for the utility where it lists the version number of the PLL and the versions of each PJC that is used to implement the various functions. To view this information at runtime, call the SHOW_WEBUTIL_INFORMATION function."

Reading doesn't work, does it ?
loc_test_file := CLIENT_TEXT_IO.FOPEN(P_PATH||loc_filename,'r');

I would recommend reading Forms on-line help "WebUtil User's Guide". There you can find all you need.
This is also from the on-line help:

"Client_Text_IO Package
One function in the Client_Text_IO package is Client_Text_IO.fopen. This function allows users to specify character set or file encoding. The character set name can be Oracle names like UTF8, JA16SJIS, AR8MSWIN1256, etc. or Java encoding names like UTF-8, MS932, WINDOWS-1256.

If the Oracle character set name does not have an equivalent in Java or if the encoding is unknown to the JVM, then it will use the client system.file default encoding. If the user does not also specify any encoding, then the client system's default file encoding is used.
FUNCTION fopen(spec VARCHAR2, filemode VARCHAR2, charSet VARCHAR2 := null)RETURN file_type;

When a file is opened in append mode, there is a limitation that read is not allowed. Append means only writing at the end of the file. It is slightly different from the TEXT_IO append operation where read is allowed."
tancatOracle Developer


Thank you for the help.  Eventually last night I found webutil.olb and found that it was attached to our forms (subclassed) now I suspect that I might not be the only one on the team who is out in left field.  ;-)

I'll do some reading today and get back to you.  

tancatOracle Developer


Thank you!  I never did figured out what was wrong with my installation, I uninstalled and reinstalled about a half dozen more times, and I still don't think it's correct.  But you gave me a lot of information in your answer and pointed me in the direction that I needed to at least get it mostly "working".
Helena Markováprogrammer-analyst

I am glad to help you :).

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial