Wednesday, 13 January 2010

Problems with mouse click on forms 10g

I am using forms 10.1.2.0.2 on OAS 10.1.2  using jpi configuration and i detected problems when mouse click on items of my forms.

I give an example:

I have a form with two blocks: Block A and Block B, when forms starts, the cursor is positioned on item 1 of block A, then i do an execute query on block B and do a mouse click on an item of block B, it shows like cursor is on item of block B but it isn't , the cursor is still positioned on item 1 of block A.

I start to see this problem when i changed my configuration from jinitiator to jpi, so i suposed is something to do with java, so i resolved this adding a trigger to my blocks:

a trigger when-mouse-click at block level with this code:

go_block(replace(replace(substr(:system.mouse_item,1,instr(:system.mouse_item,'.')),':'),'.'));
go_record(:system.mouse_record);
go_item(:system.mouse_item);

Monday, 4 January 2010

Forms always display down on OAS R2

On the Enterprise Manager the Forms status is DOWN on Oracle Application Server R2 (10.1.2.1.2) SUSE 9 64 bit.
Forms can be executed successfully and "opmnctl status" shows all needed processes as UP.

Please backup the files and make changes as given below:

1. Navigate to "$ORACLE_HOME /install" and open the "portlist.ini". Notice the value for "Oracle HTTP Server Listen port". This value will be used at point 4

2. Navigate to "$ORACLE_HOME /sysman/emd" and open the "targets.xml" file.

3. Find the line reffering to the "ServletUrl" property. It should look like this:

4. In the above line replace the PORT with the value found at point 1 (Oracle HTTP Server Listen port).

5. Save and close the targets.xml

6. Run the following command: "opmnctl reload"

7. Run the following command "opmnctl restartproc process-type=HTTP_Server"

8. Test a couple of times the status of the "Forms" component in Enterprise Manager by refreshing the data (In the EM page on the upper right)

Patch 5983622 to certify oas on suse 10

Follow this steps to apply the patch 5983622 (all components middle tier, infraestructure and database are on the same server):

1.      Apply the Oracle Database 10g Release 10.1.0.5 Patch Set on infraestructure repository. The patch is  p4505133_10105_LINUX.
2.      Apply the Software Update (patch 5983622) to the middle tier installation.
3.      Apply the Software Update (patch 5983622) to infraestructure.
4.      Apply the Metadata Repository Update  (patch 5983622) using the middle tier installation
 


Applying the Oracle Database 10g Release 1 (10.1.0.5) Patch Set
Stop all: the middle tier, the infraestructure, the listener and the database.

Set this enviroment variables:

export ORACLE_HOME=/opt/oracle/infra

export ORACLE_SID=infra

export DISPLAY=hostname:0.0

Run runInstaller on Disk1 of patch p4505133_10105_LINUX, after installation follow this steps:

Start the Oracle instance using the following commands:

            SQL> connect SYS as SYSDBA

            SQL> startup

Set the value of the SHARED_POOL_SIZE initialization parameter to at least 150 MB, if using a server parameter file. Log in as the sys user and use the following command to check the parameter:

            SQL> show parameter SHARED_POOL_SIZE

If the parameter is less than 150 MB, then use the following command to set it:

            SQL> ALTER SYSTEM SET SHARED_POOL_SIZE='150M' SCOPE=spfile;

Set the value of the JAVA_POOL_SIZE initialization parameter to at least 150 MB, if necessary. Log in as the sys user and use the following command to check the parameter:

            SQL> show parameter JAVA_POOL_SIZE

If the parameter is less than 150 MB, then use the following command to set the parameter:

            SQL> ALTER SYSTEM SET JAVA_POOL_SIZE='150M' SCOPE=spfile;

Shut down the database using the following command:

            SQL> SHUTDOWN IMMEDIATE

Enter the following SQL*Plus commands:

            SQL> STARTUP UPGRADE

            SQL> SPOOL patch.log

            SQL> @/ORACLE_HOME/rdbms/admin/catpatch.sql

            SQL> SPOOL OFF

