Archive for January, 2006

Title of first block not shown

Thursday, January 19th, 2006

For some people this is trivial information, for me it was not:

When you have more than one block on a page and they all have titles, by default the title of the first block is not shown. If you do want the title of the first block to show, change (at module level) the following preferences:
- in Layout-block change BLKFTB to Y
- in layout-content canvas change PAGFTB to Y

no_data_found error when trying to upload files using WEBUTIL

Thursday, January 19th, 2006

When you use WEBUTIL in Forms or Designer to upload files to the database, you might get the ORA-01403 : no_data_found error when you’ve first installed the lot and try to upload a file,
even when there was no query to the database that could have caused it.

When this happens, recompile the webutil.pll file on the target machine, this solved it for me.

Finding the last instance of a character in a varchar2 using instr

Thursday, January 19th, 2006

I am using WEBUTIL to upload files to the database in webforms. I also wanted to store the filename in the database but without the path. This meant having to find the last ‘\’ (windows) in the string that the WEBUTIL upload procedure returns and taking the rest as a substring.
My first idea was to create a loop using instr() to find all the ‘\’ instances and exiting the loop when all of them were found. Then someone on IRC pointed out to me that INSTR has a third argument which also takes negative values, and I could use it like this:

instr(p_file_name_with_path, ‘\’, -1);

That gave me the last ‘\’ of the string.

Exceptions and their names

Thursday, January 12th, 2006

click

cannot load oraclient9.dll

Friday, January 6th, 2006

Today TOAD kept telling me it couldn’t load oraclient9.dll in the oracle home I was in (I was connecting to a 9i database), and I noticed that the file had a different length than the other two I found on my system. I copied one of those in the oracle home it was looking and it worked.
Unfortunately the lsnrctl also uses that file and expects the old version.

I ended up using a different home for TOAD to use the tnsnames.ora from.

FRM-92101 error

Wednesday, January 4th, 2006

Under windows this is not needed but a Forms application under Linux apparently needs an LD_LIBRARY_PATH in its env file to find libraries like libhpi.so
Mine looked like this:

LD_LIBRARY_PATH=/u02/app/oracle/as101202/lib/:/u02/app/oracle/
as101202/jdk/jre/lib/i386/server/:/u02/app/oracle/as101202/jdk/jre/
lib/i386/native_threads/:/u02/app/oracle/as101202/jdk/jre/lib/i386/:
/u02/app/oracle/product/as101202/jre/1.4.2/lib/i386/client/:/u02/app/
oracle/product/as101202/jre/1.4.2/lib/i386/native_threads/

Without it I got an FRM-92101 error, and in the application logfile in /j2ee/OC4J_BI_Forms/application-deployments/formsapp
/OC4J_BI_Forms_default_island_1/application.log
I saw this:
06/01/04 14:56:19 formsweb: Forms session <9> aborted: runtime process failed during startup with errors /u02/app/oracle/product/as101202/bin/frmweb: error while loading shared libraries: libhpi.so: cannot open shared object file: No such file or directory

Compiling forms on linux (no graphical interface)

Wednesday, January 4th, 2006

Today someone needed my help compiling forms under linux. We tried compiling whilst being logged in with Putty, but received the following error:

FRM-91500: Unable to start/complete the build.

Metalink came up with note 266731.1 which was too much of a hassle for me to read (I prefer short and concise solutions) and so I searched the oracle forums and found this:

http://forums.oracle.com/forums/thread.jspa?messageID=697343򪏿

The solution was as follows:

export TERM=vt220
export DISPLAY=:0.0
frmcmp.sh module=
.fmb userid=/ @ module_type=FORM compile_all=yes batch=yes

and voila!

HTTP server will not start

Sunday, January 1st, 2006

Whenever you can’t start the Oracle Http Server and receive an error saying this:
“The opmn request has failed. From opmn: HTTP/1.1 204 No Content”
It could be a syntax error in one of your configuration files.

When you are absolutely sure that that cannot be it, look in /Apache/Apache/logs and delete the httpd.pid file. It is left when the server is not stopped properly, for instance when you reboot a machine.