Review the patch.log file for errors and inspect the list of components that is displayed at the end of the catpatch.sql script. This list provides the release and status of each SERVER component in the database.

If necessary, re-run the catpatch.sql script to correct any problems.

Restart the database as follows. You must be logged in as a member of the dba group in order to start the database.

            SQL> SHUTDOWN

            SQL> STARTUP

Run the utlrp.sql script as the sys user to recompile all invalid PL/SQL packages. Use the following command to run the script:

            SQL> @/ORACLE_HOME/rdbms/admin/utlrp.sql
 

When i run this script it hangs, so i search on database log in /opt/oracle/admin/infra/bdump>  alert_infra.log

And this altert log shows me that my flash recovery area was full, because of that I couldn’t shutdown the database, so I alter the db_recovery_file_dest_size:

select name
, floor(space_limit / 1024 / 1024) “Size MB”
, ceil(space_used / 1024 / 1024) “Used MB”
from v$recovery_file_dest
order by name
/

alter system set db_recovery_file_dest_size=4g

Then i put my database in noarchivelog:

1) Shutdown the database using Shutdown normal/immediate
2) Mount the database using startup mount
3) Alter database noarchivelog;
4) Alter database open;

And now the script runs ok:

SQL> @/ORACLE_HOME/rdbms/admin/utlrp.sql

You will see an ORA-29558:JAccelerator (NCOMP) not installed error when you apply the patchset to a database where the Natively Compiled Java Libraries (NCOMP) files are not present. If you do not use Java in the database, then ignore this error message.

If you use Java in the database, then install the NCOMP libraries by selecting the Oracle Database 10g Products installation type from the Oracle Database Companion CD. For information about installing the Oracle Database 10g Products installation type from the Companion CD, see Oracle Database Companion CD Installation Guide.

After applying this patch when i start my infraestructure it gives this error: Internal error message 684 could not be found in the msb file

I found the solution on metalink:
Applies to:

Oracle Application Server 10g Enterprise Edition - Version: 10.1.2.0.0 to 10.1.2.3.0
This problem can occur on any platform.
Checked for relevance on 07-May-2009
Symptoms

    * After applying the RDBMS 10.1.0.5 patchset to an Application Server 10.1.2.x.x ORACLE_HOME, any $ORACLE_HOME/opmn/bin/opmnctl command generates the following error message:

Internal error message 684 could not be found in the msb file
Internal error message 684 could not be found in the msb file
Internal error message 684 could not be found in the msb file

    * The opmn command executes correctly, but this error message is given out.
    * You may also hit this issue after applying the 10.1.2.3 Application Server Patchset to any install type on HP-UX Itanium

Cause

With regard to applying a 10.1.0.5 patchset, the issue is caused due to a mismatch of the OPMN MSB files

This error message will occur any time that the OPMN NLS message files do not match the binaries with which they are associated. Since the 10g database uses OPMN as well, a patch from the database has caused this issue. The database MSB files do not match the OPMN MSB files shipped with the Application Server.

For the 10.1.2.3 HPUX Itanium issue this is Bug 8414226 APPEAR ERROR MESSAGE ' 684 COULD NOT BE FOUND' AFTER APPLYING PSR 10.1.2.3
Solution

To implement the solution on UNIX, please execute the following steps:

1. Stop the Application Server (AS) processes with $ORACLE_HOME/opmn/bin/opmnctl stopall
2. Get the backup of the AS environment taken before the database patch has been installed.
3. Navigate to the directory $ORACLE_HOME/opmn/mesg
4. Replace all files in this directory with the files from the backup (Location $ORACLE_HOME/opmn/mesg)

Alternatively, the msb files can also be restored from the Application Server 10.1.2.0.2 installation CD:

1. cd $ORACLE_HOME/opmn/mesg
2. mkdir save
3. mv *mesg save
4. jar xvf <mpt>/Disk1/stage/Components/oracle.opmn/10.1.2.0.0/1/DataFiles/mesg.3.<x>.jar
    or
    jar xvf <mpt>/Disk1/stage/Components/oracle.opmn/10.1.2.0.2/1/DataFiles/mesg.3.<x>.jar
    or
   jar xvf <mpt>/Disk1/stage/Components/oracle.opmn/10.1.2.1.0/1/DataFiles/mesg.3.<x>.jar

Notes:
1. Please ensure your $PATH includes $ORACLE_HOMEjdk/bin
2. <mpt> is the name of the mountpoint on which your install CD is mounted
3. <x> is any minor version number for this file. Apply the Software Update (patch 5983622) to the middle tier installation.

Stop db console:

ORACLE_HOME/bin/emctl stop dbconsole

Run /home/oracle/Disk1 ./runInstaller

Select option Oracle Application Server and Developer suite 10g rel 2 software update 10.1.2.3.0
 

3. Apply the Software Update (patch 5983622) to infraestructure.
Run again /home/oracle/Disk1 ./runInstaller

Choose this option Oracle Application Server and Developer suite 10g rel 2 software update 10.1.2.3.0

The installer ask to stop the listener and the database, so if they are up stop them.
When the installer was configurating OID it gives an error, so I start the database and the listener, and set the variables :
oracle_home
oracle_sid
tns_admin=/opt/oracle/infra/network/admin/
PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin:/usr/ccs/bin:$PATH
 

And then the installer finish ok.
 

4. Apply the Metadata Repository Update (patch 5983622)  using the middle tier installation

Stop middle tier :
ORACLE_HOME/bin/emctl stop
ORACLE_HOME/opmn/bin/opmnctl stopall
Run again /home/oracle/Disk1 ./runInstaller
And choose this option: Oracle metadata repositorio

Run forms 10g on a client pc whitout OAS

1. Start ocj4 c:\oracle_home_dev_suite\j2ee\devsuite\startinst.bat

2. Edit file c:\oracle_home_dev_suite\forms\server\default.env and search for FORMS_PATH and there add your forms, plls and menu paths.
FORMS_PATH=C:\oracle\DevSuite\forms;w:\Desarrollo10g

3. If you use jar files for your application you must copy them to c:\oracle_home_dev_suite\forms\java, and also add it to the file c:\oracle_home_dev_suite\forms\server\formsweb.cfg, like this:

archive_jini=frmall_jinit.jar,ModCursor.jar,HyperLink.jar,icons.jar

4. To see your gif icons in your application edit the file C:\oracle_home_dev_suite\forms\server\forms.conf and add another alias to your icons directory, for example:
AliasMatch ^/forms/java/icons/(..*) "C:\oracle\DevSuite/forms/java/icons/$1"

Edit the file C:\oracle_home_dev_suite\forms\java\oracle\forms\registry\Registry.dat and where said default.icons.iconpath write:
default.icons.iconpath=/forms/java/icons/ (your icons directory)
default.icons.iconextension=gif


5. If you use a configuration for your application add it to c:\oracle_home_dev_suite\forms\server\formsweb.cfg, for example

[xxxpi]
baseHTMLJInitiator=basejpi.htm
jpi_classid=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
jpi_codebase=https://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab#Version=1,4,2,4
jpi_mimetype=application/x-java-applet;version=1.4.2
jpi_download_page=https://java.sun.com/j2se/1.5.0/download.html
pageTitle=XXX
form=form_start_xxx.fmx
width=980
splashScreen=no
background=no
lookAndFeel=Oracle
colorScheme=blue
logo=no
archive_jini=frmall_jinit.jar,ModCursor.jar,HyperLink.jar,share.jar
archive=frmall.jar,ModCursor.jar,HyperLink.jar,laf_1012.jar,share.jar
otherparams=useSDI=yes
height=750
envFile=default_prod.env


6. To run on web your forms write on your explorer:
http://localhost:8890/forms/frmservlet?form=test_form.fmx&userid=pepe/pepito@orcl&otherparams=useSDI=yes&lookAndFeel=oracle&colorScheme=blue

The port is in the file c:\oracle_home_dev_suite\install\portlist and search for Oracle Developer Suite HTTP port =


7. On forms 10g on edit menu – preferences – ejecution set url to http://localhost:8890/forms/frmservlet (check the port)